-
Notifications
You must be signed in to change notification settings - Fork 30
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
Access to Linked Data #20
Comments
https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-json/index.html very up-to-date |
so up to date that nothing will support it :) but a nice and parsable alternative… |
I've implemented RDF support in 42e9daf (in a new @Override
public Model encodeRDF(User t, MediaType mt) {
Model model = ModelFactory.createDefaultModel();
URI uri = getUriInfo().getBaseUriBuilder()
.path(RootResource.class)
.path(RootResource.USERS)
.path(UsersResource.USER).build(t.getName());
model.createResource(uri.toASCIIString())
.addProperty(VCARD.EMAIL, t.getMail())
.addProperty(VCARD.NICKNAME, t.getName());
return model;
} It will result in this RDF output (I've implemented RDF/XML and Turtle encodings):
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
<rdf:Description rdf:about="http://localhost:8080/webapp/rest/users/testuser1">
<vcard:NICKNAME>testuser1</vcard:NICKNAME>
<vcard:EMAIL>testuser1@example.org</vcard:EMAIL>
</rdf:Description>
</rdf:RDF>
<http://localhost:8080/webapp/rest/users/testuser1>
<http://www.w3.org/2001/vcard-rdf/3.0#EMAIL>
"testuser1@example.org" ;
<http://www.w3.org/2001/vcard-rdf/3.0#NICKNAME>
"testuser1" . |
Closed because the task is to unspecific. |
Get the clear idea about the linked data; come up with suggestions.
The text was updated successfully, but these errors were encountered: