diff --git a/src/fr/inrialpes/exmo/ontowrap/skoslite/SKOSLiteThesaurus.java b/src/fr/inrialpes/exmo/ontowrap/skoslite/SKOSLiteThesaurus.java index a4f7b8c72f5a6f8ac0bfb5e16731da3b8759c833..c950841c20f80491ad9ce7bf9aa12b6e12f3f68c 100644 --- a/src/fr/inrialpes/exmo/ontowrap/skoslite/SKOSLiteThesaurus.java +++ b/src/fr/inrialpes/exmo/ontowrap/skoslite/SKOSLiteThesaurus.java @@ -179,7 +179,12 @@ public class SKOSLiteThesaurus implements HeavyLoadedOntology<Model> { @Override public Object getEntity(URI u) throws OntowrapException { try { - return ontoInf.getResource(u.toString()); + Object o = ontoInf.getRawModel().getResource(u.toString()); + if (! ontoInf.contains((Resource) o, RDF.type, ontoInf.getResource(SKOS_CONCEPT))) { + return null;//System.out.println(u+" : "+o); + } + + return o; } catch (Exception e) { throw new OntowrapException("No Object for URI "+u); }