Class TypePriorities_impl
- java.lang.Object
-
- org.apache.uima.resource.metadata.impl.MetaDataObject_impl
-
- org.apache.uima.resource.metadata.impl.TypePriorities_impl
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,MetaDataObject,TypePriorities,XMLizable
public class TypePriorities_impl extends MetaDataObject_impl implements TypePriorities
Reference implementation ofTypePriorities.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
MetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.Serializer
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringmDescriptionprivate Import[]mImportsprivate java.lang.StringmNameprivate java.util.List<TypePriorityList>mPriorityListsprivate java.lang.StringmVendorprivate java.lang.StringmVersion(package private) static longserialVersionUID-
Fields inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
serialContext
-
-
Constructor Summary
Constructors Constructor Description TypePriorities_impl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TypePriorityListaddPriorityList()Creates a new, emptyTypePriorityListand adds it to this object.voidaddPriorityList(TypePriorityList aPriorityList)Adds aTypePriorityList.java.lang.Objectclone()Creates a clone of thisMetaDataObject.java.lang.StringgetDescription()Gets the description of this TypePriorities declaration.Import[]getImports()Gets the imports declared by this TypePriorities declaration.java.lang.StringgetName()Gets the name of this TypePriorities declaration.TypePriorityList[]getPriorityLists()Gets theTypePriorityLists that define the priorities.java.lang.StringgetVendor()Gets the vendor of this TypePriorities declaration.java.lang.StringgetVersion()Gets the version number of this TypePriorities declaration.protected XmlizationInfogetXmlizationInfo()To be implemented by subclasses to return information describing how to represent this object in XML.voidremovePriorityList(TypePriorityList aPriorityList)Removes aTypePriorityList.voidresolveImports()Resolves any import declarations in this Type Priorities declaration, adding the importedTypePriorityListobjects directly onto this TypePriorities object'spriorityLists.voidresolveImports(java.util.Collection<java.lang.String> aAlreadyImportedTypePrioritiesURLs, ResourceManager aResourceManager)Deprecated.voidresolveImports(ResourceManager aResourceManager)Resolves any import declarations in this Type Priorities declaration, adding the importedTypePriorityListobjects directly onto this TypePriorities object'spriorityLists.voidsetDescription(java.lang.String aDescription)Sets the description of this TypePriorities declaration.voidsetImports(Import[] aImports)Sets the imports declared by this TypePriorities declaration.voidsetName(java.lang.String aName)Sets the name of this TypePriorities declaration.voidsetPriorityLists(TypePriorityList[] aPriorityLists)Sets theTypePriorityLists that define the priorities.voidsetVendor(java.lang.String aVendor)Sets the vendor of this TypePriorities declaration.voidsetVersion(java.lang.String aVersion)Sets the version number of this TypePriorities declaration.protected voidwritePropertyAsElement(PropertyXmlInfo aPropInfo, java.lang.String aNamespace)Overridden to suppress <priorityLists> tag for TAF compatibility-
Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, buildFromXMLElement, equals, getAdditionalAttributes, getAttributeClass, getAttributes, getAttributeValue, getInfoset, getMatchingNode, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSerialContext, getSourceUrl, getSourceUrlString, getUnfilteredAttributes, getWrapperClass, getXMLAttributes, hashCode, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, resolveSettings, setAttributeValue, setInfoset, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, valueIsNullOrEmptyArray, writeArrayPropertyAsElement, writeMapPropertyToXml
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject
equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
-
Methods inherited from interface org.apache.uima.util.XMLizable
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
-
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
mName
private volatile java.lang.String mName
-
mVersion
private volatile java.lang.String mVersion
-
mDescription
private volatile java.lang.String mDescription
-
mVendor
private volatile java.lang.String mVendor
-
mImports
private volatile Import[] mImports
-
mPriorityLists
private java.util.List<TypePriorityList> mPriorityLists
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:TypePrioritiesGets the name of this TypePriorities declaration.- Specified by:
getNamein interfaceTypePriorities- Returns:
- the name of this TypePriorities declaration, null if none has been specified.
- See Also:
ResourceMetaData.getName()
-
setName
public void setName(java.lang.String aName)
Description copied from interface:TypePrioritiesSets the name of this TypePriorities declaration.- Specified by:
setNamein interfaceTypePriorities- Parameters:
aName- the name of this TypePriorities declaration- See Also:
ResourceMetaData.setName(String)
-
getVersion
public java.lang.String getVersion()
Description copied from interface:TypePrioritiesGets the version number of this TypePriorities declaration.- Specified by:
getVersionin interfaceTypePriorities- Returns:
- the version number of this TypePriorities declaration, as a String, null if none has been specified.
- See Also:
ResourceMetaData.getVersion()
-
setVersion
public void setVersion(java.lang.String aVersion)
Description copied from interface:TypePrioritiesSets the version number of this TypePriorities declaration.- Specified by:
setVersionin interfaceTypePriorities- Parameters:
aVersion- the version number of this TypePriorities declaration, as a String- See Also:
ResourceMetaData.setVersion(String)
-
getDescription
public java.lang.String getDescription()
Description copied from interface:TypePrioritiesGets the description of this TypePriorities declaration.- Specified by:
getDescriptionin interfaceTypePriorities- Returns:
- the description of this TypePriorities declaration, null if none has been specified.
- See Also:
ResourceMetaData.getDescription()
-
setDescription
public void setDescription(java.lang.String aDescription)
Description copied from interface:TypePrioritiesSets the description of this TypePriorities declaration.- Specified by:
setDescriptionin interfaceTypePriorities- Parameters:
aDescription- the description of this TypePriorities declaration- See Also:
ResourceMetaData.setDescription(String)
-
getVendor
public java.lang.String getVendor()
Description copied from interface:TypePrioritiesGets the vendor of this TypePriorities declaration.- Specified by:
getVendorin interfaceTypePriorities- Returns:
- the vendor of this TypePriorities declaration, as a String
- See Also:
ResourceMetaData.getVendor()
-
setVendor
public void setVendor(java.lang.String aVendor)
Description copied from interface:TypePrioritiesSets the vendor of this TypePriorities declaration.- Specified by:
setVendorin interfaceTypePriorities- Parameters:
aVendor- the vendor of this TypePriorities declaration, as a String, null if none has been specified.- See Also:
ResourceMetaData.setVendor(String)
-
getImports
public Import[] getImports()
Description copied from interface:TypePrioritiesGets the imports declared by this TypePriorities declaration.- Specified by:
getImportsin interfaceTypePriorities- Returns:
- an array of imports declared by this TypePriorities declaration.
- See Also:
TypeSystemDescription.getImports()
-
setImports
public void setImports(Import[] aImports)
Description copied from interface:TypePrioritiesSets the imports declared by this TypePriorities declaration.- Specified by:
setImportsin interfaceTypePriorities- Parameters:
aImports- an array of imports declared by this TypePriorities declaration.- See Also:
TypeSystemDescription.setImports(Import[])
-
getPriorityLists
public TypePriorityList[] getPriorityLists()
Description copied from interface:TypePrioritiesGets theTypePriorityLists that define the priorities. EachTypePriorityListdeclares the relative priority of two or more types.- Specified by:
getPriorityListsin interfaceTypePriorities- Returns:
- the
TypePriorityLists that define the priorities - See Also:
synchronized to prevent concurrent mod exceptions
-
setPriorityLists
public void setPriorityLists(TypePriorityList[] aPriorityLists)
Description copied from interface:TypePrioritiesSets theTypePriorityLists that define the priorities. EachTypePriorityListdeclares the relative priority of two or more types.- Specified by:
setPriorityListsin interfaceTypePriorities- Parameters:
aPriorityLists- theTypePriorityLists that define the priorities- See Also:
could be called by thread doing resolve imports, while another thread was iterating over them
-
addPriorityList
public void addPriorityList(TypePriorityList aPriorityList)
Description copied from interface:TypePrioritiesAdds aTypePriorityList.- Specified by:
addPriorityListin interfaceTypePriorities- Parameters:
aPriorityList- theTypePriorityListto add- See Also:
TypePriorities.addPriorityList(TypePriorityList)
-
addPriorityList
public TypePriorityList addPriorityList()
Description copied from interface:TypePrioritiesCreates a new, emptyTypePriorityListand adds it to this object.- Specified by:
addPriorityListin interfaceTypePriorities- Returns:
- the new
TypePriorityList, which can be modified by the caller - See Also:
TypePriorities.addPriorityList()
-
removePriorityList
public void removePriorityList(TypePriorityList aPriorityList)
Description copied from interface:TypePrioritiesRemoves aTypePriorityList.- Specified by:
removePriorityListin interfaceTypePriorities- Parameters:
aPriorityList- theTypePriorityListto remove- See Also:
TypePriorities.removePriorityList(TypePriorityList)
-
resolveImports
public void resolveImports() throws InvalidXMLExceptionDescription copied from interface:TypePrioritiesResolves 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.- Specified by:
resolveImportsin interfaceTypePriorities- Throws:
InvalidXMLException- if either the import target does not exist or is invalid- See Also:
TypeSystemDescription.resolveImports()
-
resolveImports
public void resolveImports(ResourceManager aResourceManager) throws InvalidXMLException
Description copied from interface:TypePrioritiesResolves 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.- Specified by:
resolveImportsin interfaceTypePriorities- 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 public void resolveImports(java.util.Collection<java.lang.String> aAlreadyImportedTypePrioritiesURLs, ResourceManager aResourceManager) throws InvalidXMLExceptionDeprecated.Description copied from interface:TypePrioritiesResolves 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.
- Specified by:
resolveImportsin interfaceTypePriorities- Parameters:
aAlreadyImportedTypePrioritiesURLs- 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
-
writePropertyAsElement
protected void writePropertyAsElement(PropertyXmlInfo aPropInfo, java.lang.String aNamespace) throws org.xml.sax.SAXException
Overridden to suppress <priorityLists> tag for TAF compatibility- Overrides:
writePropertyAsElementin classMetaDataObject_impl- Parameters:
aPropInfo- information on how to represent the property in XMLaNamespace- XML namespace URI for this object representation- Throws:
org.xml.sax.SAXException- -- See Also:
MetaDataObject_impl.writePropertyAsElement(org.apache.uima.resource.metadata.impl.PropertyXmlInfo, java.lang.String)
-
clone
public java.lang.Object clone()
Description copied from interface:MetaDataObjectCreates a clone of thisMetaDataObject. This performs a "deep" copy by cloning all attribute values that are also MetaDataObjects.- Specified by:
clonein interfaceMetaDataObject- Overrides:
clonein classMetaDataObject_impl- Returns:
- a clone of this
MetaDataObject - See Also:
multi-core: could be cloning while another thread is modifying?
-
getXmlizationInfo
protected XmlizationInfo getXmlizationInfo()
Description copied from class:MetaDataObject_implTo be implemented by subclasses to return information describing how to represent this object in XML.- Specified by:
getXmlizationInfoin classMetaDataObject_impl- Returns:
- information defining this object's XML representation
- See Also:
MetaDataObject_impl.getXmlizationInfo()
-
-