|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.gui.docview.AbstractDocumentView
gate.gui.docview.OntologyInstanceView
public class OntologyInstanceView
Document view that shows two tables: one instances and one for properties.
The instances table is linked with the OntologyClassView class selection
and the properties table is linked with the instances view.
Two buttons allow to add a new instance from the text selection in the
document or as a new label for the selected instance.
You can filter the instances table, delete instances and set properties
that are defined in the ontology as object properties.
| Nested Class Summary | |
|---|---|
protected class |
OntologyInstanceView.DeleteSelectedInstanceAction
|
protected class |
OntologyInstanceView.DeleteSelectedPropertyAction
|
protected class |
OntologyInstanceView.PropertyValueCellEditor
|
protected class |
OntologyInstanceView.ShowInstanceInOntologyEditorAction
|
| Field Summary | |
|---|---|
protected JButton |
addLabelButton
|
protected static String |
ANNOTATION_TYPE
|
protected static String |
CLASS
|
protected Map<String,Set<OClass>> |
classesByPropertyMap
|
protected OntologyClassView |
classView
|
protected JButton |
clearFilterButton
|
protected JTextField |
filterTextField
|
protected JLabel |
hiddenInstancesLabel
|
protected static String |
INSTANCE
|
protected Set<OInstance> |
instances
Instances in the instance table for the selected class and filter. |
protected XJTable |
instanceTable
|
protected JPanel |
mainPanel
|
protected JButton |
newInstanceButton
|
protected static String |
ONTOLOGY
|
protected Set<ObjectProperty> |
properties
Properties in the instance table for the selected class and filter. |
protected XJTable |
propertyTable
|
protected OClass |
selectedClass
Class that has the lead selection in the focused tree. |
protected OInstance |
selectedInstance
Instance selected in the instance table. |
protected Ontology |
selectedOntology
|
protected Set<ObjectProperty> |
setProperties
Properties set in the property table for the selected class and filter. |
protected TextualDocumentView |
textView
|
| Fields inherited from class gate.gui.docview.AbstractDocumentView |
|---|
active, document, guiInitialised, handle, owner |
| Fields inherited from class gate.creole.AbstractResource |
|---|
name |
| Fields inherited from class gate.util.AbstractFeatureBearer |
|---|
features |
| Fields inherited from interface gate.gui.docview.DocumentView |
|---|
CENTRAL, HORIZONTAL, VERTICAL |
| Constructor Summary | |
|---|---|
OntologyInstanceView()
|
|
| Method Summary | |
|---|---|
protected void |
addSelectionToFilter(String selectedSet,
String selectedText,
int start,
int end)
Create a new annotation and instance from a text selection. |
protected void |
createFromSelection(String selectedSet,
String selectedText,
int start,
int end,
boolean newInstance)
Create a new annotation and instance or label from a text selection. |
Component |
getGUI()
Returns the actual UI component this view represents. |
int |
getType()
Returns the type of this view. |
protected void |
initGUI()
Implementers should override this method and use it for populating the GUI. |
protected void |
initListeners()
|
protected void |
registerHooks()
This method will be called whenever the view becomes active. |
void |
selectInstance(OInstance oInstance)
Select an instance in the instance table if it exists.. |
protected void |
unregisterHooks()
This method will be called whenever this view becomes inactive. |
void |
updateInstanceTable(OClass selectedClass)
Update the instance table for the class and ontology selected. |
protected void |
updatePropertyTable()
|
| Methods inherited from class gate.gui.docview.AbstractDocumentView |
|---|
getActions, getDocument, getHandle, getOwner, isActive, setActive, setHandle, setOwner, setSelectedAnnotations, setTarget |
| Methods inherited from class gate.creole.AbstractResource |
|---|
checkParameterValues, cleanup, getBeanInfo, getName, getParameterValue, getParameterValue, init, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
| Methods inherited from class gate.util.AbstractFeatureBearer |
|---|
getFeatures, setFeatures |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 |
| Field Detail |
|---|
protected Ontology selectedOntology
protected TextualDocumentView textView
protected OntologyClassView classView
protected JPanel mainPanel
protected JTextField filterTextField
protected JButton clearFilterButton
protected JLabel hiddenInstancesLabel
protected JButton newInstanceButton
protected JButton addLabelButton
protected XJTable instanceTable
protected XJTable propertyTable
protected OClass selectedClass
protected OInstance selectedInstance
protected Set<OInstance> instances
protected Set<ObjectProperty> setProperties
protected Set<ObjectProperty> properties
protected Map<String,Set<OClass>> classesByPropertyMap
protected static final String ONTOLOGY
protected static final String CLASS
protected static final String INSTANCE
protected static final String ANNOTATION_TYPE
| Constructor Detail |
|---|
public OntologyInstanceView()
| Method Detail |
|---|
protected void initGUI()
AbstractDocumentView
initGUI in class AbstractDocumentViewprotected void initListeners()
protected void registerHooks()
AbstractDocumentView
registerHooks in class AbstractDocumentViewprotected void unregisterHooks()
AbstractDocumentViewAbstractDocumentView.registerHooks().
unregisterHooks in class AbstractDocumentViewpublic Component getGUI()
DocumentView
Component value.public int getType()
DocumentView
DocumentView.CENTRAL,
DocumentView.HORIZONTAL,
DocumentView.VERTICALpublic void updateInstanceTable(OClass selectedClass)
selectedClass - class selectedprotected void updatePropertyTable()
protected void addSelectionToFilter(String selectedSet,
String selectedText,
int start,
int end)
selectedSet - name of the selected annotation setselectedText - selectionstart - selection start offsetend - selection end offset
protected void createFromSelection(String selectedSet,
String selectedText,
int start,
int end,
boolean newInstance)
selectedSet - name of the selected annotation setselectedText - selectionstart - selection start offsetend - selection end offsetnewInstance - true if it will create a new instance otherwise
it will add a new label to the selected instancepublic void selectInstance(OInstance oInstance)
oInstance - instance to be selected
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||