Interface TypeDescription
-
- All Superinterfaces:
Cloneable,MetaDataObject,Serializable,XMLizable
- All Known Implementing Classes:
TypeDescription_impl
public interface TypeDescription extends MetaDataObject
A description of a CAS Type. This implementsMetaDataObject, which implementsXMLizable, so it can be serialized to and deserialized from an XML element.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeDescription[]EMPTY_TYPE_DESCRIPTIONS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FeatureDescriptionaddFeature(String aFeatureName, String aDescription, String aRangeTypeName)Convenience method which adds a FeatureDescription to this TypeDescription.FeatureDescriptionaddFeature(String aFeatureName, String aDescription, String aRangeTypeName, String aElementTypeName, Boolean aMultipleReferencesAllowed)Convenience method which adds a FeatureDescription to this TypeDescription.AllowedValue[]getAllowedValues()Gets the allowed values for instances of this Type.StringgetDescription()Gets the verbose description of this Type.FeatureDescription[]getFeatures()Gets the descriptions of the features for this Type.StringgetName()Gets the name of this Type.StringgetSupertypeName()Gets the name of the supertype for this Type.voidsetAllowedValues(AllowedValue[] aAllowedValues)Sets the allowed values for instances of this Type.voidsetDescription(String aDescription)Sets the verbose description of this Type.voidsetFeatures(FeatureDescription[] aFeatures)Sets the descriptions of the features for this Type.voidsetName(String aName)Sets the name of this Type.voidsetSupertypeName(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 Detail
-
EMPTY_TYPE_DESCRIPTIONS
static final TypeDescription[] EMPTY_TYPE_DESCRIPTIONS
-
-
Method Detail
-
getName
String getName()
Gets the name of this Type.- Returns:
- the name of this Type
-
setName
void setName(String aName)
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
void setDescription(String aDescription)
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
void setSupertypeName(String aTypeName)
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
void setFeatures(FeatureDescription[] aFeatures)
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
void setAllowedValues(AllowedValue[] aAllowedValues)
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
FeatureDescription addFeature(String aFeatureName, String aDescription, String aRangeTypeName)
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
-
-