From 111810504ae611f8200cee867decc36d3b0a48c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20David?= <Jerome.David@univ-grenoble-alpes.fr> Date: Tue, 9 Jul 2013 09:44:38 +0000 Subject: [PATCH] when no ontology element and no default namespace are defined then it use the ontology URL as ontology URI. --- .../inrialpes/exmo/ontowrap/jena25/JENAOntologyFactory.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fr/inrialpes/exmo/ontowrap/jena25/JENAOntologyFactory.java b/src/fr/inrialpes/exmo/ontowrap/jena25/JENAOntologyFactory.java index 8226b3ee..4b6ca350 100644 --- a/src/fr/inrialpes/exmo/ontowrap/jena25/JENAOntologyFactory.java +++ b/src/fr/inrialpes/exmo/ontowrap/jena25/JENAOntologyFactory.java @@ -91,8 +91,10 @@ public class JENAOntologyFactory extends OntologyFactory { try { onto.setURI(new URI(m.listOntologies().next().getURI())); } catch (NoSuchElementException nse) { - onto.setURI(new URI(m.getNsPrefixURI(""))); - //onto.setFile(uri); + if (m.getNsPrefixURI("")!=null) + onto.setURI(new URI(m.getNsPrefixURI(""))); + else + onto.setURI(uri); } //onto.setURI(new URI(m.listOntologies()getOntology(null).getURI())); onto.setOntology(m); -- GitLab