public class OntologyTreePanel extends JPanel
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected JTree |
currentOntologyTree
Instance of JTree used to store information about ontology classes
|
protected HashMap<String,Color> |
currentOResource2ColorMap
Current ontologyColorScheme
|
protected HashMap<String,Boolean> |
currentOResource2IsSelectedMap
Class Selection map for the current ontology
|
protected HashMap<String,ArrayList<gate.Annotation>> |
currentOResourceName2AnnotationsListMap
Current Annotation Map that stores the annotation in arraylist for each
concept
|
protected Set<gate.creole.ontology.RDFProperty> |
currentProperties
Class Selection map for the current ontology
|
protected HashMap<String,Set<gate.creole.ontology.OClass>> |
currentPropValuesAndInstances2ClassesMap
instances of the ontology and their classes
|
protected HashMap<gate.creole.ontology.Ontology,HashMap<String,Color>> |
ontology2ColorSchemesMap
Stores various color schemes for different ontology classes
|
protected HashMap<gate.creole.ontology.Ontology,OntoTreeModel> |
ontology2OntoTreeModels
Stores all the various ontology2OntoTreeModels for different ontologies
|
protected HashMap<gate.creole.ontology.Ontology,HashMap<String,Boolean>> |
ontology2OResourceSelectionMap
This stores Class selection map for each individual loaded ontology
|
protected HashMap<gate.creole.ontology.Ontology,Set<gate.creole.ontology.RDFProperty>> |
ontology2PropertiesMap
This stores Class selection map for each individual loaded ontology
|
protected HashMap<gate.creole.ontology.Ontology,HashMap<String,Set<gate.creole.ontology.OClass>>> |
ontology2PropValuesAndInstances2ClassesMap
This stores instances and the classes that instance belongs to
|
protected OntologyViewerOptions |
ontologyViewerOptions
OntologyViewerOptions instance
|
protected OntologyTreeListener |
ontoTreeListener
OntologyTreeListener that listens to the selection of ontology classes
|
protected OntologyViewer |
ontoViewer
Instance of ontology Viewer
|
protected boolean |
showingAnnotationWindow
Indicates whether the annotation window is being shown or not
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
OntologyTreePanel(OntologyViewer ontoViewer)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAnnotation(gate.Annotation annot)
Deletes the Annotations from the document
|
Set<String> |
getAllClassNames() |
Set<String> |
getAllInstanceNames() |
gate.creole.ontology.Ontology |
getCurrentOntology()
Returns the current ontology
|
ClassNode |
getFirstNode(String classValue)
This method finds out the ClassNode node in the ontology Tree for given
class
|
Component |
getGUI()
returns the currentOntologyTree Panel
|
Color |
getHighlightColor(String classVal)
Returns the associated color for the given class
|
Highlighter |
getHighlighter()
Returns the instance of highlighter
|
List<ClassNode> |
getNode(String classValue)
This method finds out the ClassNode node in the ontology Tree for given
class
|
void |
removeOntologyTreeModel(gate.creole.ontology.Ontology ontology,
boolean wasCurrentlySelected)
This method is called to remove the stored ontology model and free up the
memory with other resources occupied by the removed ontology
|
void |
setColor(String className,
Color col) |
void |
setColorScheme(IFolder root,
HashMap<String,Color> colorScheme)
For every ontology it generates the colors only once at the begining which
should remain same throughout the programe
|
void |
setOntoTreeClassSelection(IFolder root,
HashMap<String,Boolean> classSelection)
This is to initialise the classSelection as false to all the classes
|
void |
setSelected(String className,
boolean value)
This method select/deselect the classes in the classSelectionMap
|
void |
showEmptyOntologyTree()
A method to show an empty ontology tree
|
void |
showOntologyInOntologyTreeGUI(gate.creole.ontology.Ontology ontology,
HashMap<String,ArrayList<gate.Annotation>> annotMap)
This method is used to plot the ontology on the tree and generate/load the
respective data in the memory
|
void |
updatePVnInst2ClassesMap(gate.creole.ontology.OInstance anInst,
Set<gate.creole.ontology.RDFProperty> propertySet,
Set<gate.creole.ontology.OClass> classes,
HashMap<String,Set<gate.creole.ontology.OClass>> map)
This method iterates through each instance of the ontology and obtains its
all set properties.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected JTree currentOntologyTree
protected OntologyViewerOptions ontologyViewerOptions
protected HashMap<gate.creole.ontology.Ontology,OntoTreeModel> ontology2OntoTreeModels
protected HashMap<gate.creole.ontology.Ontology,HashMap<String,Color>> ontology2ColorSchemesMap
protected HashMap<String,Color> currentOResource2ColorMap
protected HashMap<gate.creole.ontology.Ontology,HashMap<String,Boolean>> ontology2OResourceSelectionMap
protected HashMap<String,Boolean> currentOResource2IsSelectedMap
protected HashMap<gate.creole.ontology.Ontology,Set<gate.creole.ontology.RDFProperty>> ontology2PropertiesMap
protected Set<gate.creole.ontology.RDFProperty> currentProperties
protected HashMap<gate.creole.ontology.Ontology,HashMap<String,Set<gate.creole.ontology.OClass>>> ontology2PropValuesAndInstances2ClassesMap
protected HashMap<String,Set<gate.creole.ontology.OClass>> currentPropValuesAndInstances2ClassesMap
protected HashMap<String,ArrayList<gate.Annotation>> currentOResourceName2AnnotationsListMap
protected OntologyTreeListener ontoTreeListener
protected OntologyViewer ontoViewer
protected boolean showingAnnotationWindow
public OntologyTreePanel(OntologyViewer ontoViewer)
public ClassNode getFirstNode(String classValue)
classValue - public List<ClassNode> getNode(String classValue)
classValue - public void deleteAnnotation(gate.Annotation annot)
public gate.creole.ontology.Ontology getCurrentOntology()
public Highlighter getHighlighter()
public Color getHighlightColor(String classVal)
public void showEmptyOntologyTree()
public void removeOntologyTreeModel(gate.creole.ontology.Ontology ontology,
boolean wasCurrentlySelected)
public void showOntologyInOntologyTreeGUI(gate.creole.ontology.Ontology ontology,
HashMap<String,ArrayList<gate.Annotation>> annotMap)
ontology - - the ontology to be plotedcurrentOResourceName2AnnotationsListMap - - the annotationMap which contains Key=concept(String)
Value=annotations(ArrayList)public void updatePVnInst2ClassesMap(gate.creole.ontology.OInstance anInst,
Set<gate.creole.ontology.RDFProperty> propertySet,
Set<gate.creole.ontology.OClass> classes,
HashMap<String,Set<gate.creole.ontology.OClass>> map)
ontology - public void setColorScheme(IFolder root, HashMap<String,Color> colorScheme)
root - - the root (top class) of the ontologycolorScheme - - and the colorScheme hashmap Key=conceptName, Value:associated
color map. if provided as a new fresh instance of hashmap with
size zero, it parses through the whole ontology and generate the
random color instances for all the classes and stores them in the
provided colorScheme hashmappublic void setOntoTreeClassSelection(IFolder root, HashMap<String,Boolean> classSelection)
root - classSelection - public Component getGUI()
public void setSelected(String className, boolean value)
className - value -