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

java.lang.Object
  extended by org.apache.uima.resource.metadata.impl.MetaDataObject_impl
      extended by 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 of TypePriorities.

See Also:
Serialized Form

Constructor Summary
TypePriorities_impl()
           
 
Method Summary
 TypePriorityList addPriorityList()
          Creates a new, empty TypePriorityList and adds it to this object.
 void addPriorityList(TypePriorityList aPriorityList)
          Adds a TypePriorityList.
 java.lang.Object clone()
          Creates a clone of this MetaDataObject.
 java.lang.String getDescription()
          Gets the description of this TypePriorities declaration.
 Import[] getImports()
          Gets the imports declared by this TypePriorities declaration.
 java.lang.String getName()
          Gets the name of this TypePriorities declaration.
 TypePriorityList[] getPriorityLists()
          Gets the TypePriorityLists that define the priorities.
 java.lang.String getVendor()
          Gets the vendor of this TypePriorities declaration.
 java.lang.String getVersion()
          Gets the version number of this TypePriorities declaration.
protected  XmlizationInfo getXmlizationInfo()
          To be implemented by subclasses to return information describing how to represent this object in XML.
 void removePriorityList(TypePriorityList aPriorityList)
          Removes a TypePriorityList.
 void resolveImports()
          Resolves any import declarations in this Type Priorities declaration, adding the imported TypePriorityList objects directly onto this TypePriorities object's priorityLists.
 void resolveImports(java.util.Collection<java.lang.String> aAlreadyImportedTypePrioritiesURLs, ResourceManager aResourceManager)
          Resolves any import declarations in this Type Priorities declaration, adding the imported TypePriorityList objects directly onto this TypePriorities object's priorityLists.
 void resolveImports(ResourceManager aResourceManager)
          Resolves any import declarations in this Type Priorities declaration, adding the imported TypePriorityList objects directly onto this TypePriorities object's priorityLists.
 void setDescription(java.lang.String aDescription)
          Sets the description of this TypePriorities declaration.
 void setImports(Import[] aImports)
          Sets the imports declared by this TypePriorities declaration.
 void setName(java.lang.String aName)
          Sets the name of this TypePriorities declaration.
 void setPriorityLists(TypePriorityList[] aPriorityLists)
          Sets the TypePriorityLists that define the priorities.
 void setVendor(java.lang.String aVendor)
          Sets the vendor of this TypePriorities declaration.
 void setVersion(java.lang.String aVersion)
          Sets the version number of this TypePriorities declaration.
protected  void writePropertyAsElement(PropertyXmlInfo aPropInfo, java.lang.String aNamespace, org.xml.sax.ContentHandler aContentHandler)
          Utility method used to write a property out as an XML element.
 
Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, buildFromXMLElement, 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
 
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
 

Constructor Detail

TypePriorities_impl

public TypePriorities_impl()
Method Detail

getName

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

Specified by:
getName in interface TypePriorities
Returns:
the name of this TypePriorities declaration, null if none has been specified.
See Also:
org.apache.uima.resource.ResourceMetaData#getName()

setName

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

Specified by:
setName in interface TypePriorities
Parameters:
aName - the name of this TypePriorities declaration
See Also:
org.apache.uima.resource.ResourceMetaData#setName(String)

getVersion

public java.lang.String getVersion()
Description copied from interface: TypePriorities
Gets the version number of this TypePriorities declaration.

Specified by:
getVersion in interface TypePriorities
Returns:
the version number of this TypePriorities declaration, as a String, null if none has been specified.
See Also:
org.apache.uima.resource.ResourceMetaData#getVersion()

setVersion

public void setVersion(java.lang.String aVersion)
Description copied from interface: TypePriorities
Sets the version number of this TypePriorities declaration.

Specified by:
setVersion in interface TypePriorities
Parameters:
aVersion - the version number of this TypePriorities declaration, as a String
See Also:
org.apache.uima.resource.ResourceMetaData#setVersion(String)

getDescription

public java.lang.String getDescription()
Description copied from interface: TypePriorities
Gets the description of this TypePriorities declaration.

Specified by:
getDescription in interface TypePriorities
Returns:
the description of this TypePriorities declaration, null if none has been specified.
See Also:
org.apache.uima.resource.ResourceMetaData#getDescription()

setDescription

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

Specified by:
setDescription in interface TypePriorities
Parameters:
aDescription - the description of this TypePriorities declaration
See Also:
org.apache.uima.resource.ResourceMetaData#setDescription(String)

getVendor

public java.lang.String getVendor()
Description copied from interface: TypePriorities
Gets the vendor of this TypePriorities declaration.

Specified by:
getVendor in interface TypePriorities
Returns:
the vendor of this TypePriorities declaration, as a String
See Also:
org.apache.uima.resource.ResourceMetaData#getVendor()

setVendor

public void setVendor(java.lang.String aVendor)
Description copied from interface: TypePriorities
Sets the vendor of this TypePriorities declaration.

Specified by:
setVendor in interface TypePriorities
Parameters:
aVendor - the vendor of this TypePriorities declaration, as a String, null if none has been specified.
See Also:
org.apache.uima.resource.ResourceMetaData#setVendor(String)

getImports

public Import[] getImports()
Description copied from interface: TypePriorities
Gets the imports declared by this TypePriorities declaration.

Specified by:
getImports in interface TypePriorities
Returns:
an array of imports declared by this TypePriorities declaration.

setImports

public void setImports(Import[] aImports)
Description copied from interface: TypePriorities
Sets the imports declared by this TypePriorities declaration.

Specified by:
setImports in interface TypePriorities
Parameters:
aImports - an array of imports declared by this TypePriorities declaration.

getPriorityLists

public TypePriorityList[] getPriorityLists()
Description copied from interface: TypePriorities
Gets the TypePriorityLists that define the priorities. Each TypePriorityList declares the relative priority of two or more types.

Specified by:
getPriorityLists in interface TypePriorities
Returns:
the TypePriorityLists that define the priorities
See Also:
org.apache.uima.analysis_engine.metadata.TypePriorities#getPriorityLists()

setPriorityLists

public void setPriorityLists(TypePriorityList[] aPriorityLists)
Description copied from interface: TypePriorities
Sets the TypePriorityLists that define the priorities. Each TypePriorityList declares the relative priority of two or more types.

Specified by:
setPriorityLists in interface TypePriorities
Parameters:
aPriorityLists - the TypePriorityLists that define the priorities
See Also:
org.apache.uima.analysis_engine.metadata.TypePriorities#setPriorityLists(org.apache.uima.analysis_engine.metadata.TypePriorityList[])

addPriorityList

public void addPriorityList(TypePriorityList aPriorityList)
Description copied from interface: TypePriorities
Adds a TypePriorityList.

Specified by:
addPriorityList in interface TypePriorities
Parameters:
aPriorityList - the TypePriorityList to add
See Also:
org.apache.uima.analysis_engine.metadata.TypePriorities#addPriorityList(org.apache.uima.analysis_engine.metadata.TypePriorityList)

addPriorityList

public TypePriorityList addPriorityList()
Description copied from interface: TypePriorities
Creates a new, empty TypePriorityList and adds it to this object.

Specified by:
addPriorityList in interface TypePriorities
Returns:
the new TypePriorityList, which can be modified by the caller
See Also:
org.apache.uima.analysis_engine.metadata.TypePriorities#addPriorityList()

removePriorityList

public void removePriorityList(TypePriorityList aPriorityList)
Description copied from interface: TypePriorities
Removes a TypePriorityList.

Specified by:
removePriorityList in interface TypePriorities
Parameters:
aPriorityList - the TypePriorityList to remove
See Also:
org.apache.uima.analysis_engine.metadata.TypePriorities#removePriorityList(org.apache.uima.analysis_engine.metadata.TypePriorityList)

resolveImports

public void resolveImports()
                    throws InvalidXMLException
Description copied from interface: TypePriorities
Resolves any import declarations in this Type Priorities declaration, adding the imported TypePriorityList objects directly onto this TypePriorities object's priorityLists. 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:
resolveImports in interface TypePriorities
Throws:
InvalidXMLException - if either the import target does not exist or is invalid

resolveImports

public void resolveImports(ResourceManager aResourceManager)
                    throws InvalidXMLException
Description copied from interface: TypePriorities
Resolves any import declarations in this Type Priorities declaration, adding the imported TypePriorityList objects directly onto this TypePriorities object's priorityLists. 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:
resolveImports in interface TypePriorities
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 the ResourceManager.setDataPath(String) method.
Throws:
InvalidXMLException - if either the import target does not exist or is invalid

resolveImports

public void resolveImports(java.util.Collection<java.lang.String> aAlreadyImportedTypePrioritiesURLs,
                           ResourceManager aResourceManager)
                    throws InvalidXMLException
Description copied from interface: TypePriorities
Resolves any import declarations in this Type Priorities declaration, adding the imported TypePriorityList objects directly onto this TypePriorities object's priorityLists. 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:
resolveImports in interface TypePriorities
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 the ResourceManager.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,
                                      org.xml.sax.ContentHandler aContentHandler)
                               throws org.xml.sax.SAXException
Description copied from class: MetaDataObject_impl
Utility method used to write a property out as an XML element.

Overrides:
writePropertyAsElement in class MetaDataObject_impl
Parameters:
aPropInfo - information on how to represent the property in XML
aNamespace - XML namespace URI for this object
aContentHandler - content handler to which this object will send events that describe its XML representation
Throws:
org.xml.sax.SAXException

clone

public java.lang.Object clone()
Description copied from interface: MetaDataObject
Creates a clone of this MetaDataObject. This performs a "deep" copy by cloning all attribute values that are also MetaDataObjects.

Specified by:
clone in interface MetaDataObject
Overrides:
clone in class MetaDataObject_impl
Returns:
a clone of this MetaDataObject
See Also:
org.apache.uima.resource.MetaDataObject#clone()

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
See Also:
org.apache.uima.resource.impl.MetaDataObject_impl#getXmlizationInfo()


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