Difference between revisions of "ChAO API"

From Protege Wiki
Jump to: navigation, search
(The ChAO KB Manager)
Line 5: Line 5:
 
Other relevant documentation: the [[Changes_Tab| Changes Tab]], the [http://bmir.stanford.edu/publications/view.php/supporting_collaborative_ontology_development_in_protege Collaborative Protege paper], the [http://bmir.stanford.edu/publications/view.php/a_framework_for_ontology_evolution_in_collaborative_environments paper describing the Changes and Annotation ontology].
 
Other relevant documentation: the [[Changes_Tab| Changes Tab]], the [http://bmir.stanford.edu/publications/view.php/supporting_collaborative_ontology_development_in_protege Collaborative Protege paper], the [http://bmir.stanford.edu/publications/view.php/a_framework_for_ontology_evolution_in_collaborative_environments paper describing the Changes and Annotation ontology].
  
The change tracking information and annotation of ontology entities and changes is stored as instances of the '''Changes and Annotation Ontology (ChAO)'''. This wiki page shows how to access this information programmatically.
+
The change tracking information and annotation of ontology entities and changes is stored as instances of the '''Changes and Annotation Ontology (ChAO)''', called the '''ChAO KB'''. This wiki page shows how to access this information programmatically.
  
 
== The ChAO KB Manager ==
 
== The ChAO KB Manager ==
  
One of the most important classes is the <code> edu.stanford.bmir.protegex.chao.ChAOKbManager</code> found in the change-model.jar from the edu.stanford.smi.protegex.changes plugin folder.
+
One of the most important classes is the <code> edu.stanford.bmir.protegex.chao.ChAOKbManager</code> found in the <code>change-model.jar</code> from the edu.stanford.smi.protegex.changes plugin folder. It contains methods for creating and retrieving the ChAO KB for different modes: stand-alone, multi-user client and multi-user server. All code should use the method:
 +
 
 +
public static KnowledgeBase getChAOKb(KnowledgeBase kb)
 +
 
 +
to get access to the ChAO KB associated to kb.
 +
 
 +
You may also create the ChAO KB. To create a ChAO KB stored in RDF(S) files (default option), call:
 +
 
 +
public static KnowledgeBase createRDFFileChAOKb(KnowledgeBase kb, URI chaoURI) {
 +
 
 +
To create the ChAO KB stored in a database, call:
 +
 
 +
public static KnowledgeBase createDbChAOKb(KnowledgeBase kb, URI chaoURI, String dbDriver, String dbUrl, String dbTable, String dbUser, String dbPassword)
 +
 
  
 
== Accessing the annotation information ==
 
== Accessing the annotation information ==
 +
 +
  
 
== Accessing the changes information ==
 
== Accessing the changes information ==

Revision as of 16:45, October 24, 2008

Accessing the collaboration features programatically (The Changes and Annotations API)

Protege provides support for collaboration through the Collaborative Protege extension: e.g., tracking changes, annotating ontology components (classes, properties, etc.) or changes (creation of a class). This wiki page describes how to access the change tracking and the annotation information programatically.

Other relevant documentation: the Changes Tab, the Collaborative Protege paper, the paper describing the Changes and Annotation ontology.

The change tracking information and annotation of ontology entities and changes is stored as instances of the Changes and Annotation Ontology (ChAO), called the ChAO KB. This wiki page shows how to access this information programmatically.

The ChAO KB Manager

One of the most important classes is the edu.stanford.bmir.protegex.chao.ChAOKbManager found in the change-model.jar from the edu.stanford.smi.protegex.changes plugin folder. It contains methods for creating and retrieving the ChAO KB for different modes: stand-alone, multi-user client and multi-user server. All code should use the method:

public static KnowledgeBase getChAOKb(KnowledgeBase kb)

to get access to the ChAO KB associated to kb.

You may also create the ChAO KB. To create a ChAO KB stored in RDF(S) files (default option), call:

public static KnowledgeBase createRDFFileChAOKb(KnowledgeBase kb, URI chaoURI) {

To create the ChAO KB stored in a database, call:

public static KnowledgeBase createDbChAOKb(KnowledgeBase kb, URI chaoURI, String dbDriver, String dbUrl, String dbTable, String dbUser, String dbPassword)


Accessing the annotation information

Accessing the changes information