Version 6 (modified by shan, 5 years ago) (diff)


Sample Ontology

General Information

GRITS has a sample entry. This entry provides tools for management of sample related information. This entry is contributed and managed by Sample Plugin. The Sample plugin defines the properties of sample entry and its related information. This plugin also adds an editor for sample entry to display or modify sample information. The object representing a sample is stored in a .xml file. Read this to learn more about Sample object. This object has a predefined model that is stored in the ontologies.

Currently there are two ontologies for sample

  • Standard ontology
    • stores information related to samples that is to be used by the sample plugin
  • Local ontology
    • an additional ontology that has the same structure as the Standard ontology and has no additional information when GRITS is installed initially. When GRITS is used on a system, the information that is generated and saved is saved locally in this ontology.

Classes that manage ontologies in Sample plugin are first supposed to look into the Standard ontology for any information and if some information is missing or additional information is required then it should look into the Local ontology.

The Sample plugin cannot modify ontologies, except for creating templates in the local ontology. There is another Sample Manager Plugin that is used for editing information stored in the ontologies.

Ontology Structure

Each of the ontology (Standard and Local ontology) have the structure as shown below:

Sample Ontology

For more details also look into the owl files in the sample plugin.

Classes in Sample plugin for Ontology management

Sample plugin can only read from the two ontologies. It can also create templates in the local ontology. Reading and template creation is managed by the following classes that are in the ontologymanager package :

  • ISampleOntologyApi
    • interface that defines the public APIs to be provided by SampleOntologyApi class
  • SampleOntologyApi
    • implements the public methods defined in ISampleOntologyApi
    • calls methods from SampleOntologyManager class to read/write information in ontologies
  • SampleOntologyManager
    • uses Jena Ontology API to read/write information in ontologies
    • only protected and private methods
    • used by upper layer classes in the same package

Read Javadocs to learn more about specific methods

Sample Manager Plugin

This Sample Manager plugin is an additional plugin that can be used to edit information stored in ontologies. This plugin can modify both standard and local ontologies. It has two modes of operation :

  • User Mode
    • it displays both Standard and Local ontology
    • in this mode only local ontology can be modified
  • Admin Mode
    • only displays Standard ontology
    • in this mode only Standard ontology can be modified

Updating ontologies

You can directly modify the ontologies that are there in the ontology folder of the org.grits.toolbox.entry.sample plugin. After updating an ontology submit it to the svn.

You can also use the Sample Manager plugin to modify the ontologies. For modifying using the Sample Manager, follow the steps described below :

  • Clean the GRITS Sample config folder (.grits-toolbox/org.grits.toolbox.entry.sample folder in the home directory)
    • this would ensure that there are no previous local changes prior to modifying the ontology
  • Start a GRITS product that has the Sample Manager plugin
    • currently "" product file has the Sample Manager plugin while the "Grits.all.product" product file does not include this plugin
  • After GRITS is started
    • use menu Manager->User Mode to modify the Local ontology
    • use menu Manager->Admin Mode to modify the Standard ontology
  • Save the changes in the editor
    • changes would be saved in the ontologies of GRITS Sample config folder (.grits-toolbox/org.grits.toolbox.entry.sample folder in the home directory)
      • when GRITS is started and it does not find the ontologies in the GRITS Sample config folder then it copies the two ontologies from sample plugin to GRITS Sample config folder
  • Copy back the ontologies from GRITS Sample config folder (.grits-toolbox/org.grits.toolbox.entry.sample folder in the home directory) to ontology folder of the "org.grits.toolbox.entry.sample" plugin
  • Update the files to svn

Attachments (2)

Download all attachments as: .zip