org.exist.util.serializer
Class ReceiverToSAX
java.lang.Object
org.exist.util.serializer.ReceiverToSAX
- All Implemented Interfaces:
- Receiver
public class ReceiverToSAX
- extends Object
- implements Receiver
A wrapper class that forwards the method calls defined in the
Receiver
interface to a
SAX content handler and lexical handler.
- Author:
- wolf
Method Summary |
void |
attribute(QName qname,
String value)
|
void |
cdataSection(char[] ch,
int start,
int len)
|
void |
characters(CharSequence seq)
|
void |
comment(char[] ch,
int start,
int length)
|
void |
documentType(String name,
String publicId,
String systemId)
|
void |
endDocument()
|
void |
endElement(QName qname)
|
void |
endPrefixMapping(String prefix)
|
ContentHandler |
getContentHandler()
|
Document |
getDocument()
|
LexicalHandler |
getLexicalHandler()
|
void |
highlightText(CharSequence seq)
|
void |
processingInstruction(String target,
String data)
|
void |
setContentHandler(ContentHandler handler)
|
void |
setCurrentNode(StoredNode node)
|
void |
setLexicalHandler(LexicalHandler handler)
|
void |
startDocument()
|
void |
startElement(QName qname,
AttrList attribs)
|
void |
startPrefixMapping(String prefix,
String namespaceURI)
|
ReceiverToSAX
public ReceiverToSAX(ContentHandler handler)
setLexicalHandler
public void setLexicalHandler(LexicalHandler handler)
setContentHandler
public void setContentHandler(ContentHandler handler)
getContentHandler
public ContentHandler getContentHandler()
getLexicalHandler
public LexicalHandler getLexicalHandler()
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface Receiver
- Throws:
SAXException
endDocument
public void endDocument()
throws SAXException
- Specified by:
endDocument
in interface Receiver
- Throws:
SAXException
startPrefixMapping
public void startPrefixMapping(String prefix,
String namespaceURI)
throws SAXException
- Specified by:
startPrefixMapping
in interface Receiver
- Throws:
SAXException
endPrefixMapping
public void endPrefixMapping(String prefix)
throws SAXException
- Specified by:
endPrefixMapping
in interface Receiver
- Throws:
SAXException
startElement
public void startElement(QName qname,
AttrList attribs)
throws SAXException
- Specified by:
startElement
in interface Receiver
- Throws:
SAXException
endElement
public void endElement(QName qname)
throws SAXException
- Specified by:
endElement
in interface Receiver
- Throws:
SAXException
characters
public void characters(CharSequence seq)
throws SAXException
- Specified by:
characters
in interface Receiver
- Throws:
SAXException
attribute
public void attribute(QName qname,
String value)
throws SAXException
- Specified by:
attribute
in interface Receiver
- Throws:
SAXException
comment
public void comment(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
comment
in interface Receiver
- Throws:
SAXException
processingInstruction
public void processingInstruction(String target,
String data)
throws SAXException
- Specified by:
processingInstruction
in interface Receiver
- Throws:
SAXException
cdataSection
public void cdataSection(char[] ch,
int start,
int len)
throws SAXException
- Specified by:
cdataSection
in interface Receiver
- Throws:
SAXException
documentType
public void documentType(String name,
String publicId,
String systemId)
throws SAXException
- Specified by:
documentType
in interface Receiver
- Throws:
SAXException
highlightText
public void highlightText(CharSequence seq)
- Specified by:
highlightText
in interface Receiver
setCurrentNode
public void setCurrentNode(StoredNode node)
- Specified by:
setCurrentNode
in interface Receiver
getDocument
public Document getDocument()
- Specified by:
getDocument
in interface Receiver
Copyright (C) Wolfgang Meier. All rights reserved.