Interface Type
- All Known Implementing Classes:
TypeImpl
,TypeImpl_annot
,TypeImpl_annotBase
,TypeImpl_array
,TypeImpl_list
,TypeImpl_primitive
,TypeImpl_string
,TypeImpl_stringSubtype
Type names are Java strings that look like Java class names. For example, the
built-in annotation type is called uima.tcas.Annotation
. The whole string is called
the (fully) qualified type name. The part after the last period is called the short or base name.
The rest of the name is the name space of the type. This part can be empty, in which case the
qualified and the base name are identical.
Type system identifiers in general have the following syntax: they are non-empty strings whose first character is a letter (Unicode letter), followed by an arbitrary sequence of letters, digits and underscores. No other characters are legal parts of identifiers. A type name is then a non-empty sequence of identifiers separated by periods. See also Feature names.
Implements Iterable over all the features defined for this type.
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.For array types, returns the component type of the array type.getFeatureByBaseName
(String featureName) Retrieve a feature for this type.Get a vector of the features for which this type is a subtype of the features' domain (i.e., inherited features are also returned).getName()
Get the fully qualified name of the type.int
Get the number of features for which this type defines the domain.Get the unqualified, short name of this type.boolean
isArray()
Check if the type is an array type.boolean
Check if type is feature final, i.e., if no more new features may be defined for it.boolean
Check if type is inheritance final, i.e., if new types can be derived from it.boolean
Check if the type is one of the primitive types.boolean
boolean
Check if the type is a String subtype.default boolean
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getName
String getName()Get the fully qualified name of the type.- Returns:
- The name of the type.
-
getShortName
String getShortName()Get the unqualified, short name of this type.- Returns:
- The short name of this type.
-
getAppropriateFeatures
Deprecated.UsegetFeatures()
instead.Get a vector of the features for which this type is a subtype of the features' domain (i.e., inherited features are also returned). If you need to know which type introduces a feature, useFeature.getDomain
. Features will be listed in no particular order.- Returns:
- The Vector of features.
-
getFeatures
Get a vector of the features for which this type is a subtype of the features' domain (i.e., inherited features are also returned). If you need to know which type introduces a feature, useFeature.getDomain
. Features will be listed in no particular order.- Returns:
- The List of features defined for this type.
-
getNumberOfFeatures
int getNumberOfFeatures()Get the number of features for which this type defines the domain. This includes inherited features.- Returns:
- The number of features.
-
getFeatureByBaseName
Retrieve a feature for this type. Inherited features can also be retrieved this way.- Parameters:
featureName
- The short, unqualified name of the feature.- Returns:
- The feature, if it exists;
null
, else.
-
isFeatureFinal
boolean isFeatureFinal()Check if type is feature final, i.e., if no more new features may be defined for it.- Returns:
- If type is feature final.
-
isInheritanceFinal
boolean isInheritanceFinal()Check if type is inheritance final, i.e., if new types can be derived from it.- Returns:
- If type is inheritance final.
-
isPrimitive
boolean isPrimitive()Check if the type is one of the primitive types.- Returns:
true
iff type is a primitive type.
-
isArray
boolean isArray()Check if the type is an array type.- Returns:
true
iff the type is an array type.
-
isStringSubtype
boolean isStringSubtype()Check if the type is a String subtype. Note: returns false if a plain string- Returns:
true
iff the type is a String subtype type; false for plain string
-
isStringOrStringSubtype
boolean isStringOrStringSubtype()- Returns:
- true if is a String or a StringSubtype
-
getComponentType
Type getComponentType()For array types, returns the component type of the array type. For all other types, it will returnnull
.- Returns:
- The component type of an array type.
-
subsumes
- Parameters:
subtype
- - a UIMA Type- Returns:
- true if this type subsumes (is equal or a supertype of) the subtype argument
-
getFeatures()
instead.