org.apache.uima.resource.metadata.impl
Class TypeDescription_impl

java.lang.Object
  extended by org.apache.uima.resource.metadata.impl.MetaDataObject_impl
      extended by org.apache.uima.resource.metadata.impl.TypeDescription_impl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, MetaDataObject, TypeDescription, XMLizable

public class TypeDescription_impl
extends MetaDataObject_impl
implements TypeDescription

Reference implementation of TypeDescription. Under construction.

See Also:
Serialized Form

Constructor Summary
TypeDescription_impl()
          Creates a new TypeDescription_impl with null field values.
TypeDescription_impl(java.lang.String aName, java.lang.String aDescription, java.lang.String aSupertypeName)
          Creates a new TypeDescription_impl with the specified field values.
 
Method Summary
 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.
protected  XmlizationInfo getXmlizationInfo()
          To be implemented by subclasses to return information describing how to represent this object in XML.
 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 class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, buildFromXMLElement, clone, equals, getAttributeClass, getAttributeValue, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, setAttributeValue, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, writeArrayPropertyAsElement, writeMapPropertyToXml, writePropertyAsElement
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
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
 

Constructor Detail

TypeDescription_impl

public TypeDescription_impl()
Creates a new TypeDescription_impl with null field values.


TypeDescription_impl

public TypeDescription_impl(java.lang.String aName,
                            java.lang.String aDescription,
                            java.lang.String aSupertypeName)
Creates a new TypeDescription_impl with the specified field values.

Parameters:
aName - name of the Type
aSupertypeName - name of the type's supertype
Method Detail

getName

public java.lang.String getName()
Description copied from interface: TypeDescription
Gets the name of this Type.

Specified by:
getName in interface TypeDescription
Returns:
the name of this Type
See Also:
org.apache.uima.cas.TypeDescription#getName()

setName

public void setName(java.lang.String aName)
Description copied from interface: TypeDescription
Sets the name of this Type.

Specified by:
setName in interface TypeDescription
Parameters:
aName - the name of this Type
See Also:
org.apache.uima.cas.TypeDescription#setName(String)

getDescription

public java.lang.String getDescription()
Description copied from interface: TypeDescription
Gets the verbose description of this Type.

Specified by:
getDescription in interface TypeDescription
Returns:
the description of this Type
See Also:
org.apache.uima.analysis_engine.metadata.TypeDescription#getDescription()

setDescription

public void setDescription(java.lang.String aDescription)
Description copied from interface: TypeDescription
Sets the verbose description of this Type.

Specified by:
setDescription in interface TypeDescription
Parameters:
aDescription - the description of this Type
See Also:
org.apache.uima.analysis_engine.metadata.TypeDescription#setDescription(java.lang.String)

getSupertypeName

public java.lang.String getSupertypeName()
Description copied from interface: TypeDescription
Gets the name of the supertype for this Type. This is the Type from which this Type inherits.

Specified by:
getSupertypeName in interface TypeDescription
Returns:
the name of the supertype for this Type
See Also:
org.apache.uima.cas.TypeDescription#getSupertypeName()

setSupertypeName

public void setSupertypeName(java.lang.String aTypeName)
Description copied from interface: TypeDescription
Sets the name of the supertype for this Type. This is the Type from which this Type inherits.

Specified by:
setSupertypeName in interface TypeDescription
Parameters:
aTypeName - the name of the supertype for this Type
See Also:
org.apache.uima.cas.TypeDescription#setSupertypeName(String)

getFeatures

public FeatureDescription[] getFeatures()
Description copied from interface: TypeDescription
Gets the descriptions of the features for this Type.

Specified by:
getFeatures in interface TypeDescription
Returns:
the descriptions of the features for this Type.
See Also:
org.apache.uima.cas.TypeDescription#getFeatures()

setFeatures

public void setFeatures(FeatureDescription[] aFeatures)
Description copied from interface: TypeDescription
Sets the descriptions of the features for this Type.

Specified by:
setFeatures in interface TypeDescription
Parameters:
aFeatures - descriptions of the features for this Type.
See Also:
org.apache.uima.cas.TypeDescription#setFeatures(FeatureDescription[])

getAllowedValues

public AllowedValue[] getAllowedValues()
Description copied from interface: TypeDescription
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 return null. Note that if a type has allowed values, it may not have features.

Specified by:
getAllowedValues in interface TypeDescription
Returns:
the allowed values for instances of this Type
See Also:
org.apache.uima.analysis_engine.metadata.TypeDescription#getAllowedValues()

setAllowedValues

public void setAllowedValues(AllowedValue[] aAllowedValues)
Description copied from interface: TypeDescription
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 be null. Note that if a type has allowed values, it may not have features.

Specified by:
setAllowedValues in interface TypeDescription
Parameters:
aAllowedValues - the allowed values for instances of this Type
See Also:
org.apache.uima.analysis_engine.metadata.TypeDescription#setAllowedValues(org.apache.uima.analysis_engine.metadata.AllowedValue[])

addFeature

public FeatureDescription addFeature(java.lang.String aFeatureName,
                                     java.lang.String aDescription,
                                     java.lang.String aRangeTypeName)
Description copied from interface: TypeDescription
Convenience method which adds a FeatureDescription to this TypeDescription.

Specified by:
addFeature in interface TypeDescription
Parameters:
aFeatureName - name of feature to add
aDescription - verbose description of the feature
aRangeTypeName - name of feature's range type
Returns:
description of the new Feature
See Also:
org.apache.uima.cas.TypeDescription#addFeature(String, String, String)

addFeature

public FeatureDescription addFeature(java.lang.String aFeatureName,
                                     java.lang.String aDescription,
                                     java.lang.String aRangeTypeName,
                                     java.lang.String aElementTypeName,
                                     java.lang.Boolean aMultipleReferencesAllowed)
Description copied from interface: TypeDescription
Convenience method which adds a FeatureDescription to this TypeDescription. Used for array or list valued features, which have additional attributes.

Specified by:
addFeature in interface TypeDescription
Parameters:
aFeatureName - name of feature to add
aDescription - verbose description of the feature
aRangeTypeName - name of feature's range type
aElementTypeName - type of element expected to be contained in the array or list
aMultipleReferencesAllowed - 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

getXmlizationInfo

protected XmlizationInfo getXmlizationInfo()
Description copied from class: MetaDataObject_impl
To be implemented by subclasses to return information describing how to represent this object in XML.

Specified by:
getXmlizationInfo in class MetaDataObject_impl
Returns:
information defining this object's XML representation


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.