org.dbe.studio.tools.ontologyviewer.views
Class OntologyViewer

java.lang.Object
  extended byorg.eclipse.ui.part.WorkbenchPart
      extended byorg.eclipse.ui.part.ViewPart
          extended byorg.dbe.studio.tools.ontologyviewer.views.OntologyViewer
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, IRunner, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation

public class OntologyViewer
extends org.eclipse.ui.part.ViewPart
implements IRunner

The main view of the OntologyViewer


Nested Class Summary
protected  class OntologyViewer.AvailableOntology
           
(package private)  class OntologyViewer.DoubleClickListener
          Inner class that implement the DoubleClickListener interface It is used in order to provide an 'interface' for the usage of the Ontology Viewer from other S/W components, e.g.
 
Field Summary
(package private)  org.eclipse.swt.widgets.TabFolder additionalInfoTabFolder
           
(package private)  org.eclipse.swt.widgets.Combo availableOntologies
           
(package private)  boolean connectionProblem
           
(package private)  java.lang.String fadaNodeAddress
           
(package private)  org.eclipse.swt.widgets.Button goSearch
           
static java.util.Vector listOfAvailableOntologies
           
(package private)  org.eclipse.jface.viewers.TreeViewer ontologyTreeViewer
           
(package private)  org.eclipse.swt.widgets.Text searchValue
           
 org.dbe.kb.service.KBI theKBIservice
           
(package private)  org.eclipse.swt.custom.SashForm theMainForm
           
 org.dbe.kb.mdrman.JMItool theODMtool
           
(package private)  OdmOntology theOntology
           
(package private)  OdmOntology theOntologyPart
           
(package private)  OntologyTree theTree
           
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
OntologyViewer()
          Default constructor
 
Method Summary
 void addOntologyTreeListener(IOntologyTreeListener listener)
          Adds a listener for double click event that correspond to the selection of an ontology class in this Ontology Viewer
protected  void clearView()
           
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
           
protected  void createSearchArea()
          It creates the Search area
protected  void createTreeViewArea()
          Create the Tree View area
protected  void getAvailableOntologies()
          It uses the ODM proxy and gets the names (URIs) of the available ontologies
static java.util.Vector getListOfAvailableOntologies()
           
 OdmOntology getOntology()
           
 void init(org.eclipse.ui.IViewSite site)
          Initializes this view with the given view site.
 java.lang.String readFADAinfo()
          It reads the Ontology Viewer property file
 void readOntology(java.lang.String ontName, java.lang.String ontID)
           
protected  void readOntologyClasses(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
          It reads the Ontology classes
protected  void readOntologyClassesSecond(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
          It reads the Ontology classes and class axioms
protected  void readOntologyDataRanges(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
          It reads the Ontology data ranges
protected  void readOntologyDatatypeProperties(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
          It reads the Ontology Datatype Properties
protected  void readOntologyDatatypePropertiesSecond(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
          It reads the Ontology Datatype Properties axioms
protected  void readOntologyIndividuals(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
          It reads the Ontology individuals
protected  void readOntologyObjectProperties(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
          It reads the Ontology ObjectProperties
protected  void readOntologyObjectPropertiesSecond(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
          It read the Ontology Object Properties axioms
 void removeOntologyTreeListener(IOntologyTreeListener listener)
          Removes a listener for double click event that correspond to the selection of an ontology class in the Ontology viewer
 java.lang.Object run()
           
protected  OdmOntology searchForOntologyConcept(java.lang.String key)
           
 void setFocus()
           
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, saveState, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, dispose, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

theKBIservice

public org.dbe.kb.service.KBI theKBIservice

theODMtool

public org.dbe.kb.mdrman.JMItool theODMtool

fadaNodeAddress

java.lang.String fadaNodeAddress

connectionProblem

boolean connectionProblem

ontologyTreeViewer

org.eclipse.jface.viewers.TreeViewer ontologyTreeViewer

theMainForm

org.eclipse.swt.custom.SashForm theMainForm

additionalInfoTabFolder

org.eclipse.swt.widgets.TabFolder additionalInfoTabFolder

listOfAvailableOntologies

public static java.util.Vector listOfAvailableOntologies

availableOntologies

org.eclipse.swt.widgets.Combo availableOntologies

searchValue

org.eclipse.swt.widgets.Text searchValue

goSearch

org.eclipse.swt.widgets.Button goSearch

theOntology

OdmOntology theOntology

theOntologyPart

OdmOntology theOntologyPart

theTree

OntologyTree theTree
Constructor Detail

OntologyViewer

public OntologyViewer()
Default constructor

Method Detail

init

public void init(org.eclipse.ui.IViewSite site)
          throws org.eclipse.ui.PartInitException
Initializes this view with the given view site. This method is automatically called by the workbench shortly after the part is instantiated. It marks the start of the views's lifecycle. Clients must not call this method.

Specified by:
init in interface org.eclipse.ui.IViewPart
Throws:
org.eclipse.ui.PartInitException

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart

run

public java.lang.Object run()
                     throws java.lang.Exception
Specified by:
run in interface IRunner
Throws:
java.lang.Exception

clearView

protected void clearView()

createSearchArea

protected void createSearchArea()
It creates the Search area


createTreeViewArea

protected void createTreeViewArea()
Create the Tree View area


getListOfAvailableOntologies

public static java.util.Vector getListOfAvailableOntologies()

setFocus

public void setFocus()
Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart

getAvailableOntologies

protected void getAvailableOntologies()
It uses the ODM proxy and gets the names (URIs) of the available ontologies


searchForOntologyConcept

protected OdmOntology searchForOntologyConcept(java.lang.String key)

readOntology

public void readOntology(java.lang.String ontName,
                         java.lang.String ontID)
                  throws javax.jmi.xmi.MalformedXMIException,
                         java.io.IOException
Parameters:
ontName -
ontID - It reads an ontology from the ODM repository. The way it reads from OMD and it creates the ontology has as follows:
Throws:
javax.jmi.xmi.MalformedXMIException
java.io.IOException

readOntologyClasses

protected void readOntologyClasses(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
It reads the Ontology classes

Parameters:
odmPackage -

readOntologyClassesSecond

protected void readOntologyClassesSecond(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
It reads the Ontology classes and class axioms

Parameters:
odmPackage -

readOntologyDataRanges

protected void readOntologyDataRanges(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
It reads the Ontology data ranges

Parameters:
odmPackage -

readOntologyIndividuals

protected void readOntologyIndividuals(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
It reads the Ontology individuals

Parameters:
odmPackage -

readOntologyObjectProperties

protected void readOntologyObjectProperties(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
It reads the Ontology ObjectProperties

Parameters:
odmPackage -

readOntologyObjectPropertiesSecond

protected void readOntologyObjectPropertiesSecond(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
It read the Ontology Object Properties axioms

Parameters:
odmPackage -

readOntologyDatatypeProperties

protected void readOntologyDatatypeProperties(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
It reads the Ontology Datatype Properties

Parameters:
odmPackage -

readOntologyDatatypePropertiesSecond

protected void readOntologyDatatypePropertiesSecond(org.dbe.kb.metamodel.odm.OdmPackage odmPackage)
It reads the Ontology Datatype Properties axioms

Parameters:
odmPackage -

addOntologyTreeListener

public void addOntologyTreeListener(IOntologyTreeListener listener)
Adds a listener for double click event that correspond to the selection of an ontology class in this Ontology Viewer

Parameters:
listener - an ontology tree viewer listener

removeOntologyTreeListener

public void removeOntologyTreeListener(IOntologyTreeListener listener)
Removes a listener for double click event that correspond to the selection of an ontology class in the Ontology viewer

Parameters:
listener - an ontology tree viewer listener

readFADAinfo

public java.lang.String readFADAinfo()
It reads the Ontology Viewer property file


getOntology

public OdmOntology getOntology()


Copyright © 2004-2005 Digital Business Ecosystem. All Rights Reserved.