On Wednesday, November 28, 2012 07:38:41 AM Scott Streit wrote:
 
> When a extended a statement to an ExtendedStatement which I added a
> property of reificationId.  I then put the ExtendedStatement in the model.
> Unfortunately, when I pulled back the statement from the model, it was a
> statement, not an extended statement.

Yes.

In fact Models don't even store Statements; the Statements are stripped
down to Triples, whose S P O components are Nodes which are stripped-down
RDFNodes (Resources and Literals). The Triples are stored in the Graph that
the Model wraps.

When you ask for a Statement from a Model, eg using Model.listStatements 
or Resource.listProperties, the Model appeals to the Graph to find the 
appropriate
Triples and then reconstructs a corresponding Statement.

[There's a cache, but of course things fall out of caches.]

This indirection allows us to have Resource objects with lots of useful methods
that rely on knowing what Model the resource is associated with while
having the internal Graph/Node implementation be much simpler and
easier to reimplement.

> I could use a way to uniquely identity a Jena Statement.

What are you actually trying to do, and how would this unique identifier help?

[Note that .equals() and .hashCode() are define on Statement[Impl]s, and
 are Model-independant, so you can have Statements as set elements and
 keys of maps just fine.]

Chris
 
-- 
"It is seldom good news."      ~Crystal Ball~, /The Tough Guide to Fantasyland/

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

Reply via email to