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, emptyTypePriorityList
and adds it to this object.void
addPriorityList
(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 theTypePriorityList
s that define the priorities.Gets the vendor of this TypePriorities declaration.Gets the version number of this TypePriorities declaration.void
removePriorityList
(TypePriorityList aPriorityList) Removes aTypePriorityList
.void
Resolves any import declarations in this Type Priorities declaration, adding the importedTypePriorityList
objects directly onto this TypePriorities object'spriorityLists
.void
resolveImports
(Collection<String> aAlreadyImportedPriorityListURLs, ResourceManager aResourceManager) Deprecated.Method is deprecated because it should only be used internally.void
resolveImports
(ResourceManager aResourceManager) Resolves any import declarations in this Type Priorities declaration, adding the importedTypePriorityList
objects directly onto this TypePriorities object'spriorityLists
.void
setDescription
(String aDescription) Sets the description of this TypePriorities declaration.void
setImports
(Import[] aImports) Sets the imports declared by this TypePriorities declaration.void
Sets the name of this TypePriorities declaration.void
setPriorityLists
(TypePriorityList[] aPriorityLists) Sets theTypePriorityList
s that define the priorities.void
Sets the vendor of this TypePriorities declaration.void
setVersion
(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, setSourceUrl
Methods 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 theTypePriorityList
s that define the priorities. EachTypePriorityList
declares the relative priority of two or more types.- Returns:
- the
TypePriorityList
s that define the priorities
-
setPriorityLists
Sets theTypePriorityList
s that define the priorities. EachTypePriorityList
declares the relative priority of two or more types.- Parameters:
aPriorityLists
- theTypePriorityList
s that define the priorities
-
addPriorityList
Adds aTypePriorityList
.- Parameters:
aPriorityList
- theTypePriorityList
to add
-
addPriorityList
TypePriorityList addPriorityList()Creates a new, emptyTypePriorityList
and adds it to this object.- Returns:
- the new
TypePriorityList
, which can be modified by the caller
-
removePriorityList
Removes aTypePriorityList
.- Parameters:
aPriorityList
- theTypePriorityList
to remove
-
resolveImports
Resolves any import declarations in this Type Priorities declaration, adding the importedTypePriorityList
objects 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 importedTypePriorityList
objects 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 importedTypePriorityList
objects 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
-