I’m getting myself up to speed on RDF (and RDFS) and building molecular repositories as an example. I’m using the Jena Semantic Web Framework (Open Source , Java, HP-inspired) and so far like it. But I have only done a little bit (subject-predicate-object) Jim tells me that what I have produced so far needs cleaning up. As a minimum I have to use RDF types (rdf:type).
I like learning by example – give me a few examples of RDF-XML and the corresponding Jena code and that will go a long way. But although I could do this easily for the simple stuff the Jena tutorial runs out before RDFS. And the Javadoc is enormous. I’m impressed, but I don’t know where to start. There are no obvious package or class names. Everything uses abstract language. How do I learn about ranges and domains unless I can see some working examples and create some?
So rather than exposiing this on an RDF-specific list (which I may do later) I’m wondering if there are any kind readers who can point to some examples of RDFS-XML and even better if they can suggest how to hack them in Jena.
TIA
-
Recent Posts
-
Recent Comments
- pm286 on ContentMine at IFLA2017: The future of Libraries and Scholarly Communications
- Hiperterminal on ContentMine at IFLA2017: The future of Libraries and Scholarly Communications
- Next steps for Text & Data Mining | Unlocking Research on Text and Data Mining: Overview
- Publishers prioritize “self-plagiarism” detection over allowing new discoveries | Alex Holcombe's blog on Text and Data Mining: Overview
- Kytriya on Let’s get rid of CC-NC and CC-ND NOW! It really matters
-
Archives
- June 2018
- April 2018
- September 2017
- August 2017
- July 2017
- November 2016
- July 2016
- May 2016
- April 2016
- December 2015
- November 2015
- September 2015
- May 2015
- April 2015
- January 2015
- December 2014
- November 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- December 2006
- November 2006
- October 2006
- September 2006
-
Categories
- "virtual communities"
- ahm2007
- berlin5
- blueobelisk
- chemistry
- crystaleye
- cyberscience
- data
- etd2007
- fun
- general
- idcc3
- jisc-theorem
- mkm2007
- nmr
- open issues
- open notebook science
- oscar
- programming for scientists
- publishing
- puzzles
- repositories
- scifoo
- semanticWeb
- theses
- Uncategorized
- www2007
- XML
- xtech2007
-
Meta
TheN3 primer includes some basic RDFS.
This simple RDF Schema I wrote may be useful as a simple example of basic RDFS concepts including range and domain:
http://www.ldodds.com/schemas/book/
To load RDF data into Jena you need to do something like:
Model myData = FileManager.loadModel(pathToFile);
To load an RDF schema:
Model mySchema = FileManager.loadModel(pathToSchema);
Then if you want to manipulate your data, using the schema, you need to create a combined model:
Model inferenceModel = ModelFactory.createRDFSModel( mySchema, myData );
Then you use the methods on the Model interface, which is the primary way to access RDF data using Jena. In the above examples, if you manipulate “myData”, you’ll only see the raw data. If you manipulate “inferenceModel” you’ll also have access to any triples inferred from the basic schema.
However, unless you’ve got a specific need for RDFS, I’d just dive into creating some data and working with it in Jena. Unlike an XML schema and RDF schema doesn’t provide validation.
Btw, if you get as far as wanting to explore SPARQL, i.e. simplying querying your molecular repositories, then my query tool and tutorial might be useful:
http://www.xml.com/lpt/a/2005/11/16/introducing-sparql-querying-semantic-web-tutorial.html
http://www.ldodds.com/projects/twinkle/
Feel free to drop me an email if you have specific questions. The #swig and #jena IRC channels on freenode.net are also good places to ask questions.
Cheers,
L.
You may well have seen this:
http://www.w3.org/TR/2002/WD-rdf-primer-20020319/
I find it one of the best introductory articles on RDF and RDFS – a good balance of enough detail without getting bogged down in technicalities.
Maybe it’s a matter of personal preference, but I have found that my understanding of all matters RDF is helped greatly by ignoring the XML format for RDF whenever possible! I tend to always think of RDF /S in terms of “blobs and lines”. And the N3 format is much more readable and hence understandable than the RDF-XML format.