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-owl] createJenaOWLModelFromInputStream

Timothy Redmond tredmond at stanford.edu
Sun Apr 15 10:52:59 PDT 2007


I would have to see the ontology but the problem appears to happen  
with the imports.  It looks like Protege is trying to find one of the  
imported ontologies on the network.  Now since you say that you  
created the ontologies in Protege, the probable cause is that the  
call you are  using does not use the Protege repository mechanism to  
find the local file for the imported ontologies (see http:// 
protege.cim3.net/cgi-bin/wiki.pl?OWL_Imports_Repositories).  But a  
method that works is to load the protege Project and then get the  
knowledge base from that :

     Project project = new Project("/Users/tredmond/dev/ontologies/ 
tmp/B.pprj", errors);
     OWLModel om = (OWLModel) project.getKnowledgeBase();

-Timothy



On Apr 13, 2007, at 7:43 AM, Oscar Pereira wrote:

> Hi,
>
>
>
> I have created a simple OWL ontology in Protégé 3.2.1.
>
>
>
> Now I am trying to load it using the OWL API
>
>
>
> File  f =  new File( "D:/oscar/projectos/protege/AT.owl");
>
> FileInputStream fin = new FileInputStream(f);
>
> OWLModel om = ProtegeOWL.createJenaOWLModelFromInputStream(fin);
>
>
>
> I get the following message:
>
>
>
> INFO: Loading triples
>
> SEVERE: Exception caught -- java.net.ConnectException: Connection  
> timed out: connect
>
>       at java.net.PlainSocketImpl.socketConnect(Native Method)
>
>       at java.net.PlainSocketImpl.doConnect(Unknown Source)
>
>       at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
>
>       at java.net.PlainSocketImpl.connect(Unknown Source)
>
>       at java.net.Socket.connect(Unknown Source)
>
>       at java.net.Socket.connect(Unknown Source)
>
>       at sun.net.NetworkClient.doConnect(Unknown Source)
>
>       at sun.net.www.http.HttpClient.openServer(Unknown Source)
>
>       at sun.net.www.http.HttpClient.openServer(Unknown Source)
>
>       at sun.net.www.http.HttpClient.<init>(Unknown Source)
>
>       at sun.net.www.http.HttpClient.New(Unknown Source)
>
>       at sun.net.www.http.HttpClient.New(Unknown Source)
>
>       at  
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient 
> (Unknown Source)
>
>       at sun.net.www.protocol.http.HttpURLConnection.plainConnect 
> (Unknown Source)
>
>       at sun.net.www.protocol.http.HttpURLConnection.connect 
> (Unknown Source)
>
>       at sun.net.www.protocol.http.HttpURLConnection.getInputStream 
> (Unknown Source)
>
>       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.JenaOWLModel.load 
> (Unknown Source)
>
>       at  
> edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromInputSt 
> ream(Unknown Source)
>
>       at ontolgy.clsCreateAnatomyOntology.readIt 
> (clsCreateAnatomyOntology.java:114)
>
>       at ontolgy.clsCreateAnatomyOntology.main 
> (clsCreateAnatomyOntology.java:104)
>
>
>
>
>
>
>
> Can anyone help me.
>
>
>
> Thank you.
>
>
>
> __________________________________
>
>
>
> Óscar Pereira
>
> __________________________________
>
>
>
>   IEETA - Universidade de Aveiro
>
>                3810-193 Aveiro, Portugal
>
>   Tel. + 351 234 370 500, ext: 24129
>
> ___________________________________
>
>
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/ 
> faq.html#01a.03




More information about the protege-owl mailing list