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

Test that all of the supported RDF response types work #325

Merged
merged 1 commit into from May 13, 2014

Conversation

cjcolvar
Copy link
Contributor

The fcr:search endpoint in the code claimed to be able to return application/xml but jena doesn't support serializing Dataset to that content type. The wiki REST documentation claims other types (application/n3 and application/rdf+json) are supported but they run into the same problem. These tests check that the supported return types actually can be returned. The wiki REST documentation needs to be updated to reflect the reality proven by these tests. Fixes #320.

throws ClientProtocolException, IOException {
final HttpResponse response = execute(method);
final int result = response.getStatusLine().getStatusCode();
assertEquals(OK.getStatusCode(), response.getStatusLine().getStatusCode());
Copy link

Choose a reason for hiding this comment

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

Please use the "result" variable from line:127 here in line:128.

@awoods
Copy link

awoods commented May 2, 2014

@cjcolvar, I have rebased your work on master and sent you the following PR:
cjcolvar#1

Did you know/expect the new tests that you added would not pass? It would be great if you could update the tests and functional code to be in line, before this PR can be merged.

@awoods
Copy link

awoods commented May 9, 2014

Where does this stand, @cjcolvar?

@cjcolvar
Copy link
Contributor Author

cjcolvar commented May 9, 2014

Last I worked on it I think I had most tests passing, but was confused about retrieving specific versions of nodes. I'll try to take a look at this over the weekend.

@cjcolvar
Copy link
Contributor Author

@awoods This should be good to go now. Sorry about the delay.

The rest api docs for GET accepts will need to be updated/verified that they match the tested list: https://github.com/cjcolvar/fcrepo4/blob/search-accept-rdfjson/fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/domain/RDFMediaType.java#L80-L81
I also think the example for getting a specific version should use fcr:versions instead of jcr:system/jcr:versionStorage. I can make these changes but wanted approval before changing anything.

awoods pushed a commit that referenced this pull request May 13, 2014
@awoods awoods merged commit ff5a3b7 into fcrepo:master May 13, 2014
@awoods
Copy link

awoods commented May 13, 2014

Please update the wiki as you recommended above, @cjcolvar.
Thanks!

@cjcolvar
Copy link
Contributor Author

cjcolvar commented Jun 8, 2014

@awoods I finally updated the wiki. All of the accept request headers in the documentation (not the examples) have been corrected, verified, and alphabetized.

@cjcolvar cjcolvar deleted the search-accept-rdfjson branch June 8, 2014 05:04
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.

Search returns 406 when using application/n3 or application/json+rdf
2 participants