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

Optionally include inbound references in the object rdf serialization #340

Closed
wants to merge 2 commits into from

Conversation

cbeer
Copy link
Contributor

@cbeer cbeer commented May 5, 2014

Inbound references can be included in the GET /some/object/path response
by using the Prefer: header, e.g.:

GET /some/object/path HTTP/1.1
...
Prefer: return="representation"; include="http://fedora.info/definitions/v4/repository#InboundReferences"
...

And the response will include inbound triples, e.g.:

</some/other/path> <fedorarelsext:isPartOf> </some/object/path>

Fixes https://www.pivotaltracker.com/story/show/70723284

private Iterator<Triple> putReferencePropertiesIntoContext() throws RepositoryException {
final UnmodifiableIterator<Property> nonBinaryProperties =
Iterators.filter(new PropertyIterator(node.getReferences()),
not(isInternalProperty));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

isInternalProperty will also filter out the *_ref properties we leave around for URI properties created on-the-fly (and that we ought to include in this output.)

cbeer and others added 2 commits May 6, 2014 12:01
Inbound references can be included in the GET /some/object/path response
by using the Prefer: header, e.g.:

```
GET /some/object/path HTTP/1.1
...
Prefer: return="representation"; include="http://fedora.info/definitions/v4/repository#InboundReferences"
...

```

And the response will include inbound triples, e.g.:

```
</some/other/path> <fedorarelsext:isPartOf> </some/object/path>
```
@awoods
Copy link

awoods commented May 6, 2014

Resolved with: d77194c

Addresses: https://www.pivotaltracker.com/story/show/70723284

@awoods awoods closed this May 6, 2014
@awoods awoods deleted the inbound-references branch May 6, 2014 21:55
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