On 24/04/13 04:24, Léonard PETNGA wrote:
Hi Ian!
Thank you for your prompt response to my email. I didn't mention it but, as
far as my objectives are concerned, my 2 questions are not related. These
are some clarifications to my initial post.
Q1: I just wanted to  know whether it's possible to create the the owl file
  from the java version of the ontology since I was programatically
  creating it in jAVA.  Thank you for letting me know about Jena's schemagen
tool. I'll keep that in mind.
OK. To clarify: schemagen takes an OWL file and creates a corresponding Java file with constants that correspond to the classes, properties and individuals in the ontology. It does not go from Java to OWL, but vice versa.

Q2: I have  decided to encode the ontologies in Java because I wasn't able
to programatically access and modify the owl file  after being loaded.
Um, I'm not sure I understand this. Programatically accessing and modify RDF and OWL is what Jena does.

Specifically, i wanted to be able to create individuals, delete/add
classes, statements and properties to the loaded owl ontology model
directly from the java file.
Yep, Jena does that.

Jena and Eclipse were unable to recognize
ontology's entities and wanted them to be declared as local variable,
Having Java constants that correspond to OWL or RDFS resources is exactly the problem that schemagen solves.

thus
the duplicate elements i mentioned previously.
But now I'm lost.

Being able to merge those
ontologies from the Java encoding directly would also save me a lot of time
and energy as I've already put a lot of effort in coding the ontology in
java. So there is no way to merge my java encoding ontologies as I
mentioned in my initial post?
Sorry, but you're doing something that no-one else that I know of is doing. You're on your own, I'm afraid! I suppose you *could* download a Java parser, parse your .java files and generate a new file with the merged definitions in. Personally I wouldn't go there, but it's your call.

Note: I have developed several built-ins that are being used by my reasoner
for inferencing applied to the base ontology created in java. The java
encoding allows me to test those built-ins separately before integrating
them in with rule engine something I can't do if the original ontologies
are in owl (I mean I don't know how to do it - any idea will be welcome
though).
I don't understand enough of what you're trying to do to offer any useful comments. If you wanted to create a *minimal* complete example of what you're trying to do, we could maybe offer more advice.

Ian

Reply via email to