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] Coding Practices for Factory Methods and Classes for creating OWL Projects

John Betts john at globalholdings.org
Sun Mar 22 23:29:15 PDT 2009


I have written code to construct an OWL Model from scratch in Java  
against an existing Protege OWL Project with a database back-end  
connecting to a Protege RMI server hosting the project.

Right now it is an inelegant class called BuildOntology.java that, in  
order, creates the OWL Classes for Objects and Properties.

I was comparing the approach I took for the sake of expediency and  
compared it to the Factory Class and Individual Classes auto-generated  
using the Protege Java Code Generator.

I am looking to solicit feedback on coding practices for Creating OWL  
Projects and respective Classes (Not Individuals).

Would it make sense to:
1) add createClass() methods to the Factory (and Associated Individual  
Java Classes)
or
2) to create a separate Factory and Classes for the creation of OWL  
Classes ?

Right now, to create a new OWL Class, I use
OWLNamedIndividual myClass = owlModel.CreateOWLNamedClass("MyClass");

The Protege Generated Java Classes create OWLIndividual based Objects.

My Code has create, load and delete methods.

The create method has three steps:
1) Generate OWL Classes
2) Generate OWL Properties (Annotations, Data, Object Relationships)
3) Configure / Associate Classes and Properties (e.g. set Parents,  
inverse, range, domain, values, etc. as required)

Thanks in advance
JB

P.S. If any one is curious as to why I am doing this, it is because I  
need to import data from an external data-set, and need to auto- 
generate the Classes and Individuals as appropriate to map this  
external data.



More information about the protege-owl mailing list