jena-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Dollin <>
Subject Re: Missing elements in the model
Date Thu, 16 Dec 2010 15:59:40 GMT
On Thursday, December 16, 2010 02:37:48 pm Robert Campbell wrote:
> I'm parsing an XML/RDF model from OpenCalais which looks like this:
> ...
> 	<rdf:Description c:contentType="text/raw" c:emVer="7.1.1103.5"
> c:langIdVer="DefaultLangId" c:language="English"
> c:processingVer="CalaisJob01" c:submissionDate="2009-12-10
> 06:34:26.635" rdf:about="">
> 		<rdf:type rdf:resource=""/>
> 		<c:docId rdf:resource=""/>
> 		<c:submitterCode>c8b1bf20-11b5-9426-afb8-1af10ced91a7</c:submitterCode>
> 		<c:signature>digestalg-1|BA85RL4uWFjMjCfSa0k6iHqawts=|TTosv0VIPySK4HwUpxl76Yvh/ZwIjjCGwCRBAqjB+tDkZNcQUHmLUQ==</c:signature>
> 	</rdf:Description>
> ...
> and the Jena model looks like this:
> ...
> @c:submissionDate "2010-12-16 05:24:30.722";
> @c:docId;
> @rdf:type;
> @c:language "English";
> @c:processingVer "CalaisJob01";
> @c:emVer "7.1.1103.5";
> @c:submitterCode "c8b1bf20-11b5-9426-afb8-1af10ced91a7";
> @c:contentType "TEXT/RAW";
> @c:langIdVer "DefaultLangId";
> @c:signature "digestalg-1|uUMwnVwAYwcoIRl2ozky6uBts7Y=|f6zt1E2yFp3X0TQ8KAJi1TjwAhRMGK0WjmJXDhRTw1rUs6oLbBwP3w==";
> ...
> but what's missing is the "rdf:about" attribute in the rdf:Description
> node. I need to be able to query this model to get the rdf:about value
> along with many others, but it doesn't seem to be in the model at all.
> What am I missing?

rdf:about is just RDF/XML syntax; it doesn't exist in the RDF triple model.
It says what the subject of the implied triples is. For example, in your
RDF/XML we see:



  <rdf:type rdf:resource=""/>

And in the model (which is being written out using the informal toString()
notation, subject @predicate object) we see things like:

(looks much better with model.write(System.out, "TTL") for Turtle notation).
(Yes, different URL because incomplete data in post)

The nested <rdf:type ...> has turned into a predicate, and the rdf:about has
made http://lotsofstuff/meta the subject in the statement with that predicate.

The XML structure of RDF/XML is pretty much irrelevant once it has
been read into a model.


"He remembered -- not one thing, not another thing, nor a logical /Whose Body?/
 succession of things, but everything -- the whole thing, perfect, 
 complete in all its dimensions as it were and instantaneously; as if he 
 stood outside the world and saw it suspended in infinitely-dimensional space."

Epimorphics Ltd,
Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT
Epimorphics Ltd. is a limited company registered in England (number 7016688)

View raw message