Interface TypePriorities
- All Superinterfaces:
Cloneable,MetaDataObject,Serializable,XMLizable
- All Known Implementing Classes:
TypePriorities_impl
FsIndexDescription.
This object implements MetaDataObject, which implements
XMLizable, so it can be serialized to and deserialized from an XML
element.
TypePriorities can declare that they import other TypePriorities. At
runtime, these imports will be resolved to create a single logical TypePriorities object.
Note that type priorities imports are not automatically resolved when a TypePriorities object is
deserialized from XML. To resolve the imports, call the resolveImports() method. Import
resolution is done automatically when a CAS is created using a TypePriorities object.
TypePriorities declarations can optionally be assigned a name,
description, vendor, and version. It is recommended that these properties be set on any TypePriorities declaration that
is meant to be shared by (imported by) multiple components.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new, emptyTypePriorityListand adds it to this object.voidaddPriorityList(TypePriorityList aPriorityList) Adds aTypePriorityList.Gets the description of this TypePriorities declaration.Import[]Gets the imports declared by this TypePriorities declaration.getName()Gets the name of this TypePriorities declaration.Gets theTypePriorityLists that define the priorities.Gets the vendor of this TypePriorities declaration.Gets the version number of this TypePriorities declaration.voidremovePriorityList(TypePriorityList aPriorityList) Removes aTypePriorityList.voidResolves any import declarations in this Type Priorities declaration, adding the importedTypePriorityListobjects directly onto this TypePriorities object'spriorityLists.voidresolveImports(Collection<String> aAlreadyImportedPriorityListURLs, ResourceManager aResourceManager) Deprecated.Method is deprecated because it should only be used internally.voidresolveImports(ResourceManager aResourceManager) Resolves any import declarations in this Type Priorities declaration, adding the importedTypePriorityListobjects directly onto this TypePriorities object'spriorityLists.voidsetDescription(String aDescription) Sets the description of this TypePriorities declaration.voidsetImports(Import[] aImports) Sets the imports declared by this TypePriorities declaration.voidSets the name of this TypePriorities declaration.voidsetPriorityLists(TypePriorityList[] aPriorityLists) Sets theTypePriorityLists that define the priorities.voidSets the vendor of this TypePriorities declaration.voidsetVersion(String aVersion) Sets the version number of this TypePriorities declaration.Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrlMethods inherited from interface org.apache.uima.util.XMLizable
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
-
Method Details
-
getName
String getName()Gets the name of this TypePriorities declaration.- Returns:
- the name of this TypePriorities declaration, null if none has been specified.
-
setName
Sets the name of this TypePriorities declaration.- Parameters:
aName- the name of this TypePriorities declaration- Throws:
UIMA_UnsupportedOperationException- if this object is not modifiable
-
getVersion
String getVersion()Gets the version number of this TypePriorities declaration.- Returns:
- the version number of this TypePriorities declaration, as a String, null if none has been specified.
-
setVersion
Sets the version number of this TypePriorities declaration.- Parameters:
aVersion- the version number of this TypePriorities declaration, as a String- Throws:
UIMA_UnsupportedOperationException- if this object is not modifiable
-
getDescription
String getDescription()Gets the description of this TypePriorities declaration.- Returns:
- the description of this TypePriorities declaration, null if none has been specified.
-
setDescription
Sets the description of this TypePriorities declaration.- Parameters:
aDescription- the description of this TypePriorities declaration- Throws:
UIMA_UnsupportedOperationException- if this object is not modifiable
-
getVendor
String getVendor()Gets the vendor of this TypePriorities declaration.- Returns:
- the vendor of this TypePriorities declaration, as a String
-
setVendor
Sets the vendor of this TypePriorities declaration.- Parameters:
aVendor- the vendor of this TypePriorities declaration, as a String, null if none has been specified.- Throws:
UIMA_UnsupportedOperationException- if this object is not modifiable
-
getImports
Import[] getImports()Gets the imports declared by this TypePriorities declaration.- Returns:
- an array of imports declared by this TypePriorities declaration.
-
setImports
Sets the imports declared by this TypePriorities declaration.- Parameters:
aImports- an array of imports declared by this TypePriorities declaration.
-
getPriorityLists
TypePriorityList[] getPriorityLists()Gets theTypePriorityLists that define the priorities. EachTypePriorityListdeclares the relative priority of two or more types.- Returns:
- the
TypePriorityLists that define the priorities
-
setPriorityLists
Sets theTypePriorityLists that define the priorities. EachTypePriorityListdeclares the relative priority of two or more types.- Parameters:
aPriorityLists- theTypePriorityLists that define the priorities
-
addPriorityList
Adds aTypePriorityList.- Parameters:
aPriorityList- theTypePriorityListto add
-
addPriorityList
TypePriorityList addPriorityList()Creates a new, emptyTypePriorityListand adds it to this object.- Returns:
- the new
TypePriorityList, which can be modified by the caller
-
removePriorityList
Removes aTypePriorityList.- Parameters:
aPriorityList- theTypePriorityListto remove
-
resolveImports
Resolves any import declarations in this Type Priorities declaration, adding the importedTypePriorityListobjects directly onto this TypePriorities object'spriorityLists. The import elements are then deleted, so this results in a structure that is equivalent to the imported elements having been defined locally.- Throws:
InvalidXMLException- if either the import target does not exist or is invalid
-
resolveImports
Resolves any import declarations in this Type Priorities declaration, adding the importedTypePriorityListobjects directly onto this TypePriorities object'spriorityLists. The import elements are then deleted, so this results in a structure that is equivalent to the imported elements having been defined locally.- Parameters:
aResourceManager- the Resource Manager used to locate type priorities XML files imported by name. For example, the path in which to locate these type priorities XML files can be set via theResourceManager.setDataPath(String)method.- Throws:
InvalidXMLException- if either the import target does not exist or is invalid
-
resolveImports
@Deprecated void resolveImports(Collection<String> aAlreadyImportedPriorityListURLs, ResourceManager aResourceManager) throws InvalidXMLException Deprecated.Method is deprecated because it should only be used internally. Scheduled for removal in UIMA 4.0.Resolves any import declarations in this Type Priorities declaration, adding the importedTypePriorityListobjects directly onto this TypePriorities object'spriorityLists. The import elements are then deleted, so this results in a structure that is equivalent to the imported elements having been defined locally.This version is used internally to resolve nested imports.
- Parameters:
aAlreadyImportedPriorityListURLs- URLs of already imported type priorities, so we don't import them again.aResourceManager- the Resource Manager used to locate type priorities XML files imported by name. For example, the path in which to locate these type priorities XML files can be set via theResourceManager.setDataPath(String)method.- Throws:
InvalidXMLException- if either the import target does not exist or is invalid
-