Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to handle ontology imports?

799283Oct 4 2010 — edited Oct 22 2010
Hi there,

since my last two questions have been so fruitfully answered, I thought I'll try again. :)

I have to load an OWL file (called ontology1 from now on) into the semantic store (11g+Semantic Technologies), which imports a heavy OWL file of 20MB (ontology2 from now on) itself. This ontology was created using Protege.

What I have done is I created a ont-policy.rdf file to resolve the namespace of the imported OWL. I then read the policy file, followed by the OWL file containing ontology1. Basically, the responsible Java code looks like this:

=======JAVA START==============
model = ModelOracleSem.createOracleSemModel(oracle, dbModelName);

InputStream policyFileInputStream = FileManager.get().open(ontologyPolicyFileName);
model.read(policyFileInputStream, null);

InputStream ontologyFileInputStream = FileManager.get().open(ontologyFileName);
model.read(ontologyFileInputStream, null);
=======JAVA END==============


=======ONT-POLICY.RDF START==============
<OntologySpec>
<!-- local version of the FoodWeb ontology Properties.owl -->
<publicURI rdf:resource="http://www.demo.org/ontologies/2010/importOwl.owl" />
<altURL rdf:resource="file:///C:/demo/importedOwl.owl" />
<language rdf:resource="http://www.w3.org/2002/07/owl" />
<prefix rdf:datatype="&xsd;string">prop</prefix>
</OntologySpec>
=======ONT-POLICY.RDF END==============

Unfortunately, no statements from the imported OWL seem to be put into the db tables.

Can anyone give me a rundown on how to handle imports and get all of it into the db please?

TIA,

Damian
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 19 2010
Added on Oct 4 2010
9 comments
1,135 views