|
||||||||||
| 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
gate.gui.ontology.OntologyEditor
public class OntologyEditor
The GUI for the Ontology Editor
| Nested Class Summary | |
|---|---|
protected class |
OntologyEditor.AnnotationPropertyValueAction
|
protected class |
OntologyEditor.DatatypePropertyValueAction
|
(package private) class |
OntologyEditor.DnDJTree
|
protected class |
OntologyEditor.ObjectPropertyValueAction
|
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Fields inherited from class gate.creole.AbstractVisualResource |
|---|
features, handle |
| 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 | |
|---|---|
OntologyEditor()
|
|
| Method Summary | |
|---|---|
protected void |
addChidrenRec(DefaultMutableTreeNode parent,
List<OResource> children,
Comparator comparator)
Adds the children nodes to a node using values from a list of classes and instances. |
protected void |
addPropertyChidrenRec(DefaultMutableTreeNode parent,
List<RDFProperty> children,
Comparator comparator)
Adds the children nodes to a node using values from a list of classes and instances. |
void |
addTreeNodeSelectionListener(TreeNodeSelectionListener listener)
|
protected void |
classIsAdded(OClass aClass)
Update the class tree model. |
private void |
enableDisableToolBarComponents()
Enable-disable toolBar components |
protected void |
expandNode(JTree tree)
|
private void |
fireTreeNodeSelectionChanged(ArrayList<DefaultMutableTreeNode> nodes)
|
Resource |
init()
Init method, that creates this object and returns this object as a resource |
protected void |
initGUIComponents()
Initialize the GUI Components |
protected void |
initListeners()
Initializes various listeners |
protected void |
initLocalData()
Initialize the local data |
protected void |
instanceIsAdded(OInstance anInstance)
Update the class tree model. |
void |
ontologyModified(Ontology ontology,
OResource resource,
int eventType)
This method is invoked from ontology whenever it is modified |
void |
ontologyReset(Ontology ontology)
This method is called whenever ontology is reset. |
void |
processGateEvent(GateEvent e)
|
protected void |
propertyIsAdded(RDFProperty p)
Update the property tree model. |
protected void |
rebuildModel()
Called when the target of this editor has changed |
private void |
removeFromMap(DefaultTreeModel model,
DefaultMutableTreeNode node)
|
void |
removeTreeNodeSelectionListener(TreeNodeSelectionListener listener)
|
void |
resourceAdded(Ontology ontology,
OResource resource)
This method is invoked whenever a resource (class/property/instance) is added to the ontology. |
void |
resourcePropertyValueChanged(Ontology ontology,
OResource resource,
RDFProperty property,
Object value,
int eventType)
This method should be invoked when a property value is added or removed (specified by the event type). |
void |
resourceRelationChanged(Ontology ontology,
OResource resource1,
OResource resouce2,
int eventType)
This method is invoked whenever a relation between two objects of the same class (e.g. |
void |
resourcesRemoved(Ontology ontology,
String[] resources)
This method is invoked whenever a resource (class/property/instance) is removed from the ontology. |
void |
selectResourceInClassTree(OResource resource)
|
void |
setTarget(Object target)
Called by the GUI when this viewer/editor has to initialise itself for a specific object. |
protected void |
subClassIsAdded(OClass c)
Update the class tree model. |
protected void |
subClassIsDeleted(OClass c)
Update the class tree model. |
protected void |
subPropertyIsAdded(RDFProperty p)
Update the property tree model. |
protected void |
subPropertyIsDeleted(RDFProperty p)
Update the property tree model. |
private void |
updateSelection(JTree treeToUse,
Component componentToUpdate)
|
| Methods inherited from class gate.creole.AbstractVisualResource |
|---|
cleanup, getFeatures, getParameterValue, setFeatures, setHandle, 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.VisualResource |
|---|
setHandle |
| Methods inherited from interface gate.Resource |
|---|
cleanup, getParameterValue, setParameterValue, setParameterValues |
| Methods inherited from interface gate.util.FeatureBearer |
|---|
getFeatures, setFeatures |
| Methods inherited from interface gate.util.NameBearer |
|---|
getName, setName |
| Field Detail |
|---|
private static final long serialVersionUID
protected Ontology ontology
protected OntologyItemComparator itemComparator
protected OntologyEditor.DnDJTree tree
protected OntologyEditor.DnDJTree propertyTree
protected DefaultTreeModel treeModel
protected DefaultTreeModel propertyTreeModel
protected JTable detailsTable
protected JTable propertyDetailsTable
protected DetailsTableModel detailsTableModel
protected PropertyDetailsTableModel propertyDetailsTableModel
protected JSplitPane mainSplit
protected DefaultMutableTreeNode rootNode
protected DefaultMutableTreeNode propertyRootNode
protected JScrollPane detailsTableScroller
protected JScrollPane propertyDetailsTableScroller
protected JToolBar toolBar
protected JButton queryBtn
protected JButton refreshOntologyBtn
protected JButton topClass
protected JButton subClass
protected JButton restriction
protected JButton instance
protected JButton annotationProperty
protected JButton datatypeProperty
protected JButton objectProperty
protected JButton symmetricProperty
protected JButton transitiveProperty
protected JButton delete
protected JButton search
protected ArrayList<DefaultMutableTreeNode> selectedNodes
protected ArrayList<String> ontologyClassesURIs
protected SearchAction searchAction
protected TopClassAction topClassAction
protected SubClassAction subClassAction
protected InstanceAction instanceAction
protected AnnotationPropertyAction annotationPropertyAction
protected DatatypePropertyAction datatypePropertyAction
protected ObjectPropertyAction objectPropertyAction
protected SymmetricPropertyAction symmetricPropertyAction
protected TransitivePropertyAction transitivePropertyAction
protected DeleteOntologyResourceAction deleteOntoResourceAction
protected RestrictionAction restrictionAction
protected ArrayList<TreeNodeSelectionListener> listeners
protected HashMap<String,ArrayList<DefaultMutableTreeNode>> uri2TreeNodesListMap
protected HashMap<DefaultMutableTreeNode,URI> reverseMap
protected JScrollPane propertyScroller
protected JScrollPane scroller
protected JTabbedPane tabbedPane
| Constructor Detail |
|---|
public OntologyEditor()
| Method Detail |
|---|
public void setTarget(Object target)
AbstractVisualResource
setTarget in interface VisualResourcesetTarget in class AbstractVisualResourcetarget - the object (be it a Resource,
DataStore or whatever) this viewer has to display
public Resource init()
throws ResourceInstantiationException
init in interface Resourceinit in class AbstractVisualResourceResourceInstantiationExceptionprotected void initLocalData()
protected void initGUIComponents()
private void updateSelection(JTree treeToUse,
Component componentToUpdate)
protected void initListeners()
protected void expandNode(JTree tree)
private void enableDisableToolBarComponents()
protected void rebuildModel()
protected void addChidrenRec(DefaultMutableTreeNode parent,
List<OResource> children,
Comparator comparator)
parent - the parent node.children - the Listcomparator - the Comparator used to sort the children.
protected void addPropertyChidrenRec(DefaultMutableTreeNode parent,
List<RDFProperty> children,
Comparator comparator)
parent - the parent node.children - the lsit of children objects.comparator - the Comparator used to sort the children.public void processGateEvent(GateEvent e)
protected void classIsAdded(OClass aClass)
aClass - class to addprotected void propertyIsAdded(RDFProperty p)
p - property to addprotected void instanceIsAdded(OInstance anInstance)
anInstance - instance to add
private void removeFromMap(DefaultTreeModel model,
DefaultMutableTreeNode node)
protected void subPropertyIsAdded(RDFProperty p)
p - subproperty to addprotected void subPropertyIsDeleted(RDFProperty p)
p - subproperty to deleteprotected void subClassIsAdded(OClass c)
c - subclass to addprotected void subClassIsDeleted(OClass c)
c - subclass to delete
public void resourcesRemoved(Ontology ontology,
String[] resources)
OntologyModificationListener
resourcesRemoved in interface OntologyModificationListenerontology - the source of the eventresources - an array of URIs of resources which were deleted
(including the resource which was asked to be deleted).
public void resourceAdded(Ontology ontology,
OResource resource)
OntologyModificationListener
resourceAdded in interface OntologyModificationListenerontology - the source of the eventresource - an instance of OResource, which was created as a
result of addition of a resource.
public void resourceRelationChanged(Ontology ontology,
OResource resource1,
OResource resouce2,
int eventType)
OntologyModificationListener
resourceRelationChanged in interface OntologyModificationListenerontology - the source of the eventresource1 - the affected OResourceresouce2 - the affected OResourceeventType - the type of an event (@see OConstants) for more
details
public void resourcePropertyValueChanged(Ontology ontology,
OResource resource,
RDFProperty property,
Object value,
int eventType)
OntologyModificationListener
resourcePropertyValueChanged in interface OntologyModificationListenerontology - the source of the eventresource - the affected resource whose property value is added or removedproperty - the property whose value has been added or removedvalue - the actual value that is added or removed. If the value is null - it indicates all the values related to the property are deleted.eventType - type of the event (@see OConstants) for more details
public void ontologyModified(Ontology ontology,
OResource resource,
int eventType)
public void ontologyReset(Ontology ontology)
ontologyReset in interface OntologyModificationListenerontology - public void addTreeNodeSelectionListener(TreeNodeSelectionListener listener)
public void removeTreeNodeSelectionListener(TreeNodeSelectionListener listener)
private void fireTreeNodeSelectionChanged(ArrayList<DefaultMutableTreeNode> nodes)
public void selectResourceInClassTree(OResource resource)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||