Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b3ff5cec authored by Jérôme David's avatar Jérôme David
Browse files

Use OntModel.setStrictMode(false) to allow Jena to deal with RDFS ontologies and some OWL2 features

parent e10317c9
No related branches found
No related tags found
No related merge requests found
...@@ -60,6 +60,7 @@ public class JENAOntologyFactory extends OntologyFactory { ...@@ -60,6 +60,7 @@ public class JENAOntologyFactory extends OntologyFactory {
onto.setFormalism( formalismId ); onto.setFormalism( formalismId );
onto.setFormURI( formalismUri ); onto.setFormURI( formalismUri );
onto.setOntology( (OntModel)ontology ); onto.setOntology( (OntModel)ontology );
onto.getOntology().setStrictMode(false);
//onto.setFile( uri );// unknown //onto.setFile( uri );// unknown
// to be checked : why several ontologies in a model ??? // to be checked : why several ontologies in a model ???
// If no URI can be extracted from ontology, then we use the physical URI // If no URI can be extracted from ontology, then we use the physical URI
...@@ -91,6 +92,7 @@ public class JENAOntologyFactory extends OntologyFactory { ...@@ -91,6 +92,7 @@ public class JENAOntologyFactory extends OntologyFactory {
if ( onto != null ) return onto; if ( onto != null ) return onto;
try { try {
OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null ); OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );
m.setStrictMode(false);
m.read(uri.toString()); m.read(uri.toString());
onto = new JENAOntology(onlyLocalEntities); onto = new JENAOntology(onlyLocalEntities);
onto.setFile(uri); onto.setFile(uri);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment