querying remote ontology

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

querying remote ontology

Rajverma

Hi List,

 

At http://protege.stanford.edu/plugins/owl/api/ReasonerAPIExamples.html, in the following two statements,

 

            final String ONTOLOGY_URL = "http://www.co-ode.org/ontologies/pizza/pizza_20041007.owl"; 
            final String REASONER_URL = "http://localhost:8080"; 

 

it says that we can use the local reasoner to classify and query an ontology that is located at a different public domain… is that correct? I tried to classify a local ontology, with my reasoner that is located remotely…

 

My file includes the following statements that replace the above ones…

 

final String ONTOLOGY_URL = "file:///C:/Programme/Protege_3.2_beta/examples/pizza/pizza.owl";

final String REASONER_URL = "http://125.12.163.221:8080";

 

With these statements I can classify a local ontology with remote reasoner… however, when I try to classify a remote ontology with a remote reasoner, for example,

 

final String ONTOLOGY_URL = " http://www.co-ode.org/ontologies/pizza/pizza_20041007.owl ";

final String REASONER_URL = "http://125.12.163.221:8080";

 

then I’m getting the following errors in my Eclipse console…

 

Loading triples

Fatal Error

org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.

      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

      at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)

      at org.apache.xerces.impl.XMLScanner.scanExternalID(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentScannerImpl.scanDoctypeDecl(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

      at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.parse(RDFXMLParser.java:106)

      at com.hp.hpl.jena.rdf.arp.ARP.load(ARP.java:143)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser$1.invokeARP(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.load(Unknown Source)

      at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)

      at ReasonerExample.main(ReasonerExample.java:34)

java.lang.NullPointerException

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.createDefaultNamespace(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.load(Unknown Source)

      at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)

      at ReasonerExample.main(ReasonerExample.java:34)

 

 

So could someone tell me how cud we do this!

 

Thanx,

Raj

Reply | Threaded
Open this post in threaded view
|

Re: querying remote ontology

Nick Drummond
Raj,

Haven't you got additional spaces around the ontology URI??
It might just be my mail client

Nick

On 9 May 2006, at 17:46, Mudunuri, Raj wrote:

http://www.co-ode.org/ontologies/pizza/pizza_20041007.owl

Reply | Threaded
Open this post in threaded view
|

AW: Re: querying remote ontology

Rajverma
In reply to this post by Rajverma

Hi Nick,

 

Which additional spaces do you mean? I’m using the example from http://protege.stanford.edu/plugins/owl/api/ReasonerAPIExamples.html as it is... If you mean the space between pizza and 20041007 in the URI from your mail, then I believe it is an underscore that is hidden in the underline…

 

Actually I want to know how could we point to an ontology that is located in another computer in my LAN... For example, instead of final String REASONER_URL = "http://localhost:8080"; for pointing to a local reasoner we can use final String REASONER_URL = "121.23.54.124:8080"; for pointing the reasoner that is located on my server; similarly how can we do that for a remote ontology?

 

I tried with

 

final String ONTOLOGY_URL = "file:///C:/Programme/Protege_3.2_beta/examples/pizza/pizza.owl";

final String REASONER_URL = "http://121.23.54.124:8080";

 

and it works fine… but when I replace "file:///C:/Programme/Protege_3.2_beta/examples/pizza/pizza.owl"; with "http://www.co-ode.org/ontologies/pizza/pizza_20041007.owl"; then I get the following error…

 

Loading triples

Fatal Error

org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.

      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

      at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)

      at org.apache.xerces.impl.XMLScanner.scanExternalID(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentScannerImpl.scanDoctypeDecl(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

      at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.parse(RDFXMLParser.java:106)

      at com.hp.hpl.jena.rdf.arp.ARP.load(ARP.java:143)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser$1.invokeARP(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.load(Unknown Source)

      at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)

      at ReasonerExample.main(ReasonerExample.java:34)

java.lang.NullPointerException

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.createDefaultNamespace(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)

      at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.load(Unknown Source)

      at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)

 

 

(Well, the “Fatal Error org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.

occurs even when I use my local ontology but it does answer the query without any further problems though… this White spaces error is being produced only for the pizza example but not for other ontologies of mine…)

 

But my current problem is only with the remote ontologies… I want to know why is not working when I’m pointing to the "http://www.co-ode.org/ontologies/pizza/pizza_20041007.owl"; ontology? I also want to know how we can point to an ontology which is not on an http server but on a D drive of my remote LAN server…

 

Cheers,

Raj

 

 

 


Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Nick Drummond
Gesendet: Mittwoch, 10. Mai 2006 19:36
An: [hidden email]
Betreff: [protege-owl] Re: querying remote ontology

 

Raj,

 

Haven't you got additional spaces around the ontology URI??

It might just be my mail client

 

Nick

 

On 9 May 2006, at 17:46, Mudunuri, Raj wrote:



http://www.co-ode.org/ontologies/pizza/pizza_20041007.owl