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

add fedorabinary check #695

Closed
wants to merge 4 commits into from
Closed

add fedorabinary check #695

wants to merge 4 commits into from

Conversation

yinlinchen
Copy link
Contributor

The workflow is check whether the child node is a FedoraBinary, get description, and added to the triple. The test is passed, but failed in Fedora Repository HTTP API Module...

@@ -66,7 +68,14 @@ public PropertiesRdfContext(final FedoraResource resource,
private Iterator<Triple> triplesFromProperties(final FedoraResource n)
throws RepositoryException {
LOGGER.trace("Creating triples for node: {}", n);
final Iterator<Property> allProperties = n.getNode().getProperties();
final Iterator<Property> allProperties;
if (n instanceof FedoraBinary) {
Copy link

Choose a reason for hiding this comment

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

In the case when the FedoraResource is a FedoraBinary, you should be able to concatenate the properties from both the description and the arg node itself. The end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, so the logic should be first get properties from n.getNode().getProperties() and then if the node is a binary, append description.getNode().getProperties().
Can you tell me how to append allProperties?

Copy link

Choose a reason for hiding this comment

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

@yinlinchen
Copy link
Contributor Author

All test passed. FCREPO-1290 fixed.

@yinlinchen yinlinchen closed this Jan 28, 2015
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

2 participants