|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
gate.creole.AbstractVisualResource
com.ontotext.gate.vr.OntologyEditorImpl
public class OntologyEditorImpl
Implementation of an ontology editor
Nested Class Summary | |
---|---|
protected class |
OntologyEditorImpl.KnowledgeBaseTreeCellRenderer
|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
POSITION_X
the position of the editor (x) |
static int |
POSITION_Y
the position of the editor (y) |
static int |
SIZE_X
the size of the editor (x) |
static int |
SIZE_Y
the size of the editor (y) |
Fields inherited from class gate.creole.AbstractVisualResource |
---|
features |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
OntologyEditorImpl()
|
Method Summary | |
---|---|
void |
addSubClass(ClassNode root,
String className,
String classComment)
addSubClass given a ClassNode and the resulting info from the 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. currently the x and y parameters are not used since the option pane is by default initialized with position setLocationRelativeTo(parentComponent) |
void |
cleanup()
Does nothing now, but meant to clear all internal data |
void |
closeOntologies(Vector list)
close list of ontologies |
void |
closeOntology(Taxonomy o,
int x,
int y)
close an ontology. invoke AreYouSureDialog if the ontology has been changed. |
void |
createOntology(String name,
String sourceURI,
String theURL,
String comment)
Creates a new ontology |
void |
datastoreClosed(CreoleEvent e)
Called when a DataStore has been closed |
void |
datastoreCreated(CreoleEvent e)
Called when a DataStore has been created |
void |
datastoreOpened(CreoleEvent e)
Called when a DataStore has been opened |
void |
deleteOntology(Taxonomy o,
int x,
int y)
delete an ontology. invoke if the ontology has been changed. currently deleteOntology works as closeOntology. does not delete the file. |
void |
editClassURI(TClass c,
int x,
int y)
edit the URI of an ontology class |
void |
editURI(Taxonomy o,
int x,
int y)
edit the URI of an ontology |
void |
fileClose(int x,
int y,
Vector ontologies)
invoke a mutiple selection close dialog with a list of ontologies. |
void |
fileExit()
checks for unsaved ontologies and disposes the main panel |
void |
fileNew(int x,
int y)
inovke 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. |
Set |
getAllURIs()
Gets all URIs that are present at the moment as ontology URIs. |
Set |
getAllURIs(Taxonomy o)
retrieve a set of all the URIs in an ontology |
Vector |
getModifiedOntologies()
Get Modified Ontologies |
String |
getName()
Returns the name of this resource |
Taxonomy |
getOntology()
Gets the loaded ontology |
Vector |
getOntologyList()
Gets the list of ontologies currently in the editor |
Resource |
init()
Initialise this resource, and return it. |
void |
objectCreated(ObjectModificationEvent e)
|
void |
objectDeleted(ObjectModificationEvent e)
|
void |
objectModified(ObjectModificationEvent e)
|
void |
ontologySelected(Taxonomy o)
Is called when an ontology has been selected from the ontology list |
void |
processGateEvent(GateEvent e)
Called when a Gate event has occured |
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)
rename an ontology. if the x and y coordinates are not set, then the default position is LocationRelativeTo the ontologies list. |
void |
resourceLoaded(CreoleEvent e)
Called when a new Resource has been loaded into the system |
void |
resourceRenamed(Resource resource,
String oldName,
String newName)
Called when the creole register has renamed a resource.1 |
void |
resourceUnloaded(CreoleEvent e)
Called when a Resource has been removed from the system |
void |
saveAsOntology(Taxonomy o,
int x,
int y)
invoke a saveas dialog for this ontology and save it to the location specified |
void |
saveOntologies(Vector list)
Save a list of ontologies. |
void |
saveOntology(Taxonomy o)
save this ontology |
void |
setHandle(Handle handle)
Used by the main GUI to tell this VR what handle created it. |
void |
setName(String name)
Sets the name of this resource |
void |
setOntology(Taxonomy o)
Sets ontology to be loaded in the editor |
void |
setOntologyList(Vector list)
Sets the list of ontologies to be loaded in the editor |
void |
setTarget(Object target)
Called by the GUI when this viewer/editor has to initialise itself for a specific object. |
void |
visualize()
Visualizes the editor |
Methods inherited from class gate.creole.AbstractVisualResource |
---|
getFeatures, getParameterValue, setFeatures, setParameterValue, setParameterValues |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gate.Resource |
---|
getParameterValue, setParameterValue, setParameterValues |
Methods inherited from interface gate.util.FeatureBearer |
---|
getFeatures, setFeatures |
Field Detail |
---|
public static final int SIZE_X
public static final int SIZE_Y
public static final int POSITION_X
public static final int POSITION_Y
Constructor Detail |
---|
public OntologyEditorImpl()
Method Detail |
---|
public void ontologySelected(Taxonomy o)
ontologySelected
in interface OntologyEditor
o
- the selected ontologypublic void addSubClass(int x, int y)
addSubClass
in interface OntologyEditor
x
- the x coordinate of the dialogy
- the y coordinate of the dialogpublic void addSubClass(ClassNode root, String className, String classComment)
addSubClass
in interface OntologyEditor
root
- the node which is root to the sub class being addedclassName
- the name from the dialogclassComment
- the comment from the dialogpublic void removeClass(ClassNode node)
removeClass
in interface OntologyEditor
node
- the node to be removedpublic void renameClass(TClass c, ClassNode n, int x, int y)
renameClass
in interface OntologyEditor
c
- the class to be renamedn
- the class node associated with the classx
- coordsy
- coordspublic void visualize()
visualize
in interface OntologyEditor
public void createOntology(String name, String sourceURI, String theURL, String comment) throws ResourceInstantiationException
createOntology
in interface OntologyEditor
name
- the name of the ontologysourceURI
- theURL
- comment
-
ResourceInstantiationException
public void setOntology(Taxonomy o)
setOntology
in interface OntologyEditor
o
- the ontology to be loadedpublic Taxonomy getOntology()
OntologyEditor
getOntology
in interface OntologyEditor
public void setOntologyList(Vector list)
OntologyEditor
setOntologyList
in interface OntologyEditor
list
- the list of ontologiespublic Vector getOntologyList()
OntologyEditor
getOntologyList
in interface OntologyEditor
public void setTarget(Object target)
AbstractVisualResource
setTarget
in interface VisualResource
setTarget
in class AbstractVisualResource
target
- the object (be it a Resource
,
DataStore
or whatever) this viewer has to displaypublic void setHandle(Handle handle)
AbstractVisualResource
setHandle
in interface VisualResource
setHandle
in class AbstractVisualResource
public Resource init() throws ResourceInstantiationException
AbstractVisualResource
init
in interface Resource
init
in class AbstractVisualResource
ResourceInstantiationException
public void cleanup()
AbstractVisualResource
cleanup
in interface Resource
cleanup
in class AbstractVisualResource
public void setName(String name)
NameBearer
setName
in interface NameBearer
setName
in class Component
public String getName()
NameBearer
getName
in interface NameBearer
getName
in class Component
public Vector getModifiedOntologies()
getModifiedOntologies
in interface OntologyEditor
public void saveOntologies(Vector list)
saveOntologies
in interface OntologyEditor
list
- a list of ontologies to be savedpublic void closeOntologies(Vector list) throws ResourceInstantiationException
closeOntologies
in interface OntologyEditor
list
- a list of ontologies to be saved
ResourceInstantiationException
public void saveOntology(Taxonomy o) throws ResourceInstantiationException
saveOntology
in interface OntologyEditor
o
- the ontology to be saved
ResourceInstantiationException
public void saveAsOntology(Taxonomy o, int x, int y) throws ResourceInstantiationException
saveAsOntology
in interface OntologyEditor
o
- the ontology to be savedx
- the x coordinate of the save as dialogy
- the y coordinate of the save as dialog
ResourceInstantiationException
public void renameOntology(Taxonomy o, int x, int y)
renameOntology
in interface OntologyEditor
o
- the ontology to be renamedx
- the x coordinate of the rename dialogy
- the y coordinate of the rename dialogpublic void deleteOntology(Taxonomy o, int x, int y) throws ResourceInstantiationException
deleteOntology
in interface OntologyEditor
o
- the ontology to be deletedx
- x coordinate of the option pane to be invokedy
- y coordinate of the option pane to be invoked
ResourceInstantiationException
public void editURI(Taxonomy o, int x, int y)
editURI
in interface OntologyEditor
o
- the ontology to be editedx
- coords of the dialogy
- coords of the dialogpublic void editClassURI(TClass c, int x, int y)
editClassURI
in interface OntologyEditor
c
- class to be editedx
- coords of the dialogy
- coords of the dialogpublic Set getAllURIs()
OntologyEditor
getAllURIs
in interface OntologyEditor
public Set getAllURIs(Taxonomy o)
getAllURIs
in interface OntologyEditor
o
- the ontology
public void closeOntology(Taxonomy o, int x, int y) throws ResourceInstantiationException
closeOntology
in interface OntologyEditor
o
- the ontology to be closedx
- x coordinate of the option pane to be invokedy
- y coordinate of the option pane to be invoked
ResourceInstantiationException
public void fileExit()
fileExit
in interface OntologyEditor
public void fileOpen(int x, int y) throws ResourceInstantiationException
OntologyEditor
fileOpen
in interface OntologyEditor
x
- the x coordinate of the invocationy
- the y coordinate of the invocation
ResourceInstantiationException
- if something goes wrong with the loading.public void fileSave(int x, int y, Vector ontologies)
fileSave
in interface OntologyEditor
x
- coords of the dialogy
- coords of the dialogontologies
- the list of ontologies to be optionally savedpublic void fileClose(int x, int y, Vector ontologies)
fileClose
in interface OntologyEditor
x
- coords of the dialogy
- coords of the dialogontologies
- the list of ontologies to be optionally closedpublic void fileNew(int x, int y)
fileNew
in interface OntologyEditor
x
- coords of the dialogy
- coords of the dialogpublic int AskWannaSave(Taxonomy o, int x, int y)
AskWannaSave
in interface OntologyEditor
o
- the ontology to be saved or notx
- x coordinate of the WannaSaveDialog to be invokedy
- y coordinate of the WannaSaveDialog to be invoked
public void resourceLoaded(CreoleEvent e)
Resource
has been loaded into the system
resourceLoaded
in interface CreoleListener
public void resourceUnloaded(CreoleEvent e)
Resource
has been removed from the system
resourceUnloaded
in interface CreoleListener
public void datastoreOpened(CreoleEvent e)
DataStore
has been opened
datastoreOpened
in interface CreoleListener
public void datastoreCreated(CreoleEvent e)
DataStore
has been created
datastoreCreated
in interface CreoleListener
public void datastoreClosed(CreoleEvent e)
DataStore
has been closed
datastoreClosed
in interface CreoleListener
public void resourceRenamed(Resource resource, String oldName, String newName)
resourceRenamed
in interface CreoleListener
public void processGateEvent(GateEvent e)
GateListener
processGateEvent
in interface GateListener
public void objectCreated(ObjectModificationEvent e)
objectCreated
in interface ObjectModificationListener
public void objectDeleted(ObjectModificationEvent e)
objectDeleted
in interface ObjectModificationListener
public void objectModified(ObjectModificationEvent e)
objectModified
in interface ObjectModificationListener
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |