Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rdf type jcr mixin translation #125

Closed
wants to merge 4 commits into from

Conversation

ajs6f
Copy link
Contributor

@ajs6f ajs6f commented Oct 24, 2013

* @date Oct 23, 2013
* @param <T>
*/
public class DifferencingIterator<T> {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this class get used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, phoo. It doesn't-- it's from other work and must have gotten swept up into a stage. Should I send another commit with it removed, since you're going to squash it anyway?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good... new commit with this class removed.


// add JCR mixins as rdf:type triples
final Iterator<NodeType> nodeTypes = forArray(node.getMixinNodeTypes());
concat(transform(nodeTypes, nodetype2triple()));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guava.transform() returns an interator. In this case, where guava.concat() is only taking a single arg, what purpose does the "concat" server. Would not the "transform" be sufficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not Guava's Iterator.concat(), it's our RdfStream.concat().

Incidentally, there is a useful invocation of Iterators.concat() with one argument. If that arg is an Iterator<Iterator>, concat() will flatten it into an Iterator, which we find useful in our code. See:

https://github.com/futures/fcrepo4/blob/master/fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/PropertiesRdfContext.java#L138

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is an interesting tidbit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java is not a functional language, but sometimes it plays one on TV.

@awoods
Copy link

awoods commented Oct 25, 2013

Have we landed on a plan for the other half of this: rdf -> node-type?

@ajs6f
Copy link
Contributor Author

ajs6f commented Oct 25, 2013

I'm working on that now. That's persistence.

@awoods
Copy link

awoods commented Oct 25, 2013

This looks good to me. I will squash and push now or after @cbeer gives a review, if @cbeer wants to do so.

@cbeer
Copy link
Contributor

cbeer commented Oct 25, 2013

:shipit: 👍

@ajs6f
Copy link
Contributor Author

ajs6f commented Oct 25, 2013

Where did you get a squirrel?

@awoods
Copy link

awoods commented Oct 25, 2013

Resolved with: e18ddb8

@awoods awoods closed this Oct 25, 2013
@awoods awoods deleted the FixRDFTypeJCRMixinTranslation branch October 25, 2013 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants