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] Loading an ontology with imports

Tania Tudorache tudorache at stanford.edu
Fri Jan 4 14:02:14 PST 2008


Alexander,

After you create the 3rd ontology, you can add programmatically a folder 
repository:

File repositoryFolder = new File(pathToFolder);
owlModel.getRepositoryManager().addProjectRepository(new *LocalFolderRepository*(repositoryFolder));

You got a warning ("The specified file must be a directory. ") that 
indicates that you did not set up your development environment 
correctly. You need to add a jvm argument when you run your application:

-Dprotege.dir=path_to_the_protege_install_dir

Tania



Alexander Musidlowski wrote:
> Hi ,
>
> i´ve got two ontologies. I created a third ontology which imports the
> first two ontologies and creates a mapping between these two.
> Now i try to load programmatically the third ontology.
> But then i get these warnings:
>
> WARNING: [Local Folder Repository] The specified file must be a directory. (...\Tutorial - Protege OWL\plugins\edu.stanford.smi.protegex.owl) --LocalFolderRepository.update()INFO: Loading triplesINFO: Start processing ontology: http://dummy-ontologies.com/dummy.owl Time: Fri Jan 04 15:12:24 CET 2008
> WARNING: The system cannot find the ontology http://www.owl-ontologies.com/2007/12/22/Buch.owl in any of the repositories. This import will be ignored. -- UnresolvedImportUIHandler.handleUnresolvableImport()
> WARNING: [ProtegeOWLParser] Warning: Ignoring import http://www.owl-ontologies.com/2007/12/22/Buch.owl -- DefaultProtegeOWLParserLogger.logWarning()
> WARNING: The system cannot find the ontology http://www.owl-ontologies.com/2007/12/22/book.owl in any of the repositories. This import will be ignored. -- UnresolvedImportUIHandler.handleUnresolvableImport()
> WARNING: [ProtegeOWLParser] Warning: Ignoring import http://www.owl-ontologies.com/2007/12/22/book.owl -- DefaultProtegeOWLParserLogger.logWarning()
>
> The ontology in the warnings are the imported ones. How do i get these
> ontologies loaded? The problem is, i don´t know these ontologies (when
> the program runs) before loading the third ontology. I only know in
> which folder there will be. Does it suffice to specify the Local
> Folder Repository? How i´m doing this?
>
>
> String map = ".../Ontologien/mapping.owl";
> File file = new File( map );
> FileInputStream is;
> try {
>      is = new FileInputStream(file);
>      JenaOWLModel owlModel = ProtegeOWL.createJenaOWLModelFromInputStream(is);
>     }
> catch (Exception e) {
>          throw new CmdException("Error reading map file", e); 
>     }
>      
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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