api - Importing owl files -
I have a problem importing Oval files using Oval API in Java I have successfully imported 2 OWL files However, a problem occurs when I try to import 3 or more OWL files which are integrated for each other.
Base. OWL - Base Autology Electronics . OLL - Electronics otology which base oval telephone Owl imports - Telephone otology which base Oll and electronics import OOLL
When I just import base.owl and run electronics, it works smoothly. Code is given below:
file filebase = new file ("filepath / base.owl"); File file = new file ("file path / electronic."); IriMapper on Simple Iriti = New Simple IIRM (Create IRI ("url / base.owl"), IRI.Credit (filebase); Ollantology Manager Manager = OWLManager.createowLOntologyManager (); Manager.addIRIMapper (iriMapper); Ovlontology ont = manager.loadOntologyFromOntologyDocument (FileElectronic);
However, when I telephone. I want to load the OLL, then I just connect the manager to an additional eriimapar. Additional code is shown with **:
file fileBase = new file ("filepath / base.owl"); File file = new file ("file path / electronic."); ** File file telephone = new file ("FilePath / Telephone.uvl"); ** IriMapper = Simple UIIcreate (IRI.create ("url / base.owl"), IRI.create (fileBase) on Simple Iri; ** SimpleIRIMapper iriMapper2 = New SimpleIRIMapper (IRI.create ("url / electronic.owl"), IRI.create (fileElectronic)); ** OWLOntologyManager Manager = OWLManager.createowLOntologyManager (); Manager.addIRIMapper (iriMapper); ** manager.addIRIMapper (iriMapper2); ** Ovlontology ont = manager.loadOntologyFromOntologyDocument (** fileTelephone **);
The code shown above returns this error:
Import could not be loaded: import (url / electronic.owl> : Imported Otolology could not be loaded: & lt; Url / base.owl & gt; Reason: zero
This will be really appreciated, if someone gives me a hand ... thank you in advance ...
I know that this question is outdated, but it was my first hit on Google serching for a similar problem (loading multiple owl-imports). And I need a lot of time to find answers.
For all those people who will say ovalp: "imported otology could not be loaded": a utility-category "auto-ramper" , as described in OvalPo: ) Once an example of "AutoIRIMapper" has been created, it can be added to "Ovallostestist Manager" using the following code:
"manager.addIRIMapper (autoIRIMapper);"
After this, Ovalotologist manager will automatically be able to load all imported owl-files.
I hope someone will help.
Comments
Post a Comment