|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.XMLFilterImpl nbi.xmlsec.biocase.protocol.filter.ProtocolFilter nbi.xmlsec.biocase.protocol.filter.ContentObjectFilter
This filter simply reads in all incoming SaxElements and stores them in an
internal Buffer. The content of this internal Buffer may be retrieved using
getContentObject()
. The SaxElements are stored
using the XMLWriter
class as content handler to
write the SaxElements to the internal Buffer.
Field Summary | |
private ByteArrayOutputStream |
contentObjectOut
The buffer to write the content object to. |
private nbi.xml.sax.XMLWriter |
contentObjectWriter
The content handler to write the content to the internal buffer. |
(package private) static Logger |
logger
|
private ContentHandler |
origContentHandler
Variable to store the original ContentHandler of this filter. |
(package private) static int |
trackMode
Track mode for the filter stack |
Fields inherited from class nbi.xmlsec.biocase.protocol.filter.ProtocolFilter |
elementStack, filterMode, FILTERMODE_FILTER, FILTERMODE_NONE, FILTERMODE_PARSER, filterRoot, PROT_URI_13, PROT_URI_20 |
Fields inherited from class org.xml.sax.helpers.XMLFilterImpl |
|
Constructor Summary | |
ContentObjectFilter(String protocolURI,
int filterMode)
Inits the filter instance. |
|
ContentObjectFilter(XMLReader parent,
String protocolURI,
int filterMode)
Inits the filter instance with specified parent. |
Method Summary | |
byte[] |
getContentObject()
Retrieves the content object from the internal buffer. |
private void |
initBuffer()
|
private void |
initSubFilter()
Registers subfilters for subelements. |
protected nbi.xml.sax.SAXElement |
parseComplete(nbi.xml.sax.SAXElement element)
Reactivates the orignal ContenHandler deactivated to read the content object into the buffer in parseInit(SAXElement) . |
protected nbi.xml.sax.SAXElement |
parseInit(nbi.xml.sax.SAXElement element)
Sets the protocolURI of the filter to the URI of the document to parse and activates the contentObjectWriter as ContenHandler to read the content object into the buffer. |
Methods inherited from class nbi.xmlsec.biocase.protocol.filter.ProtocolFilter |
characters, checkFilterParameter, endElement, filterCharacters, filterElement, getFilterMode, getFilterParameter, getProtocolURI, isParsingComplete, parseElement, registerSubFilter, setFilterParameter, setProtocolURI, startElement, unregisterSubFilter |
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static Logger logger
static final int trackMode
private ByteArrayOutputStream contentObjectOut
private nbi.xml.sax.XMLWriter contentObjectWriter
private ContentHandler origContentHandler
Constructor Detail |
public ContentObjectFilter(String protocolURI, int filterMode)
protocolURI
- protocol version URI of this filter.filterMode
- filterMode of this filter
ProtocolFilter.filterMode
.public ContentObjectFilter(XMLReader parent, String protocolURI, int filterMode)
parent
- parent reader.protocolURI
- protocol version URI of this filter.filterMode
- filterMode of this filter
ProtocolFilter.filterMode
.Method Detail |
private void initSubFilter()
private void initBuffer()
protected nbi.xml.sax.SAXElement parseInit(nbi.xml.sax.SAXElement element) throws SAXException
contentObjectWriter
as ContenHandler to read the content object into the buffer.
parseInit
in class ProtocolFilter
element
- The element of the startElement event (contains no value).
SAXException
- If any parsing error occurs.ProtocolFilter.parseInit(SAXElement)
protected nbi.xml.sax.SAXElement parseComplete(nbi.xml.sax.SAXElement element) throws SAXException
parseInit(SAXElement)
.
parseComplete
in class ProtocolFilter
element
- The complete root element (including the value).
SAXException
- If any parsing error occurs.ProtocolFilter.parseComplete(SAXElement)
public byte[] getContentObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |