If you're processing OWL ontologies, then you should consider take a
look at OntModel.loadImports [1], noting that it calls
OntDocumentManager.loadImports(OntModel) [2].  You'll want to make
sure that import processing is enabled;  you can enable it with
OntDocumentManager.setProcessImports [3].  You should just be able to
load the ontology and have its imports processed automatically.

[1] 
http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/ontology/OntModel.html#loadImports()
[2] 
http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/ontology/OntDocumentManager.html#loadImports(com.hp.hpl.jena.ontology.OntModel)
[3] 
http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/ontology/OntDocumentManager.html#setProcessImports(boolean)

On Wed, Jan 29, 2014 at 3:52 AM, Iturraspe Barturen, Urtza
<[email protected]> wrote:
> Thanks for your answer.
>
> I think that my problem is in the process of importing ontologies using 
> OntDocumentManager.
> ¿Someone use something like this for importing ontologies that are imported 
> in a root ontology?, I need to get all the information from all ontologies 
> and using
> "Model.read " I only have information related root ontology.
>
>
>
> Thanks in advance.
>
> Urtza Iturraspe
>
>
> -----Mensaje original-----
> De: Joshua TAYLOR [mailto:[email protected]]
> Enviado el: martes, 28 de enero de 2014 17:02
> Para: [email protected]
> Asunto: Re: Import ontology information and imports ontology information
>
> On Tue, Jan 28, 2014 at 10:00 AM, Iturraspe Barturen, Urtza 
> <[email protected]> wrote:
>>
>> This is my code. I get it, I obtain all the classes, properties,
>> individuals from all ontologies  but when I translate the model to an
>> owl file I can’t open this with an ontology editor (Neon…)
>>
>> Someone has any idea?
>
> You didn't how the OWL ontology that you're generating, so it's not really 
> clear whether it an OWL ontology editor _should_ be able to open it or not.  
> Can you show that?  If it's a legal OWL document, or if you can open it in 
> other editors (e.g,. Protégé), then this sounds more like a question for the 
> Neon mailing list than the Jena mailing list. Have you tried running the 
> document through an OWL validator?
>
>
> --
> Joshua Taylor, http://www.cs.rpi.edu/~tayloj/



-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

Reply via email to