HermiT cannot handle wktLitera

49 views
Skip to first unread message

Ehsan Majidi

unread,
Mar 18, 2016, 9:55:29 AM3/18/16
to HermiT Users
I have an ontology using GeoSPARQL and more specifically the wktLiteral data type for storing spatial objects. I wish to use HermiT as a reasoner but when I load the data with above specification, HermiT returns the following error:

Exception in thread "main" org.semanticweb.HermiT.datatypes.UnsupportedDatatypeException: HermiT supports all and only the datatypes of the OWL 2 datatype map, see
http
://www.w3.org/TR/owl2-syntax/#Datatype_Maps.
The datatype 'http://www.opengis.net/ont/geosparql#wktLiteral' is not part of the OWL 2 datatype map and
no custom datatype definition is given;
therefore
, HermiT cannot handle this datatype.
    at org
.semanticweb.HermiT.datatypes.DatatypeRegistry.getDatatypeHandlerFor(Unknown Source)
    at org
.semanticweb.HermiT.datatypes.DatatypeRegistry.getDatatypeHandlerFor(Unknown Source)
...

Hermit works fine in protege for reasoning my ontology but as a standalone application it throws the above error. I must mention I just downloaded the last version of HermiT, 1.3.8.
what should I have done that I missed?

Ernesto Jimenez-Ruiz

unread,
Mar 18, 2016, 10:10:06 AM3/18/16
to Ehsan Majidi, HermiT Users
Hi Ehsan

HermiT correctly complains when using datatypes not included in OWL 2. However one can tell HermiT to ignore these datatypes. See lines below:

Configuration conf = new Configuration();
conf.ignoreUnsupportedDatatypes=true; //by default is set to 'false'
Reasoner hermit = new Reasoner(conf, ontology);

Best
Ernesto

--
You received this message because you are subscribed to the Google Groups "HermiT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermit-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Ernesto Jiménez-Ruiz
Research Assistant
Department of Computer Science
University of Oxford
Wolfson Building, Parks Road, Oxford OX1 3QD, UK

http://krono.act.uji.es/people/Ernesto
http://www.cs.ox.ac.uk/people/ernesto.jimenez-ruiz/


Ehsan Majidi

unread,
Mar 18, 2016, 10:24:57 AM3/18/16
to HermiT Users, ehsan...@gmail.com
Hi Ernesto,

I did as you recommended but still the same error appears.
here is how my code looks like:

File file1 = new File("abcd.owl");
OWLOntologyManager m=OWLManager.createOWLOntologyManager();
         
OWLOntology o = null;
       
try {
            o
= m.loadOntologyFromOntologyDocument(file1);
       
} catch (Exception e) {
           
// TODO Auto-generated catch block
            e
.printStackTrace();

       
}
           
Configuration conf = new Configuration();
            conf
.ignoreUnsupportedDatatypes=true; //by default is set to 'false'

           
Reasoner hermit = new Reasoner(conf, o);
         
boolean consistent = hermit.isConsistent();
         
System.out.println(consistent);
       
       
   
}


Bests,
Ehsan
Reply all
Reply to author
Forward
0 new messages