GATE
Version 3.1-2270

gate.creole.ontology
Interface OntologyEditor

All Superinterfaces:
FeatureBearer, NameBearer, Resource, Serializable, VisualResource
All Known Implementing Classes:
OntologyEditorImpl

public interface OntologyEditor
extends VisualResource

An interface defining the methods of an Ontology Editor.


Method Summary
 void addSubClass(ClassNode root, String className, String classComment)
          Adds Sub Class given a ClassNode and the resulting info from the Add Sub Class dialog.
 void addSubClass(int x, int y)
          Invokes an add sub class dialog in position x,y
 int AskWannaSave(Taxonomy o, int x, int y)
          Wanna Save Dialog invocation.
 void closeOntologies(Vector list)
          Closes list of ontologies
 void closeOntology(Taxonomy o, int x, int y)
          Closes an ontology.
 void createOntology(String name, String sourceURI, String theURL, String comment)
          Creates a new ontology
 void deleteOntology(Taxonomy o, int x, int y)
          Deletes an ontology.
 void editClassURI(TClass c, int x, int y)
          Edit the URI of an ontology class
 void editURI(Taxonomy o, int x, int y)
          Edits the URI of an ontology.
 void fileClose(int x, int y, Vector ontologies)
          Invokes a mutiple selection close dialog with a list of ontologies to be closed.
 void fileExit()
          Acts on choosing Exit from the File menu.
 void fileNew(int x, int y)
          Inovkes a new ontology dialog.
 void fileOpen(int x, int y)
          Acts on choosing Open from the File menu.
 void fileSave(int x, int y, Vector ontologies)
          Invoke a mutiple selection save dialog with a list of ontologies to be saved.
 Set getAllURIs()
          Gets all URIs that are present at the moment as ontology URIs.
 Set getAllURIs(Taxonomy o)
          Retrieve a set of all the class URIs in an ontology
 Vector getModifiedOntologies()
          Gets all modified ontologies.
 Taxonomy getOntology()
          Gets the loaded ontology
 Vector getOntologyList()
          Gets the list of ontologies currently in the editor
 void ontologySelected(Taxonomy o)
          Selects an ontology.
 void removeClass(ClassNode node)
          Removes the node/class
 void renameClass(TClass c, ClassNode n, int x, int y)
          Renames a class
 void renameOntology(Taxonomy o, int x, int y)
          Renames an ontology
 void saveAsOntology(Taxonomy o, int x, int y)
          Invokes a Save As dialog for this ontology and saves it to the specified location.
 void saveOntologies(Vector list)
          Saves a list of ontologies.
 void saveOntology(Taxonomy o)
          Saves this ontology
 void setOntology(Taxonomy o)
          Sets the ontology to be loaded in the editor
 void setOntologyList(Vector list)
          Sets the list of ontologies to be loaded in the editor
 void visualize()
          Visualizes the editor
 
Methods inherited from interface gate.VisualResource
setHandle, setTarget
 
Methods inherited from interface gate.Resource
cleanup, getParameterValue, init, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 

Method Detail

createOntology

void createOntology(String name,
                    String sourceURI,
                    String theURL,
                    String comment)
                    throws ResourceInstantiationException
Creates a new ontology

Parameters:
name - the name of the ontology
sourceURI - the URI of the ontology
theURL - the URL of the ontology
comment - ontology comment
Throws:
ResourceInstantiationException

setOntology

void setOntology(Taxonomy o)
Sets the ontology to be loaded in the editor

Parameters:
o - the ontology to be loaded

getOntology

Taxonomy getOntology()
Gets the loaded ontology

Returns:
the current ontology in the editor

setOntologyList

void setOntologyList(Vector list)
Sets the list of ontologies to be loaded in the editor

Parameters:
list - the list of ontologies

getOntologyList

Vector getOntologyList()
Gets the list of ontologies currently in the editor

Returns:
the list of ontologies

visualize

void visualize()
Visualizes the editor


addSubClass

void addSubClass(int x,
                 int y)
Invokes an add sub class dialog in position x,y

Parameters:
x - the x coordinate of the dialog
y - the y coordinate of the dialog

addSubClass

void addSubClass(ClassNode root,
                 String className,
                 String classComment)
Adds Sub Class given a ClassNode and the resulting info from the Add Sub Class dialog.

Parameters:
root - the node which is root to the sub class being added
className - the name from the dialog
classComment - the comment from the dialog

removeClass

void removeClass(ClassNode node)
Removes the node/class

Parameters:
node - the node to be removed

renameClass

void renameClass(TClass c,
                 ClassNode n,
                 int x,
                 int y)
Renames a class

Parameters:
c - the class to be renamed
n - the class node associated with the class
x - coords
y - coords

ontologySelected

void ontologySelected(Taxonomy o)
Selects an ontology. Is called when an ontology has been selecte from the ontology list.

Parameters:
o - the selected ontology

saveOntologies

void saveOntologies(Vector list)
Saves a list of ontologies.

Parameters:
list - a list of ontologies to be saved

closeOntologies

void closeOntologies(Vector list)
                     throws ResourceInstantiationException
Closes list of ontologies

Parameters:
list - a list of ontologies to be saved
Throws:
ResourceInstantiationException

getModifiedOntologies

Vector getModifiedOntologies()
Gets all modified ontologies.

Returns:
list of the modified ontologies

saveOntology

void saveOntology(Taxonomy o)
                  throws ResourceInstantiationException
Saves this ontology

Parameters:
o - the ontology to be saved
Throws:
{@link - ResourceInstantiationException}
ResourceInstantiationException

saveAsOntology

void saveAsOntology(Taxonomy o,
                    int x,
                    int y)
                    throws ResourceInstantiationException
Invokes a Save As dialog for this ontology and saves it to the specified location.

Parameters:
o - the ontology to be saved
x - the x coordinate of the save as dialog
y - the y coordinate of the save as dialog
Throws:
ResourceInstantiationException

renameOntology

void renameOntology(Taxonomy o,
                    int x,
                    int y)
Renames an ontology

Parameters:
o - the ontology to be renamed
x - the x coordinate of the rename dialog
y - the y coordinate of the rename dialog

deleteOntology

void deleteOntology(Taxonomy o,
                    int x,
                    int y)
                    throws ResourceInstantiationException
Deletes an ontology. Invokes AreYouSureDialog if the ontology has been changed.

Parameters:
o - the ontology to be deleted
x - x coordinate of the option pane to be invoked
y - y coordinate of the option pane to be invoked
Throws:
ResourceInstantiationException

editURI

void editURI(Taxonomy o,
             int x,
             int y)
Edits the URI of an ontology.

Parameters:
o - the ontology to be edited
x - coords of the dialog
y - coords of the dialog

editClassURI

void editClassURI(TClass c,
                  int x,
                  int y)
Edit the URI of an ontology class

Parameters:
c - class to be edited
x - coords of the dialog
y - coords of the dialog

getAllURIs

Set getAllURIs()
Gets all URIs that are present at the moment as ontology URIs.

Returns:
all the uris that are available in the editor

getAllURIs

Set getAllURIs(Taxonomy o)
Retrieve a set of all the class URIs in an ontology

Parameters:
o - the ontology
Returns:
set of all the URIs in the ontology

closeOntology

void closeOntology(Taxonomy o,
                   int x,
                   int y)
                   throws ResourceInstantiationException
Closes an ontology. Invokes AreYouSureDialog if the ontology has been changed.

Parameters:
o - the ontology to be closed
x - x coordinate of the option pane to be invoked
y - y coordinate of the option pane to be invoked
Throws:
ResourceInstantiationException

AskWannaSave

int AskWannaSave(Taxonomy o,
                 int x,
                 int y)
Wanna Save Dialog invocation.

Parameters:
o - the ontology to be saved or not
x - x coordinate of the option pane to be invoked
y - y coordinate of the option pane to be invoked
Returns:
the result of the option pane

fileExit

void fileExit()
Acts on choosing Exit from the File menu.


fileOpen

void fileOpen(int x,
              int y)
              throws ResourceInstantiationException
Acts on choosing Open from the File menu.

Parameters:
x - the x coordinate of the invocation
y - the y coordinate of the invocation
Throws:
ResourceInstantiationException - if something goes wrong with the loading.

fileSave

void fileSave(int x,
              int y,
              Vector ontologies)
Invoke a mutiple selection save dialog with a list of ontologies to be saved.

Parameters:
x - coords of the dialog
y - coords of the dialog
ontologies - the list of ontologies to be optionally saved

fileClose

void fileClose(int x,
               int y,
               Vector ontologies)
Invokes a mutiple selection close dialog with a list of ontologies to be closed.

Parameters:
x - coords of the dialog
y - coords of the dialog
ontologies - the list of ontologies to be optionally closed

fileNew

void fileNew(int x,
             int y)
Inovkes a new ontology dialog.

Parameters:
x - coords of the dialog
y - coords of the dialog

GATE
Version 3.1-2270