sparql - Pellet internalReasonerException in OWL API -


have been stuck 1 day , kind enough help? have loaded ontology imported sweet(semantic web earth , environmental ontology). did sparql query on it, , got such answer: "object property haslowerbound used hasvalue restriction value literal: "0"^^integer". (haslowerbound, have checked in sweet, datatype ontology in sweet)

how can solve problem?

here code wrote , error got,thank help~

public class load { public static void main(string[] args) throws owlontologycreationexception {     // hold of ontology manager     owlontologymanager manager = owlmanager.createowlontologymanager();      file file = new file("g:/protege/owlfiles/before_gather.owl");             // load local copy     owlontology loadmodis = manager.loadontologyfromontologydocument(file);      pelletreasoner reasoner =      pelletreasonerfactory.getinstance().createnonbufferingreasoner( loadmodis              );      knowledgebase kb = reasoner.getkb();     pelletinfgraph graph = new      org.mindswap.pellet.jena.pelletreasoner().bind( kb );     infmodel model = modelfactory.createinfmodel( graph );      string prefix = "prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-     ns#>" +             "prefix owl: <http://www.w3.org/2002/07/owl#>" +             "prefix xsd: <http://www.w3.org/2001/xmlschema#>" +             "prefix seaice: <http://www.semanticweb.org/seaiceontology#>" +             "prefix repr: <http://sweet.jpl.nasa.gov/2.3/reprdataformat.owl#>" +             "prefix realmcryo: <http://sweet.jpl.nasa.gov/2.3/realmcryo.owl#>" +             "prefix relamath: <http://sweet.jpl.nasa.gov/2.3/relamath.owl#>";     string select = "select ?dataset ";     string = "where {" +             "?dataset relamath:haslowerbound " + "\"0\"^^xsd:integer" +             "}" ;      queryexecution qe = sparqldlexecutionfactory.create(queryfactory.create(prefix + select + where), model);     resultset rs = qe.execselect();     resultsetformatter.out(system.out,rs);     rs = null;  qe.close();      reasoner.dispose();      //owlreasonersparqlengine sparqlengine=new owlreasonersparqlengine(new minimalprintingmonitor());     //sparqlengine.execquery(str.tostring(),dataset);      system.out.println("loaded ontology: " + loadmodis); } } 

exception in thread "main" org.mindswap.pellet.exceptions.internalreasonerexception: object property haslowerbound used hasvalue restriction value literal: "0"^^integer @ org.mindswap.pellet.tableau.completion.rule.somevaluesrule.applysomevaluesrule(somevaluesrule.java:204) @ org.mindswap.pellet.tableau.completion.rule.somevaluesrule.apply(somevaluesrule.java:64) @ org.mindswap.pellet.tableau.completion.rule.abstracttableaurule.apply(abstracttableaurule.java:64) @ org.mindswap.pellet.tableau.completion.sroiqstrategy.complete(sroiqstrategy.java:157) @ org.mindswap.pellet.abox.isconsistent(abox.java:1423) @ org.mindswap.pellet.abox.isconsistent(abox.java:1260) @ org.mindswap.pellet.knowledgebase.consistency(knowledgebase.java:1987) @ org.mindswap.pellet.knowledgebase.isconsistent(knowledgebase.java:2061) @ org.mindswap.pellet.jena.pelletinfgraph.prepare(pelletinfgraph.java:258) @ org.mindswap.pellet.jena.pelletinfgraph.prepare(pelletinfgraph.java:241) @ com.clarkparsia.pellet.sparqldl.jena.sparqldlexecutionfactory.create(sparqldlexecutionfactory.java:113) @ com.clarkparsia.pellet.sparqldl.jena.sparqldlexecutionfactory.create(sparqldlexecutionfactory.java:261) @ com.clarkparsia.pellet.sparqldl.jena.sparqldlexecutionfactory.create(sparqldlexecutionfactory.java:226) @ loadmodis.load.main(load.java:78)

haslowerbound parsed data property , annotation property.

pellet checking data property case , assumes if property not data property must object property. case owl 2 ontologies, ontology not being parsed owl 2 compatible ontology - punning of annotation property , data property not allowed.

i'm not sure yet whether problem in ontology or in owlapi parsing of it.

edit: it's parsing issue. haslowerbound declared in relamath.owl data property. relamath.owl imports reprmath.owl, uses haslowerbound not declare it. reprmath.owl imports relamath.owl, there cyclic import there.

the problem that, during parsing: - relamath.owl parsed, import found, reprmath.owl import resolved; no declarations parsed yet. - reprmath.owl parsed, import found. relamath.owl being parsed, call nothing. entities declared in relamath.owl included while parsing reprmath.owl. problem: entities have not been parsed yet, set empty. haslowerbound found in reprmath no declaration exists yet. therefore owlapi defaults annotationproperty. - relamath.owl parsing continues, declaration found.

final result: ontology importing relamath.owl has illegal punning haslowerbound. owlapi bug.

workaround: add data property declaration reprmath.owl:

<owl:datatypeproperty rdf:about="#haslowerbound"/> 

this might need done in more 1 ontology.


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -