Interface FeatureDescription
-
- All Superinterfaces:
java.lang.Cloneable
,MetaDataObject
,java.io.Serializable
,XMLizable
- All Known Implementing Classes:
FeatureDescription_impl
public interface FeatureDescription extends MetaDataObject
A description of a CAS feature. This implementsMetaDataObject
, which implementsXMLizable
, so it can be serialized to and deserialized from an XML element.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getDescription()
Gets the verbose description of this Feature.java.lang.String
getElementType()
For a feature with a range type that is an array or list, gets the expected type of the elements of that array or list.java.lang.Boolean
getMultipleReferencesAllowed()
For a feature with a range type that is an array or list, gets whether value of the feature may also be referenced from another feature elsewhere in the CAS.java.lang.String
getName()
Gets the name of this Feature.java.lang.String
getRangeTypeName()
Gets the name of the range Type of this Feature.void
setDescription(java.lang.String aDescription)
Sets the verbose description of this Feature.void
setElementType(java.lang.String aElementType)
For a multi-valued (array or list) feature, sets the expected type of the elements of that array or list.void
setMultipleReferencesAllowed(java.lang.Boolean aAllowed)
For a feature with a range type that is an array or list, sets whether value of the feature may also be referenced from another feature elsewhere in the CAS.void
setName(java.lang.String aName)
Sets the name of this Feature.void
setRangeTypeName(java.lang.String aTypeName)
Sets the name of the range Type of this Feature.-
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
-
-
-
-
Method Detail
-
getName
java.lang.String getName()
Gets the name of this Feature.- Returns:
- the name of this Feature
-
setName
void setName(java.lang.String aName)
Sets the name of this Feature.- Parameters:
aName
- the name of this Feature
-
getDescription
java.lang.String getDescription()
Gets the verbose description of this Feature.- Returns:
- the description of this Feature
-
setDescription
void setDescription(java.lang.String aDescription)
Sets the verbose description of this Feature.- Parameters:
aDescription
- the description of this Feature
-
getRangeTypeName
java.lang.String getRangeTypeName()
Gets the name of the range Type of this Feature.- Returns:
- the name of the range Type of this Feature
-
setRangeTypeName
void setRangeTypeName(java.lang.String aTypeName)
Sets the name of the range Type of this Feature.- Parameters:
aTypeName
- the name of the range Type of this Feature
-
getElementType
java.lang.String getElementType()
For a feature with a range type that is an array or list, gets the expected type of the elements of that array or list. This is optional; if omitted the array or list can contain any type. There is currently no guarantee that the framework will enforce this type restriction. This property should not be set for features whose range type is not an array or list.- Returns:
- the expected element type of an array or list feature, null if there is no restriction.
-
setElementType
void setElementType(java.lang.String aElementType)
For a multi-valued (array or list) feature, sets the expected type of the elements of that array or list. This is optional; if omitted the array or list can contain any type. There is currently no guarantee that the framework will enforce this type restriction. This property should not be set for features whose range type is not an array or list.- Parameters:
aElementType
- the expected element type of an array or list feature, null if there is no restriction.
-
getMultipleReferencesAllowed
java.lang.Boolean getMultipleReferencesAllowed()
For a feature with a range type that is an array or list, gets whether value of the feature may also be referenced from another feature elsewhere in the CAS.This returns a Boolean object so that we can distinguish whether the descriptor contained no setting (null) versus an explicit setting of false. We want to preserve this if the descriptor is written out again.
Setting this to false (the default) indicates that this feature has exclusive ownership of the array or list, so changes to the array or list are localized. Setting this to true indicates that the array or list may be shared, so changes to it may affect other objects in the CAS.
There is currently no guarantee that the framework will enforce this restriction. However, this setting may affect how the CAS is serialized.
This property should always be null for features whose range type is not an array or list.
- Returns:
- true if multiple references to an array or list are allowed, false if not.
-
setMultipleReferencesAllowed
void setMultipleReferencesAllowed(java.lang.Boolean aAllowed)
For a feature with a range type that is an array or list, sets whether value of the feature may also be referenced from another feature elsewhere in the CAS.This takes a Boolean object so that we can distinguish whether the descriptor contained no setting (null) versus an explicit setting of false. We want to preserve this if the descriptor is written out again.
Setting this to false (the default) indicates that this feature has exclusive ownership of the array or list, so changes to the array or list are localized. Setting this to true indicates that the array or list may be shared, so changes to it may affect other objects in the CAS.
There is currently no guarantee that the framework will enforce this restriction. However, this setting may affect how the CAS is serialized.
This property should never be set for features whose range type is not an array or list.
- Parameters:
aAllowed
- true if multiple references to an array or list are allowed, false if not.
-
-