Hello barkat,

On 26/03/11 02:25, barkat abdelbasset wrote:
Hi
I want to ask about
         OntModel model =
ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
          model.read
why model.read necessite internet connection

I'm going to have to take a guess here, since you don't really provide enough information, but there are two possibilities. First, if you call something like:

model.read( "http://example.com/ontology/foo"; );

then an HTTP get will be needed to retrieve the document from that URL.

Second possibility is that your ontology is being read from local disk, hence not requiring Internet access, but the ontology has one or more imported ontologies. E.g:

<owl:Ontology rdf:about="">
  <owl:imports rdf:resource="http://example.com/ontology/foo"; />
</owl:Ontology>

In this case, if you do not want the imported documents to be read automatically, set the import-documents flag to false:

    model.getDocumentManager().setProcessImports( false );

before you call model.read().

If neither of these explanations are helpful, you'll need to provide more information about your problem.

Ian


--
____________________________________________________________
Ian Dickinson                   Epimorphics Ltd, Bristol, UK
mailto:[email protected]        http://www.epimorphics.com
cell: +44-7786-850536              landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd.  is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
              Portishead, Bristol BS20 6PT, UK

Reply via email to