Interface TypeDescription
- All Superinterfaces:
Cloneable
,MetaDataObject
,Serializable
,XMLizable
- All Known Implementing Classes:
TypeDescription_impl
A description of a CAS Type. This implements
MetaDataObject
, which implements
XMLizable
, so it can be serialized to and deserialized from an XML
element.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddFeature
(String aFeatureName, String aDescription, String aRangeTypeName) Convenience method which adds a FeatureDescription to this TypeDescription.addFeature
(String aFeatureName, String aDescription, String aRangeTypeName, String aElementTypeName, Boolean aMultipleReferencesAllowed) Convenience method which adds a FeatureDescription to this TypeDescription.Gets the allowed values for instances of this Type.Gets the verbose description of this Type.Gets the descriptions of the features for this Type.getName()
Gets the name of this Type.Gets the name of the supertype for this Type.void
setAllowedValues
(AllowedValue[] aAllowedValues) Sets the allowed values for instances of this Type.void
setDescription
(String aDescription) Sets the verbose description of this Type.void
setFeatures
(FeatureDescription[] aFeatures) Sets the descriptions of the features for this Type.void
Sets the name of this Type.void
setSupertypeName
(String aTypeName) Sets the name of the supertype for this Type.Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
Methods inherited from interface org.apache.uima.util.XMLizable
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
-
Field Details
-
EMPTY_TYPE_DESCRIPTIONS
-
-
Method Details
-
getName
String getName()Gets the name of this Type.- Returns:
- the name of this Type
-
setName
Sets the name of this Type.- Parameters:
aName
- the name of this Type
-
getDescription
String getDescription()Gets the verbose description of this Type.- Returns:
- the description of this Type
-
setDescription
Sets the verbose description of this Type.- Parameters:
aDescription
- the description of this Type
-
getSupertypeName
String getSupertypeName()Gets the name of the supertype for this Type. This is the Type from which this Type inherits.- Returns:
- the name of the supertype for this Type
-
setSupertypeName
Sets the name of the supertype for this Type. This is the Type from which this Type inherits.- Parameters:
aTypeName
- the name of the supertype for this Type
-
getFeatures
FeatureDescription[] getFeatures()Gets the descriptions of the features for this Type.- Returns:
- the descriptions of the features for this Type.
-
setFeatures
Sets the descriptions of the features for this Type.- Parameters:
aFeatures
- descriptions of the features for this Type.
-
getAllowedValues
AllowedValue[] getAllowedValues()Gets the allowed values for instances of this Type. This is used only for special "enumerated types" that extend the String type and define a specific set of allowed values. For all other Types this will returnnull
. Note that if a type has allowed values, it may not have features.- Returns:
- the allowed values for instances of this Type
-
setAllowedValues
Sets the allowed values for instances of this Type. This is used only for special "enumerated types" that extend the String type and define a specific set of allowed values. For all other Types this property should benull
. Note that if a type has allowed values, it may not have features.- Parameters:
aAllowedValues
- the allowed values for instances of this Type
-
addFeature
Convenience method which adds a FeatureDescription to this TypeDescription.- Parameters:
aFeatureName
- name of feature to addaDescription
- verbose description of the featureaRangeTypeName
- name of feature's range type- Returns:
- description of the new Feature
-
addFeature
FeatureDescription addFeature(String aFeatureName, String aDescription, String aRangeTypeName, String aElementTypeName, Boolean aMultipleReferencesAllowed) Convenience method which adds a FeatureDescription to this TypeDescription. Used for array or list valued features, which have additional attributes.- Parameters:
aFeatureName
- name of feature to addaDescription
- verbose description of the featureaRangeTypeName
- name of feature's range typeaElementTypeName
- type of element expected to be contained in the array or listaMultipleReferencesAllowed
- whether an array or list that's assigned to this feature can also be referenced from another feature. This is a Boolean object so that the null value can be used to represent the case where the user has not specified a value.- Returns:
- description of the new Feature
-