Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Fwd: problems importing an OWL ontology

Thomas Russ tar at ISI.EDU
Wed Jul 18 09:59:28 PDT 2007


On Jul 18, 2007, at 4:41 AM, Alexandre Vidal wrote:

>
> Hi, everybody.
>
> I am  having troubles when loading a OWL ontologies that imports  
> other OWL ontology.
> The problem does not happen whit an ontology that does not use the  
> import mechanism.
> I have no troubles when using Protégé-OWL. I even got inferred  
> class hierarchies of both the ontologies.

Well, when I try to access the imported ontology you reference using  
a web browser, I get a not found error.  So it looks like the  
ontology you want to import is not there.

>
>
> Loading triples
> SEVERE: Exception caught -- java.io.FileNotFoundException: http:// 
> www.deinf.ufma.br/~vidal/GO/Ontology1184719492.owl ( the imported  
> ontology)
>     at sun.net.www.protocol.http.HttpURLConnection.getInputStream 
> (HttpURLConnection.java:1172)
>     at  
> edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.getInputStr 
> eam(Unknown Source)
>     at  
> edu.stanford.smi.protegex.owl.repository.impl.HTTPRepository.update 
> (Unknown Source)
>     at  
> edu.stanford.smi.protegex.owl.repository.impl.HTTPRepository.<init> 
> (Unknown Source)
>     at  
> edu.stanford.smi.protegex.owl.repository.RepositoryManager.getReposito 
> ry (Unknown Source)
>     at  
> edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.getReposito 
> ry(Unknown Source)
>     at  
> edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.runImport 
> (Unknown Source)
>     at  
> edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.processImpo 
> rts(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 com.demo.application.OWLAPIDemoApplication.main 
> (OWLAPIDemoApplication.java:30)
>
> I am only testing and both the ontologies have only one class. I  
> use this code copied and adapted from
> The Protégé-OWL API Programmer's Guide.
>
> public class OWLAPIDemoApplication {
>     public static void main(String[] args) {
>         final String ONTOLOGY_URL = " http://www.deinf.ufma.br/ 
> ~vidal/GO/client.owl";
>          final String REASONER_URL = "http://localhost:8081 ";
>         try {
>             JenaOWLModel gridOwlModel =  
> ProtegeOWL.createJenaOWLModelFromURI(ONTOLOGY_URL);      // LINE ERROR
>             ReasonerManager reasonerManager =  
> ReasonerManager.getInstance();
>             ProtegeOWLReasoner reasoner =  
> reasonerManager.getReasoner (gridOwlModel);
>             //    Set the reasoner URL and test the connection.
>             reasoner.setURL(REASONER_URL);
>
>             if (reasoner.isConnected()) {
>                 DIGReasonerIdentity reasonerIdentity =  
> reasoner.getIdentity();
>                 System.out.println("Connected to " +  
> reasonerIdentity.getName() + " " +
>                         reasonerIdentity.getVersion());
>
>                 //    We can classify the whole ontology, which  
> will put the
>                 //    inferred class hierarchy information directly  
> into the Protégé-OWL model.
>                 System.out.println("Classifying taxonomy...");
>                 reasoner.classifyTaxonomy (null);
>                 System.out.println("...Classified taxonomy!");
>             }
>             else {
>                 System.out.println("Reasoner not connected!");
>             }
>         } catch (Exception e) {
>             // TODO Auto-generated catch block
>             e.printStackTrace();
>         }
>
> Could someone please help me?
> Thanks.
>
> Alexandre
>
>
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/ 
> faq.html#01a.03




More information about the protege-discussion mailing list