org.n52.security.common.xml
Class XMLChunkHandlerAdapter

java.lang.Object
  extended by org.n52.security.common.xml.XMLChunkHandlerAdapter
All Implemented Interfaces:
XMLChunkHandler

public abstract class XMLChunkHandlerAdapter
extends java.lang.Object
implements XMLChunkHandler

Class XMLPartialStreamHandlerAdapter implements the XMLPartialStreamHandler interface, with empty method stubs, so that subclasses only need to implement methods in which they are interested.

It declares a helper method, which closes the open xml chunk within the *Befor/AfterChild* methods.

Version:
$Revision: $
Author:
Marko Reiprecht Created on 18.04.2008

Constructor Summary
XMLChunkHandlerAdapter()
           
 
Method Summary
protected  java.lang.String closePartialXml(java.lang.String xmlChunk, javax.xml.namespace.QName endElement)
          Method appends the endtag to a open xml chunk.
 void handleChunkAfterChildHandler(javax.xml.namespace.QName handlerQName, java.lang.String xmlChunk, javax.xml.namespace.QName childQName, XMLChunkHandler childHandler)
          Method is invoked if the end tag of an element, for which a child handler is registered is reached.
 void handleChunkBeforChildHandler(javax.xml.namespace.QName handlerQName, java.lang.String xmlChunk, javax.xml.namespace.QName childQName, XMLChunkHandler childHandler)
          Method is invoked if the start tag of an element, for which a child handler is registered is reached.
 void handleChunkEnd(javax.xml.namespace.QName handlerQName, java.lang.String xmlChunk)
          Method is invoked if the end tag of the xml chunk is reached.
 void handleChunkStart(javax.xml.namespace.QName handlerQName)
          Method handleChunkStart, informs about the start element of a chunk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLChunkHandlerAdapter

public XMLChunkHandlerAdapter()
Method Detail

closePartialXml

protected java.lang.String closePartialXml(java.lang.String xmlChunk,
                                           javax.xml.namespace.QName endElement)
Method appends the endtag to a open xml chunk.

Parameters:
xmlChunk - the partialXml.
endElement - the endElement.
Returns:
String.

handleChunkStart

public void handleChunkStart(javax.xml.namespace.QName handlerQName)
Description copied from interface: XMLChunkHandler
Method handleChunkStart, informs about the start element of a chunk.

Specified by:
handleChunkStart in interface XMLChunkHandler
Parameters:
handlerQName - the handlerQName.
See Also:
XMLChunkHandler.handleChunkStart(QName)

handleChunkEnd

public void handleChunkEnd(javax.xml.namespace.QName handlerQName,
                           java.lang.String xmlChunk)
Description copied from interface: XMLChunkHandler
Method is invoked if the end tag of the xml chunk is reached.

Specified by:
handleChunkEnd in interface XMLChunkHandler
Parameters:
handlerQName - the handlerQName.
xmlChunk - the partialXml.
See Also:
XMLChunkHandler.handleChunkEnd(QName, String)

handleChunkBeforChildHandler

public void handleChunkBeforChildHandler(javax.xml.namespace.QName handlerQName,
                                         java.lang.String xmlChunk,
                                         javax.xml.namespace.QName childQName,
                                         XMLChunkHandler childHandler)
Description copied from interface: XMLChunkHandler
Method is invoked if the start tag of an element, for which a child handler is registered is reached. The xmlChunk is not well formed, because the end tag is not closed.

Specified by:
handleChunkBeforChildHandler in interface XMLChunkHandler
Parameters:
handlerQName - the handlerQName.
xmlChunk - the xmlChunk.
childQName - the childQName.
childHandler - the childHandler.
See Also:
XMLChunkHandler.handleChunkBeforChildHandler(QName, String, QName, XMLChunkHandler)

handleChunkAfterChildHandler

public void handleChunkAfterChildHandler(javax.xml.namespace.QName handlerQName,
                                         java.lang.String xmlChunk,
                                         javax.xml.namespace.QName childQName,
                                         XMLChunkHandler childHandler)
Description copied from interface: XMLChunkHandler
Method is invoked if the end tag of an element, for which a child handler is registered is reached.

The xmlChunk is not well formed, because the end tag is not closed.

Specified by:
handleChunkAfterChildHandler in interface XMLChunkHandler
Parameters:
handlerQName - the handlerQName.
xmlChunk - the xmlChunk.
childQName - the childQName.
childHandler - the childHandler.
See Also:
XMLChunkHandler.handleChunkAfterChildHandler(QName, String, QName, XMLChunkHandler)


Copyright © 2004-2009 52north.org. All Rights Reserved.