Search the web
Sign In
New User? Sign Up
jena-dev · Jena Developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Collections, how to create and parse using Jena ?   Message List  
Reply | Forward Message #30944 of 42508 |
I need to create the following construct :

<rdf:RDF>
<xmlns:rdf="....."
<xmlns:myns="...." />
<rdf:Description rdf:about="......">
<myns:menu rdf:parseType="Collection" >
<rdf:Description rdf:about="A URI" />
<rdf:Description rdf:about="Another URI" />
<rdf:Description rdf:about="A third URI" />
</myns:menu>
</rdf:Description>
</rdf:RDF>

How can I create and (later parse) this using Jena ? Any pointers appreciated.




Thu Sep 20, 2007 8:57 am

thunegrill
Offline Offline
Send Email Send Email

Forward
Message #30944 of 42508 |
Expand Messages Author Sort by Date

I need to create the following construct : <rdf:RDF> <xmlns:rdf="....." <xmlns:myns="...." /> <rdf:Description rdf:about="......"> <myns:menu...
thunegrill
Offline Send Email
Sep 20, 2007
9:01 am

... This is the short-form syntax for a list in RDF. In Jena, you can use the RDFList class. To get that particular syntax form when you serialise, ensure you...
Ian Dickinson
ian_j_dickinson
Offline Send Email
Sep 20, 2007
9:51 am

... Thank you for a quick reply. I get the following serialized form when using XML-ABBREV : <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ...
thunegrill
Offline Send Email
Sep 20, 2007
11:37 am

... Suggest: replace ... with ... The list elements are balnk nodes, you created a named list (named NS+"1"). although I am not quite sure why the 2nd and 3rd...
Jeremy Carroll
jjchplb
Offline Send Email
Sep 20, 2007
1:06 pm

... Well, yes. I pointed you to RDFList. For example: Literal one = ResourceFactory.createTypedLiteral(1); Literal two = ResourceFactory.createTypedLiteral(2);...
Ian Dickinson
ian_j_dickinson
Offline Send Email
Sep 20, 2007
1:52 pm

... Missing close paren, sorry. And just in case it's not clear, RDFList is an extension of Resource, so you can do: Resource res =...
Ian Dickinson
ian_j_dickinson
Offline Send Email
Sep 20, 2007
2:27 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help