Interface TypeDescription
-
- All Superinterfaces:
java.lang.Cloneable
,MetaDataObject
,java.io.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 FeatureDescription
addFeature(java.lang.String aFeatureName, java.lang.String aDescription, java.lang.String aRangeTypeName)
Convenience method which adds a FeatureDescription to this TypeDescription.FeatureDescription
addFeature(java.lang.String aFeatureName, java.lang.String aDescription, java.lang.String aRangeTypeName, java.lang.String aElementTypeName, java.lang.Boolean aMultipleReferencesAllowed)
Convenience method which adds a FeatureDescription to this TypeDescription.AllowedValue[]
getAllowedValues()
Gets the allowed values for instances of this Type.java.lang.String
getDescription()
Gets the verbose description of this Type.FeatureDescription[]
getFeatures()
Gets the descriptions of the features for this Type.java.lang.String
getName()
Gets the name of this Type.java.lang.String
getSupertypeName()
Gets the name of the supertype for this Type.void
setAllowedValues(AllowedValue[] aAllowedValues)
Sets the allowed values for instances of this Type.void
setDescription(java.lang.String aDescription)
Sets the verbose description of this Type.void
setFeatures(FeatureDescription[] aFeatures)
Sets the descriptions of the features for this Type.void
setName(java.lang.String aName)
Sets the name of this Type.void
setSupertypeName(java.lang.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
java.lang.String getName()
Gets the name of this Type.- Returns:
- the name of this Type
-
setName
void setName(java.lang.String aName)
Sets the name of this Type.- Parameters:
aName
- the name of this Type
-
getDescription
java.lang.String getDescription()
Gets the verbose description of this Type.- Returns:
- the description of this Type
-
setDescription
void setDescription(java.lang.String aDescription)
Sets the verbose description of this Type.- Parameters:
aDescription
- the description of this Type
-
getSupertypeName
java.lang.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(java.lang.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(java.lang.String aFeatureName, java.lang.String aDescription, java.lang.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(java.lang.String aFeatureName, java.lang.String aDescription, java.lang.String aRangeTypeName, java.lang.String aElementTypeName, java.lang.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
-
-