org.openadaptor.dmx.converter
Class DMXMethodHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.openadaptor.util.sax.AbstractHierarchicalElementHandler
org.openadaptor.dmx.converter.DMXTagHandler
org.openadaptor.dmx.converter.DMXMethodHandler
- All Implemented Interfaces:
- HierarchicalElementHandler, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
public class DMXMethodHandler
- extends DMXTagHandler
Method Summary |
void |
activate(java.lang.String name,
org.xml.sax.Attributes attributes)
This method is called, when the handler's start tag is reached. |
java.lang.Object |
getResult()
Return the result of retreiving all data in the corresponding tag
This method has to be overridden by all subclasses ! |
MOMethod |
getResultObject()
|
void |
handleSubResult(java.lang.String elementName,
java.lang.Object result)
This method throws an exception for any sub result. |
void |
setResultObject(MOMethod method)
|
java.lang.String |
tagName()
Returns the tag name, the receiver is responsible for |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.ContentHandler |
characters, endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping |
DMXMethodHandler
public DMXMethodHandler()
getResultObject
public MOMethod getResultObject()
setResultObject
public void setResultObject(MOMethod method)
tagName
public java.lang.String tagName()
- Returns the tag name, the receiver is responsible for
- Specified by:
tagName
in interface HierarchicalElementHandler
- Specified by:
tagName
in class AbstractHierarchicalElementHandler
- Returns:
- The name of the tag the receiver object is responsible for
getResult
public java.lang.Object getResult()
- Return the result of retreiving all data in the corresponding tag
This method has to be overridden by all subclasses !
- Specified by:
getResult
in interface HierarchicalElementHandler
- Specified by:
getResult
in class AbstractHierarchicalElementHandler
- Returns:
- any kind of object created out of the tag's value(s)
- Throws:
none
- Since:
- JDK1.1
- See Also:
handleSubResult(java.lang.String, java.lang.Object)
handleSubResult
public void handleSubResult(java.lang.String elementName,
java.lang.Object result)
throws DMXException
- Description copied from class:
DMXTagHandler
- This method throws an exception for any sub result.
This is a convenient implementation for subclasses which handle empty tags.
Tag handler subclasses that allow any sub elements, have to override this
method !
- Overrides:
handleSubResult
in class DMXTagHandler
- Parameters:
elementName
- The tag name of the sub elementresult
- The result of the interpretation of the sub element
- Throws:
DMXException
- See Also:
AbstractHierarchicalElementHandler.getResult()
activate
public void activate(java.lang.String name,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Description copied from class:
AbstractHierarchicalElementHandler
- This method is called, when the handler's start tag is reached.
This method should interpret the given attributes and build an appropriate
object out of it.
This method has to be overridden by all subclasses !
- Specified by:
activate
in interface HierarchicalElementHandler
- Specified by:
activate
in class AbstractHierarchicalElementHandler
- Parameters:
name
- The name of the tag which activates the receiver.attributes
- The list of attributes, the parser found in the tag
- Throws:
org.xml.sax.SAXException
- Wrapping exception around all internal exceptions.- See Also:
SAXReadController
,
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)