Hi all,

I have a question about SDB and loading triples from a store before
instantiating an OntModel and I was hoping for some help.

I use the following boiler-plate to use SDB to instantiate a Model and then
create an OntModel from my Model:
    Store store = SDBFactory.connectStore("/Users/chris/sdb.ttl");
    Model model = SDBFactory.connectDefaultModel(store);
    OntModel ontology =
ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, model);

I need the OntModel because I use owl2java to translate an OWL to Jena java
classes and I then want to instantiate them and use them.

The JavaDocs for ModelFactory.createOntologyModel clearly state:  Answer a
new ontology model, constructed according to the given ontology model
specification, and starting with the ontology data in the given model.

Note the "starting with the ontology data in the given model".  I've seen
that the resulting OntModel does in fact contain all of the triples loaded
from the SDB store.

In my code I'm not interested in querying.  I'm "write-only" and I'm simply
trying to insert triples into the store using the owl2java Jena based
classes I instantiate and populate.

Is there a way for me to use SDB to persist data in a "write-only" way where
I don't read the existing triples out of the store first?

Perhaps there's a better way for me to create an OntModel than going through
ModelFactory.createOntologyModel()?

Any advice you can offer would be greatly appreciated.  Thanks!


-c

-- 
Christopher Blunck
[email protected]

Reply via email to