Search Mailing List Archives
[protege-owl] How to programmatically and transparently create new Ontologies/TripleStores related to existing one?
tudorache at stanford.edu
Wed Mar 25 18:10:50 PDT 2009
The answer to your question is yes, you can create in the background any
ontology, even if the GUI has another one loaded. This is exactly what
the Change Management Tab (CMT) and Collaborative Protege (CP) are
doing. In fact, what you are trying to do seems to be very similar to
the functionality that is already available in Protege. Rather than
implementing everything from the beginning, you could take a look
whether you can extend what is already there. The CMT and CP stores
metadata about instance creation, etc. and all other events in a
separate RDF ontology as instances. You can take a look at CP  and
CMT . They are open source and well maintained.
The metadata ontology that CP and CMT are using is the Changes and
Annotation ontology (ChAO) and can be found in the change_management
plugin folder of your protege installation. It can be easily extended to
support other types of metadata.
If you want to create your own ontology in the code, just create a new
OWL model, for example by using:
If you are starting a new development, it is better to base it on
Protege 4, if possible.
Simon Paradies wrote:
> Hi all,
> In my project, I want to be able to store meta information about arbitrary
> instances (e.g., defined in an ontology denoted [instances]) using a second
> ontology [instance_meta] in which the meta information is stored (instances and
> their metadata should be stored separately).
> A user loads an arbitrary ontology and creates instances that are stored in
> [instances]. When she adds meta information, it should be stored in the meta
> ontology [instance_meta]. Since the meta ontology in the first place is not
> there, it needs to be created first. This should be done without user
> intervention, i.e. by taking the name of [instances] and just adding a fixed
> suffix (e.g. [instance_meta]).
> Is there some way (interface) that supports the creation of ontologies
> (corresponding to already existing ones as described above) regardless of the
> underlying storage backend (file or DB) used for the [instances] ontology?
> Any solutions on how to create a new TripleStore (related to an already
> existing one as described above) programmatically?
> After searching the NG and also looking at the sources, I thought maybe
> TripleStoreModel.createActiveImportedTripleStore() could be the right place to
> start with. Is there some more documentation on it?
> P.S.: Using the GUI, I was unable to create a new empty import for both, an
> ontology that is based on files and an ontology that uses the DB backend.
> In the first case, after selecting an OWL file to store the new import, Protégé
> complained that it could not find the ontology and requests to add an ontology
> repository. However, whatever option I tried to point to the new import,
> Protégé complained that it could not find it.
> In the second case, after selecting an OWL file to store the new import I got:
> SEVERE: Exception caught -- java.lang.ClassCastException:
> edu.stanford.smi.protegex.owl.database.OWLDatabaseModel cannot be cast to
> at edu.stanford.smi.protege.util.Wizard$1.actionPerformed
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
More information about the protege-owl