Hey I am using the Owllink library for a school project using Hermit, but I am having some issues of which some I could workaround:
1- reasoner.isSubClassOf() is used in some examples in the papers published. It seems to be only defined in the Hermit library when talking to the reasoner directly. I replaced it by isEntailed(issubclassof_axiom). Is this the good way to go?
2- reasoner.isConsistent(); is crashing with an exception. It seems there is a problem satisfiability supported by the reasoner. but I'm not sure, tried looking for answers, wondering if you can assure? here is the dump:
Exception in thread "main" org.semanticweb.owlapi.owllink.builtin.response.OWLlinkErrorResponseException: IsKBSatisfiable is not supported
at org.semanticweb.owlapi.owllink.parser.OWLlinkErrorResponseElementHandler.getOWLLinkObject(OWLlinkErrorResponseElementHandler.java:40)
at org.semanticweb.owlapi.owllink.parser.OWLlinkErrorResponseElementHandler.getOWLLinkObject(OWLlinkErrorResponseElementHandler.java:33)
at org.semanticweb.owlapi.owllink.parser.OWLlinkResponseMessageElementHandler.handleChild(OWLlinkResponseMessageElementHandler.java:73)
at org.semanticweb.owlapi.owllink.parser.AbstractOWLlinkErrorHandler.endElement(AbstractOWLlinkErrorHandler.java:56)
at org.semanticweb.owlapi.owllink.parser.MyOWLXMLParserHandler.endElement(MyOWLXMLParserHandler.java:857)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.semanticweb.owlapi.owllink.HTTPSessionImpl.performRequests(HTTPSessionImpl.java:197)
at org.semanticweb.owlapi.owllink.OWLlinkHTTPXMLReasoner.performRequests(OWLlinkHTTPXMLReasoner.java:462)
at org.semanticweb.owlapi.owllink.OWLlinkHTTPXMLReasoner.performRequest(OWLlinkHTTPXMLReasoner.java:466)
at org.semanticweb.owlapi.owllink.OWLlinkHTTPXMLReasoner.performRequestOWLAPI(OWLlinkHTTPXMLReasoner.java:480)
at org.semanticweb.owlapi.owllink.OWLlinkHTTPXMLReasoner.isConsistent(OWLlinkHTTPXMLReasoner.java:144)
at tester.test2(tester.java:68)
at tester.main(tester.java:142)
thanks alot
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another issue is given the following code:
…
CreateKB createKB = new CreateKB();
KB kb = reasoner.answer(createKB);
IRI kbIRI = kb.getKB();
Tell tell = new Tell(kbIRI, otherOntology.getAxioms());
OK ok = reasoner.answer(tell);
System.out.print("knowledge base tell (");
Iterator<OWLAxiom> iter = tell.iterator();
while (iter.hasNext()) System.out.print(iter.next());
System.out.println(") response = " + ok.getWarning());
GetDescription rdesc = new GetDescription();
Description desc = reasoner.answer(rdesc);
Iterator<PublicKB> i = desc.getPublicKBs().iterator();
while(i.hasNext()) System.out.println("Description: " + desc.getMessage() + i.next());
GetSubClassHierarchy request = new GetSubClassHierarchy(kbIRI);
System.out.println("knowledge base IRI = " + request.getKB()); //same as kbIRI
ClassHierarchy hierarchy = reasoner.answer(request);
System.out.println("Warning: " + hierarchy.getWarning());
the realized hierarchy should be as follows since I have a Tell that should add this to the KB:
{owl:Thing}-> {::}
{<http://owled#A>}-> {::}
{<http://owled#B>}-> {::}
It works fine if I add the axioms directly to the ontology before calling createReasoner(ontology) rather than through Tell. am I doing something wrong?
thanks again
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Welcome to Help
Hey I am using the Owllink library for a school project using Hermit, but I am having some issues of which some I could workaround:
1- reasoner.isSubClassOf() is used in some examples in the papers published. It seems to be only defined in the Hermit library when talking to the reasoner directly. I replaced it by isEntailed(issubclassof_axiom). Is this the good way to go?
2- reasoner.isConsistent(); is crashing with an exception. It seems there is a problem satisfiability supported by the reasoner. but I'm not sure, tried looking for answers, wondering if you can assure? here is the dump:
Exception in thread "main" org.semanticweb.owlapi.owllink.builtin.response.OWLlinkErrorResponseException: IsKBSatisfiable is not supported
at org.semanticweb.owlapi.owllink.parser.OWLlinkErrorResponseElementHandler.getOWLLinkObject(OWLlinkErrorResponseElementHandler.java:40)
at org.semanticweb.owlapi.owllink.parser.OWLlinkErrorResponseElementHandler.getOWLLinkObject(OWLlinkErrorResponseElementHandler.java:33)
at org.semanticweb.owlapi.owllink.parser.OWLlinkResponseMessageElementHandler.handleChild(OWLlinkResponseMessageElementHandler.java:73)
at org.semanticweb.owlapi.owllink.parser.AbstractOWLlinkErrorHandler.endElement(AbstractOWLlinkErrorHandler.java:56)
at org.semanticweb.owlapi.owllink.parser.MyOWLXMLParserHandler.endElement(MyOWLXMLParserHandler.java:857)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.semanticweb.owlapi.owllink.HTTPSessionImpl.performRequests(HTTPSessionImpl.java:197)
at org.semanticweb.owlapi.owllink.OWLlinkHTTPXMLReasoner.performRequests(OWLlinkHTTPXMLReasoner.java:462)
at org.semanticweb.owlapi.owllink.OWLlinkHTTPXMLReasoner.performRequest(OWLlinkHTTPXMLReasoner.java:466)
at org.semanticweb.owlapi.owllink.OWLlinkHTTPXMLReasoner.performRequestOWLAPI(OWLlinkHTTPXMLReasoner.java:480)
at org.semanticweb.owlapi.owllink.OWLlinkHTTPXMLReasoner.isConsistent(OWLlinkHTTPXMLReasoner.java:144)
at tester.test2(tester.java:68)
at tester.main(tester.java:142)
thanks alot
Another issue is given the following code:
…
CreateKB createKB = new CreateKB();
KB kb = reasoner.answer(createKB);
IRI kbIRI = kb.getKB();
Tell tell = new Tell(kbIRI, otherOntology.getAxioms());
OK ok = reasoner.answer(tell);
System.out.print("knowledge base tell (");
Iterator<OWLAxiom> iter = tell.iterator();
while (iter.hasNext()) System.out.print(iter.next());
System.out.println(") response = " + ok.getWarning());
GetDescription rdesc = new GetDescription();
Description desc = reasoner.answer(rdesc);
Iterator<PublicKB> i = desc.getPublicKBs().iterator();
while(i.hasNext()) System.out.println("Description: " + desc.getMessage() + i.next());
GetSubClassHierarchy request = new GetSubClassHierarchy(kbIRI);
System.out.println("knowledge base IRI = " + request.getKB()); //same as kbIRI
ClassHierarchy hierarchy = reasoner.answer(request);
System.out.println("Warning: " + hierarchy.getWarning());
Node<OWLClass> topNode = reasoner.getTopClassNode();
System.out.println("Realized Hierarchy:");
example8.print(topNode, reasoner, 0);
ReleaseKB releaseKB = new ReleaseKB(kbIRI);
ok = reasoner.answer(releaseKB);
System.out.println("knowledge base release response = " + ok.getWarning());
I get the following output (please see my comments within):
Ontology(<http://default> )
Ontology(<owled> )
knowledge base tell (SubClassOf(<http://owled#B> <http://owled#A>)) response = null
name: HermiT-OWLlink:1.1.0 on OwlLink:1.0 //that should be Hermit 1.2.4 and OwlLink 1.0.2
knowledge base IRI = http://owllink.org#org.semanticweb.owlapi.owllink.server.OWLlinkReasonerBridge.kb1283922520612 // is this malformed?
Warning: null
Realized Hierarchy:
{owl:Thing}-> {::} //that should include SubClassOf(<http://owled#B> <http://owled#A>)
knowledge base release response = null
the realized hierarchy should be as follows since I have a Tell that should add this to the KB:
{owl:Thing}-> {::}
{<http://owled#A>}-> {::}
{<http://owled#B>}-> {::}
It works fine if I add the axioms directly to the ontology before calling createReasoner(ontology) rather than through Tell. am I doing something wrong?
thanks again