|
|||||||||||
| 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
Implementation of an ontology editor
| Nested Class Summary | |
protected class |
OntologyEditorImpl.KnowledgeBaseTreeCellRenderer
|
| Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
private Handle |
handle
|
private String |
name
The name of the ontology |
private Vector |
ontoList
The list of ontologies |
private Taxonomy |
ontology
The ontology currently displayed |
private Map |
OvsT
Ontology vs Tree map |
private OEMainPanel |
panel
the main panel |
private String |
path
the current ontology path |
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) |
private Object |
target
same as ontoList |
(package private) boolean |
withOntoList
flag indicating the mode of the editor. |
| Fields inherited from class gate.creole.AbstractVisualResource |
features |
| Fields inherited from class javax.swing.JPanel |
|
| 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.Container |
|
| 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()
Clears the internal data of the resource, when it gets released |
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
private OEMainPanel panel
boolean withOntoList
private String path
private Object target
private Handle handle
private String name
private Taxonomy ontology
private Vector ontoList
private Map OvsT
| Constructor Detail |
public OntologyEditorImpl()
| Method Detail |
public void ontologySelected(Taxonomy o)
ontologySelected in interface OntologyEditoro - the selected ontology
public void addSubClass(int x,
int y)
addSubClass in interface OntologyEditorx - the x coordinate of the dialogy - the y coordinate of the dialog
public void addSubClass(ClassNode root,
String className,
String classComment)
addSubClass in interface OntologyEditorroot - 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 OntologyEditornode - the node to be removed
public void renameClass(TClass c,
ClassNode n,
int x,
int y)
renameClass in interface OntologyEditorc - 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 OntologyEditorname - the name of the ontologysourceURI - theURL - comment -
ResourceInstantiationExceptionpublic void setOntology(Taxonomy o)
setOntology in interface OntologyEditoro - the ontology to be loadedpublic Taxonomy getOntology()
OntologyEditor
getOntology in interface OntologyEditorpublic void setOntologyList(Vector list)
OntologyEditor
setOntologyList in interface OntologyEditorlist - the list of ontologiespublic Vector getOntologyList()
OntologyEditor
getOntologyList in interface OntologyEditorpublic void setTarget(Object target)
VisualResource
setTarget in interface VisualResourcesetTarget in class AbstractVisualResourcetarget - the object (be it a Resource,
DataStore or whatever) this viewer has to displaypublic void setHandle(Handle handle)
VisualResource
setHandle in interface VisualResourcesetHandle in class AbstractVisualResource
public Resource init()
throws ResourceInstantiationException
Resource
init in interface Resourceinit in class AbstractVisualResourceResourceInstantiationExceptionpublic void cleanup()
Resource
cleanup in interface Resourcecleanup in class AbstractVisualResourcepublic void setName(String name)
NameBearer
setName in interface NameBearerpublic String getName()
NameBearer
getName in interface NameBearerpublic Vector getModifiedOntologies()
getModifiedOntologies in interface OntologyEditorpublic void saveOntologies(Vector list)
saveOntologies in interface OntologyEditorlist - a list of ontologies to be saved
public void closeOntologies(Vector list)
throws ResourceInstantiationException
closeOntologies in interface OntologyEditorlist - a list of ontologies to be saved
ResourceInstantiationException
public void saveOntology(Taxonomy o)
throws ResourceInstantiationException
saveOntology in interface OntologyEditoro - the ontology to be saved
ResourceInstantiationException
public void saveAsOntology(Taxonomy o,
int x,
int y)
throws ResourceInstantiationException
saveAsOntology in interface OntologyEditoro - 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 OntologyEditoro - the ontology to be renamedx - the x coordinate of the rename dialogy - the y coordinate of the rename dialog
public void deleteOntology(Taxonomy o,
int x,
int y)
throws ResourceInstantiationException
deleteOntology in interface OntologyEditoro - 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 OntologyEditoro - the ontology to be editedx - coords of the dialogy - coords of the dialog
public void editClassURI(TClass c,
int x,
int y)
editClassURI in interface OntologyEditorc - class to be editedx - coords of the dialogy - coords of the dialogpublic Set getAllURIs()
OntologyEditor
getAllURIs in interface OntologyEditorpublic Set getAllURIs(Taxonomy o)
getAllURIs in interface OntologyEditoro - the ontology
public void closeOntology(Taxonomy o,
int x,
int y)
throws ResourceInstantiationException
closeOntology in interface OntologyEditoro - the ontology to be closedx - x coordinate of the option pane to be invokedy - y coordinate of the option pane to be invoked
ResourceInstantiationExceptionpublic void fileExit()
fileExit in interface OntologyEditor
public void fileOpen(int x,
int y)
throws ResourceInstantiationException
OntologyEditor
fileOpen in interface OntologyEditorx - 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 OntologyEditorx - coords of the dialogy - coords of the dialogontologies - the list of ontologies to be optionally saved
public void fileClose(int x,
int y,
Vector ontologies)
fileClose in interface OntologyEditorx - coords of the dialogy - coords of the dialogontologies - the list of ontologies to be optionally closed
public void fileNew(int x,
int y)
fileNew in interface OntologyEditorx - coords of the dialogy - coords of the dialog
public int AskWannaSave(Taxonomy o,
int x,
int y)
AskWannaSave in interface OntologyEditoro - 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 CreoleListenerpublic void resourceUnloaded(CreoleEvent e)
Resource has been removed from the system
resourceUnloaded in interface CreoleListenerpublic void datastoreOpened(CreoleEvent e)
DataStore has been opened
datastoreOpened in interface CreoleListenerpublic void datastoreCreated(CreoleEvent e)
DataStore has been created
datastoreCreated in interface CreoleListenerpublic void datastoreClosed(CreoleEvent e)
DataStore has been closed
datastoreClosed in interface CreoleListener
public void resourceRenamed(Resource resource,
String oldName,
String newName)
resourceRenamed in interface CreoleListenerpublic void processGateEvent(GateEvent e)
GateListener
processGateEvent in interface GateListenerpublic void objectCreated(ObjectModificationEvent e)
objectCreated in interface ObjectModificationListenerpublic void objectDeleted(ObjectModificationEvent e)
objectDeleted in interface ObjectModificationListenerpublic void objectModified(ObjectModificationEvent e)
objectModified in interface ObjectModificationListener
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||