Class TypeSection
java.lang.Object
org.eclipse.ui.forms.AbstractFormPart
org.eclipse.ui.forms.SectionPart
org.apache.uima.taeconfigurator.editors.ui.AbstractSection
org.apache.uima.taeconfigurator.editors.ui.AbstractImportablePartSection
org.apache.uima.taeconfigurator.editors.ui.TypeSection
- All Implemented Interfaces:
StandardStrings,org.eclipse.swt.widgets.Listener,org.eclipse.ui.forms.IFormPart
The Class TypeSection.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe Constant AV_COL.static final StringThe Constant CASCADE_DELETE_WARNING.static final StringThe Constant CASCADE_MESSAGE.static final intThe Constant ELEMENT_TYPE_COL.static final StringThe Constant HEADER_ALLOWED_VALUE.static final intThe Constant MULTIPLE_REF_OK_COL.static final intThe Constant NAME_COL.static final intThe Constant RANGE_COL.static final intThe Constant SUPER_COL.Fields inherited from class org.apache.uima.taeconfigurator.editors.ui.AbstractSection
capabilityArray0, configurationGroup0, configurationGroupArray0, configurationParameter0, configurationParameterArray0, editor, ENABLED, EQUAL_WIDTH, externalResourceBinding0, externalResourceDescription0, featureDescriptionArray0, fsIndexDescription0, HEADER_VISIBLE, HORIZONTAL_BUTTONS, IMPORTABLE_PART_CONTEXT, initialFormWidth, LINES_VISIBLE, nameValuePairArray0, NO_MIN_HEIGHT, NOT_SELECTED, NOTHING_SELECTED, PLUGIN_ID, SELECTED, sofaMapping0, stringArray0, toolkit, treeItemArray0, typeDescription0, typePriorityList0, valueChanged, VERTICAL_BUTTONS, WIDTH_NOT_SPECIFIEDFields inherited from interface org.apache.uima.taeconfigurator.StandardStrings
S_, S_ADD, S_DESCRIPTION, S_DOWN, S_DOWN_TIP, S_EDIT, S_EDIT_TIP, S_EXPORT, S_EXPORT_TIP, S_REMOVE, S_REMOVE_TIP, S_UP, S_UP_TIP -
Constructor Summary
ConstructorsConstructorDescriptionTypeSection(MultiPageEditor editor, org.eclipse.swt.widgets.Composite parent) Instantiates a new type section. -
Method Summary
Modifier and TypeMethodDescriptionvoidallowedValueUpdate(org.apache.uima.resource.metadata.AllowedValue av, AddAllowedValueDialog dialog) Allowed value update.checkAllowedValue(AddAllowedValueDialog dialog, org.apache.uima.resource.metadata.TypeDescription td, org.apache.uima.resource.metadata.AllowedValue av) Check allowed value.checkDuplTypeName(String newTypeName) returns null or error message about a duplicate type name Cases: Dupl type in local descriptor not allowed.checkFeature(AddFeatureDialog dialog, org.apache.uima.resource.metadata.TypeDescription td, org.apache.uima.resource.metadata.FeatureDescription oldFd) verify a new or edited feature is valid.voidenable()Enable.voidfeatureUpdate(org.apache.uima.resource.metadata.FeatureDescription fd, AddFeatureDialog dialog) Feature update.org.apache.uima.resource.metadata.AllowedValuegetAllowedValueFromTableTreeItem(org.eclipse.swt.widgets.TreeItem item) Gets the allowed value from table tree item.org.apache.uima.resource.metadata.FeatureDescriptiongetFeatureDescriptionFromTableTreeItem(org.eclipse.swt.widgets.TreeItem item) Gets the feature description from table tree item.org.apache.uima.resource.metadata.TypeDescriptiongetTypeDescriptionFromTableTreeItem(org.eclipse.swt.widgets.TreeItem item) Gets the type description from table tree item.voidhandleAddAllowedValue(org.eclipse.swt.widgets.TreeItem parent) Handle add allowed value.voidhandleAddFeature(org.eclipse.swt.widgets.TreeItem parent) Handle add feature.voidHandle add type.voidhandleEvent(org.eclipse.swt.widgets.Event event) voidhandleHover(org.eclipse.swt.widgets.Event event) Handle hover.voidinitialize(org.eclipse.ui.forms.IManagedForm form) voidrefresh()Methods inherited from class org.apache.uima.taeconfigurator.editors.ui.AbstractImportablePartSection
getAllowedValue, getBuiltInTypeDescription, getFeatureFromTypeDescription, getLocalAllowedValue, getLocalFeatureDefinition, getLocalFeatureDefinition, getLocalTypeDefinition, isBuiltInFeature, isBuiltInType, isBuiltInType, isImportedAllowedValue, isImportedFeature, isImportedType, isImportedType, isLocalAllowedValue, isLocalFeature, isLocalItem, isLocalType, isLocalTypeMethods inherited from class org.apache.uima.taeconfigurator.editors.ui.AbstractSection
addCapabilitySet, addListenerForPastableWidget, convertNull, copyTableItem, copyTreeItem, createByNameImport, createImport, createLocationImport, enableBorders, enableCtrl, finishAggregateChangeAction, formatName, getAnalysisEngineMetaData, getAvailableTypeNames, getCapabilities, getCapabilities, getCapabilitySofaNames, getCapabilitySofaNames, getConfigurationParameterDeclarations, getDelegateAnalysisEngineSpecifiersWithImports, getDescriptionForDescriptor, getExternalResourceBindings, getExternalResourceDependencies, getExternalResources, getFeature, getFlowControllerDeclaration, getFsIndexCollection, getFsIndexDescriptionFromTableTreeItem, getIndex, getIndex, getItemIndex, getMergedTypeSystemDescription, getMetaDataFromDescription, getNameSpace, getOperationalProperties, getPreviousSelection, getResourceManagerConfiguration, getShortFeatureName, getShortName, getSofaMappings, getSofaMappings, getToolkit, getTypeFromFullFeatureName, getTypeOrFeature, getTypePriorities, getTypeSystemDescription, handleDefaultIndexKind, isAeDescriptor, isAggregate, isArrayOrListType, isCasConsumerDescriptor, isCasInitializerDescriptor, isCollectionReaderDescriptor, isExtResAndBindingsDescriptor, isFlowControllerDescriptor, isFSArrayOrListType, isIndexableRange, isIndexDescriptor, isJmsDescriptor, isLocalProcessingDescriptor, isParmGroup, isPrimitive, isTypePriorityDescriptor, isTypeSystemDescriptor, isValidAe, isValidAggregateChange, markRestOfPageStale, markStale, markStaleIfDifferent, maybeSetSelection, maybeShortenFileName, multiLineFix, new2ColumnComposite, new3ColumnComposite, new4ColumnComposite, newButtonContainer, newButtonContainer, newCComboWithTip, newCheckBox, newComposite, newDescriptionTextBox, newLabeledCComboWithTip, newLabeledTextField, newLabeledTextField, newLabelWithData, newLabelWithTip, newLabelWithTip, newNcolumnComposite, newPushButton, newPushButton, newPushButton, newRadioButton, newTable, newTable, newTable, newTableColumn, newTableColumn, newTableColumn, newTableColumn, newTextWithTip, newTextWithTip, newTree, newTree, newTreeColumn, newTreeColumn, newTreeColumn, newTreeColumn, newUnUpdatableTextWithTip, packTable, packTree, parseDescriptor, parseDescriptor, parseToFitInToolTips, produceUniqueComponentKey, readImport, removeChildren, requestPopUpOverImport, revertMsg, revertOrContinue, revertTypeSystem, setButtonSelection, setFileDirty, setFlowControllerDeclaration, setMargins, setSelectionOneUp, setToolTipText, setupToPrintFile, setValueChanged, setValueChangedBoolean, setValueChangedCapitalBoolean, setValueChangedInt, setValueChangedKeys, setVnsHostAndPort, setVnsHostAndPort, showExceptionReadingImportedDescriptor, spacer, stringArrayAdd, stringArrayRemove, swapIndexKeys, swapTableItems, swapTreeItems, typeOrFeatureArrayAdd, typeOrFeatureArrayRemove, typeOrFeatureArrayRemoveMethods inherited from class org.eclipse.ui.forms.SectionPart
expansionStateChanged, expansionStateChanging, getSection, hookListeners, setFocusMethods inherited from class org.eclipse.ui.forms.AbstractFormPart
commit, dispose, getManagedForm, isDirty, isStale, markDirty, markStale, setFormInput
-
Field Details
-
CASCADE_MESSAGE
The Constant CASCADE_MESSAGE.- See Also:
-
CASCADE_DELETE_WARNING
The Constant CASCADE_DELETE_WARNING.- See Also:
-
NAME_COL
public static final int NAME_COLThe Constant NAME_COL.- See Also:
-
SUPER_COL
public static final int SUPER_COLThe Constant SUPER_COL.- See Also:
-
RANGE_COL
public static final int RANGE_COLThe Constant RANGE_COL.- See Also:
-
MULTIPLE_REF_OK_COL
public static final int MULTIPLE_REF_OK_COLThe Constant MULTIPLE_REF_OK_COL.- See Also:
-
ELEMENT_TYPE_COL
public static final int ELEMENT_TYPE_COLThe Constant ELEMENT_TYPE_COL.- See Also:
-
AV_COL
public static final int AV_COLThe Constant AV_COL.- See Also:
-
HEADER_ALLOWED_VALUE
The Constant HEADER_ALLOWED_VALUE.- See Also:
-
-
Constructor Details
-
TypeSection
Instantiates a new type section.- Parameters:
editor- the editorparent- the parent
-
-
Method Details
-
initialize
public void initialize(org.eclipse.ui.forms.IManagedForm form) - Specified by:
initializein interfaceorg.eclipse.ui.forms.IFormPart- Overrides:
initializein classAbstractSection
-
refresh
public void refresh()- Specified by:
refreshin interfaceorg.eclipse.ui.forms.IFormPart- Overrides:
refreshin classorg.eclipse.ui.forms.AbstractFormPart
-
handleEvent
public void handleEvent(org.eclipse.swt.widgets.Event event) -
handleHover
public void handleHover(org.eclipse.swt.widgets.Event event) Handle hover.- Parameters:
event- the event
-
getTypeDescriptionFromTableTreeItem
public org.apache.uima.resource.metadata.TypeDescription getTypeDescriptionFromTableTreeItem(org.eclipse.swt.widgets.TreeItem item) Gets the type description from table tree item.- Parameters:
item- the item- Returns:
- the type description from table tree item
-
handleAddAllowedValue
public void handleAddAllowedValue(org.eclipse.swt.widgets.TreeItem parent) Handle add allowed value.- Parameters:
parent- the parent
-
handleAddFeature
public void handleAddFeature(org.eclipse.swt.widgets.TreeItem parent) Handle add feature.- Parameters:
parent- the parent
-
allowedValueUpdate
public void allowedValueUpdate(org.apache.uima.resource.metadata.AllowedValue av, AddAllowedValueDialog dialog) Allowed value update.- Parameters:
av- the avdialog- the dialog
-
featureUpdate
public void featureUpdate(org.apache.uima.resource.metadata.FeatureDescription fd, AddFeatureDialog dialog) Feature update.- Parameters:
fd- the fddialog- the dialog
-
handleAddType
public void handleAddType()Handle add type. -
getFeatureDescriptionFromTableTreeItem
public org.apache.uima.resource.metadata.FeatureDescription getFeatureDescriptionFromTableTreeItem(org.eclipse.swt.widgets.TreeItem item) Gets the feature description from table tree item.- Parameters:
item- the item- Returns:
- the feature description from table tree item
-
getAllowedValueFromTableTreeItem
public org.apache.uima.resource.metadata.AllowedValue getAllowedValueFromTableTreeItem(org.eclipse.swt.widgets.TreeItem item) Gets the allowed value from table tree item.- Parameters:
item- the item- Returns:
- the allowed value from table tree item
-
checkFeature
public String checkFeature(AddFeatureDialog dialog, org.apache.uima.resource.metadata.TypeDescription td, org.apache.uima.resource.metadata.FeatureDescription oldFd) verify a new or edited feature is valid. For new features: The name must be unique locally. It may duplicate a non-local feature that isn't also built-in. (We presume built-in features are fixed). (We allow dupl non-local feature in case this type system is used without the import, in some other context?) We don't use the TCas because it isn't necessarily being updated For edited features: If the name changed, do "new" test above on new name If the name changed, do "remove" test on old name: If used in an index or capability, but merged/built-in name not still there, warn about index being invalidated (not done here - done during feature update itself). If name used in index, and range is not indexable - error- Parameters:
dialog- the dialogtd- the tdoldFd- the old fd- Returns:
- error message or null
-
checkAllowedValue
public String checkAllowedValue(AddAllowedValueDialog dialog, org.apache.uima.resource.metadata.TypeDescription td, org.apache.uima.resource.metadata.AllowedValue av) Check allowed value.- Parameters:
dialog- the dialogtd- the tdav- the av- Returns:
- the string
-
checkDuplTypeName
returns null or error message about a duplicate type name Cases: Dupl type in local descriptor not allowed. Type that duplicates imported type is OK. Type that duplicates built-in type is OK.- Parameters:
newTypeName- the new type name- Returns:
- the string
-
enable
public void enable()Description copied from class:AbstractSectionEnable.- Specified by:
enablein classAbstractSection
-