|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.io.serial.Serializer
org.basex.io.serial.SAXSerializer
public final class SAXSerializer
Bridge to translate XQuery items to SAX events.
The parse(org.xml.sax.InputSource)
methods do the following:
Field Summary |
---|
Fields inherited from class org.basex.io.serial.Serializer |
---|
elem, indent, level, PROPS, tags, undecl |
Constructor Summary | |
---|---|
SAXSerializer(Item it)
Constructor. |
Method Summary | |
---|---|
protected void |
atomic(Item i)
Serializes an atomic value. |
protected void |
attribute(byte[] n,
byte[] v)
Serializes an attribute. |
protected void |
finishClose()
Closes an element. |
protected void |
finishComment(byte[] comment)
Serializes a comment. |
protected void |
finishEmpty()
Closes an empty element. |
protected void |
finishOpen()
Finishes an opening element node. |
protected void |
finishPi(byte[] n,
byte[] v)
Serializes a processing instruction. |
protected void |
finishText(byte[] text)
Serializes a text. |
org.xml.sax.ContentHandler |
getContentHandler()
|
org.xml.sax.DTDHandler |
getDTDHandler()
|
org.xml.sax.EntityResolver |
getEntityResolver()
|
org.xml.sax.ErrorHandler |
getErrorHandler()
|
boolean |
getFeature(java.lang.String name)
|
java.lang.Object |
getProperty(java.lang.String name)
|
void |
parse(org.xml.sax.InputSource input)
|
void |
parse(java.lang.String id)
|
void |
setContentHandler(org.xml.sax.ContentHandler ch)
|
void |
setDTDHandler(org.xml.sax.DTDHandler dtd)
|
void |
setEntityResolver(org.xml.sax.EntityResolver er)
|
void |
setErrorHandler(org.xml.sax.ErrorHandler eh)
|
void |
setFeature(java.lang.String name,
boolean value)
|
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler lh)
Sets a lexical handler. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
|
protected void |
startOpen(byte[] n)
Starts an element. |
Methods inherited from class org.basex.io.serial.Serializer |
---|
close, closeDoc, closeElement, closeResult, finished, finishText, get, get, namespace, nsUri, openDoc, openResult, reset, serialize, startElement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SAXSerializer(Item it)
it
- item to be serializedMethod Detail |
---|
public org.xml.sax.ContentHandler getContentHandler()
getContentHandler
in interface org.xml.sax.XMLReader
public boolean getFeature(java.lang.String name)
getFeature
in interface org.xml.sax.XMLReader
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface org.xml.sax.XMLReader
public void parse(org.xml.sax.InputSource input) throws org.xml.sax.SAXException
parse
in interface org.xml.sax.XMLReader
org.xml.sax.SAXException
public void parse(java.lang.String id) throws org.xml.sax.SAXException
parse
in interface org.xml.sax.XMLReader
org.xml.sax.SAXException
public void setContentHandler(org.xml.sax.ContentHandler ch)
setContentHandler
in interface org.xml.sax.XMLReader
public void setLexicalHandler(org.xml.sax.ext.LexicalHandler lh)
lh
- handler referencepublic void setEntityResolver(org.xml.sax.EntityResolver er)
setEntityResolver
in interface org.xml.sax.XMLReader
public org.xml.sax.EntityResolver getEntityResolver()
getEntityResolver
in interface org.xml.sax.XMLReader
public void setDTDHandler(org.xml.sax.DTDHandler dtd)
setDTDHandler
in interface org.xml.sax.XMLReader
public org.xml.sax.DTDHandler getDTDHandler()
getDTDHandler
in interface org.xml.sax.XMLReader
public void setErrorHandler(org.xml.sax.ErrorHandler eh)
setErrorHandler
in interface org.xml.sax.XMLReader
public org.xml.sax.ErrorHandler getErrorHandler()
getErrorHandler
in interface org.xml.sax.XMLReader
public void setFeature(java.lang.String name, boolean value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setFeature
in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public void setProperty(java.lang.String name, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setProperty
in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
protected void startOpen(byte[] n) throws java.io.IOException
Serializer
startOpen
in class Serializer
n
- tag name
java.io.IOException
- I/O exceptionprotected void attribute(byte[] n, byte[] v) throws java.io.IOException
Serializer
attribute
in class Serializer
n
- namev
- value
java.io.IOException
- I/O exceptionprotected void finishOpen() throws java.io.IOException
Serializer
finishOpen
in class Serializer
java.io.IOException
- I/O exceptionprotected void finishEmpty() throws java.io.IOException
Serializer
finishEmpty
in class Serializer
java.io.IOException
- I/O exceptionprotected void finishClose() throws java.io.IOException
Serializer
finishClose
in class Serializer
java.io.IOException
- I/O exceptionprotected void finishText(byte[] text) throws java.io.IOException
Serializer
finishText
in class Serializer
text
- value
java.io.IOException
- I/O exceptionprotected void finishComment(byte[] comment) throws java.io.IOException
Serializer
finishComment
in class Serializer
comment
- value
java.io.IOException
- I/O exceptionprotected void finishPi(byte[] n, byte[] v) throws java.io.IOException
Serializer
finishPi
in class Serializer
n
- namev
- value
java.io.IOException
- I/O exceptionprotected void atomic(Item i) throws java.io.IOException
Serializer
atomic
in class Serializer
i
- item
java.io.IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |