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

java.lang.Object
  extended by org.apache.uima.resource.metadata.impl.MetaDataObject_impl
      extended by org.apache.uima.resource.metadata.impl.Import_impl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Import, MetaDataObject, XMLizable

public class Import_impl
extends MetaDataObject_impl
implements Import

See Also:
Serialized Form

Constructor Summary
Import_impl()
           
 
Method Summary
 void buildFromXMLElement(org.w3c.dom.Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions)
          Overridden to provide custom XML representation.
 java.net.URL findAbsoluteUrl(ResourceManager aResourceManager)
          Computes the absolute URL for this import, using the relative location or name, whichever is specified by this import object.
 java.lang.String getLocation()
          Gets the location of this import's target.
 java.lang.String getName()
          Gets the name of this import's target.
protected  XmlizationInfo getXmlizationInfo()
          To be implemented by subclasses to return information describing how to represent this object in XML.
 void setLocation(java.lang.String aUri)
          Sets the location of this import's target.
 void setName(java.lang.String aName)
          Sets the name of this import's target.
 void toXML(org.xml.sax.ContentHandler aContentHandler, boolean aWriteDefaultNamespaceAttribute)
          Overridden to provide custom XML representation.
 
Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, clone, equals, getAttributeClass, getAttributeValue, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, setAttributeValue, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, writeArrayPropertyAsElement, writeMapPropertyToXml, writePropertyAsElement
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
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, toXML, toXML, toXML
 

Constructor Detail

Import_impl

public Import_impl()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Import
Gets the name of this import's target.

Specified by:
getName in interface Import
Returns:
a Java-style compound name which specifies the target of this import. This will be located by appending ".xml" to the name and searching the classpath.

setName

public void setName(java.lang.String aName)
Description copied from interface: Import
Sets the name of this import's target.

Specified by:
setName in interface Import
Parameters:
aName - a Java-style compound name which specifies the target of this import. This will be located by appending ".xml" to the name and searching the classpath.

getLocation

public java.lang.String getLocation()
Description copied from interface: Import
Gets the location of this import's target.

Specified by:
getLocation in interface Import
Returns:
a URI specifying the location of this import's target.

setLocation

public void setLocation(java.lang.String aUri)
Description copied from interface: Import
Sets the location of this import's target.

Specified by:
setLocation in interface Import
Parameters:
aUri - a URI specifying the location of this import's target.

findAbsoluteUrl

public java.net.URL findAbsoluteUrl(ResourceManager aResourceManager)
                             throws InvalidXMLException
Description copied from interface: Import
Computes the absolute URL for this import, using the relative location or name, whichever is specified by this import object.

Specified by:
findAbsoluteUrl in interface Import
Parameters:
aResourceManager - resource manager to use to do name lookups
Returns:
the absolute URL for this import
Throws:
InvalidXMLException - if the import could not be resolved

buildFromXMLElement

public void buildFromXMLElement(org.w3c.dom.Element aElement,
                                XMLParser aParser,
                                XMLParser.ParsingOptions aOptions)
                         throws InvalidXMLException
Overridden to provide custom XML representation.

Specified by:
buildFromXMLElement in interface XMLizable
Overrides:
buildFromXMLElement in class MetaDataObject_impl
Parameters:
aElement - the XML element that represents this object.
aParser - a reference to the UIMA XMLParser. The XMLParser.buildObject(Element) method can be used to construct sub-objects.
aOptions - option settings
Throws:
InvalidXMLException - if the input XML element does not specify a valid object
See Also:
XMLizable.buildFromXMLElement(org.w3c.dom.Element, org.apache.uima.util.XMLParser)

toXML

public void toXML(org.xml.sax.ContentHandler aContentHandler,
                  boolean aWriteDefaultNamespaceAttribute)
           throws org.xml.sax.SAXException
Overridden to provide custom XML representation.

Specified by:
toXML in interface XMLizable
Overrides:
toXML in class MetaDataObject_impl
Parameters:
aContentHandler - the content handler to which this object will write events that describe its XML representation.
aWriteDefaultNamespaceAttribute - whether the namespace of this element should be written as the default namespace. This should be done only for the root element, and it defaults to false.
Throws:
org.xml.sax.SAXException
See Also:
XMLizable.toXML(ContentHandler)

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 © 2013. All Rights Reserved.