org.n52.security.common.xml
Class XMLChunkReader

java.lang.Object
  extended by org.n52.security.common.xml.XMLChunkReader

public class XMLChunkReader
extends java.lang.Object

Class XMLStreamChunkReader reads an xml document with an internal xml stream reader and as chunks and calls a subsets of XMLStreamChunkHandler instances.

Xml elements for which no handler is defined are simply skipped.

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

Constructor Summary
XMLChunkReader()
           
 
Method Summary
 XMLChunkReader addHandler(javax.xml.namespace.QName qname, XMLChunkHandler handler)
          Method registers a PartialStreamHandler for a Qname.
 void clearHandlers()
          Method clears all Handlers (removes them).
 XMLChunkHandler getHandler(javax.xml.namespace.QName qname)
          Method gets the Handler for the qname.
 void read(org.xml.sax.InputSource source)
          Method reads an xml source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLChunkReader

public XMLChunkReader()
Method Detail

addHandler

public XMLChunkReader addHandler(javax.xml.namespace.QName qname,
                                 XMLChunkHandler handler)
Method registers a PartialStreamHandler for a Qname.

Parameters:
qname - the qname.
handler - the handler.
Returns:
this.

getHandler

public XMLChunkHandler getHandler(javax.xml.namespace.QName qname)
Method gets the Handler for the qname.

Parameters:
qname - the qname.
Returns:
XmlPartialStreamHandler.

clearHandlers

public void clearHandlers()
Method clears all Handlers (removes them).


read

public void read(org.xml.sax.InputSource source)
          throws javax.xml.stream.XMLStreamException
Method reads an xml source.

Parameters:
source - the source.
Throws:
javax.xml.stream.XMLStreamException - if error occurs.


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