Modifier and Type | Field and Description |
---|---|
protected long |
mNodeKey
Root node key of subtree to shredder.
|
protected ISession |
mSession
Treetank session
ISession . |
protected Stack<Long> |
mStack
Stack for reading end element.
|
protected long[] |
mVersions
Array with versions to print.
|
Constructor and Description |
---|
SAXSerializer(ISession paramSession,
ContentHandler paramHandler,
long... paramVersions)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Void |
call()
Serialize the storage.
|
protected void |
emitEndDocument()
Emit end document.
|
protected void |
emitEndElement(INodeReadTrx rtx)
Emit end tag.
|
protected void |
emitEndManualElement(long revision)
Emit an end tag, which specifies a revision.
|
protected void |
emitStartDocument()
Emit start document.
|
protected void |
emitStartElement(INodeReadTrx rtx)
Emit start tag.
|
protected void |
emitStartManualElement(long revision)
Emit a start tag, which specifies a revision.
|
ContentHandler |
getContentHandler() |
DTDHandler |
getDTDHandler() |
EntityResolver |
getEntityResolver() |
ErrorHandler |
getErrorHandler() |
boolean |
getFeature(String mName) |
Object |
getProperty(String mName) |
static void |
main(String... args)
Main method.
|
void |
parse(InputSource mInput) |
void |
parse(String mSystemID) |
void |
setContentHandler(ContentHandler paramContentHandler) |
void |
setDTDHandler(DTDHandler paramHandler) |
void |
setEntityResolver(EntityResolver paramResolver) |
void |
setErrorHandler(ErrorHandler paramHandler) |
void |
setFeature(String paramName,
boolean paramValue) |
void |
setProperty(String paramName,
Object paramValue) |
protected final long[] mVersions
protected final long mNodeKey
public SAXSerializer(ISession paramSession, ContentHandler paramHandler, long... paramVersions)
paramSession
- Treetank session ISession
.paramHandler
- SAX ContentHandler ContentHandler
.paramVersions
- Revisions to serialize.protected void emitStartElement(INodeReadTrx rtx) throws TTIOException
rtx
- Treetank reading transaction INodeReadTrx
.TTIOException
protected void emitEndElement(INodeReadTrx rtx)
rtx
- Treetank reading transaction INodeReadTrx
.protected void emitStartManualElement(long revision)
revision
- The revision to serialize.protected void emitEndManualElement(long revision)
revision
- The revision to serialize.public static void main(String... args) throws Exception
args
- args[0] specifies the path to the TT-storage from which to
generate SAX events.Exception
- handling treetank exceptionprotected void emitStartDocument()
protected void emitEndDocument()
public ContentHandler getContentHandler()
getContentHandler
in interface XMLReader
public DTDHandler getDTDHandler()
getDTDHandler
in interface XMLReader
public EntityResolver getEntityResolver()
getEntityResolver
in interface XMLReader
public ErrorHandler getErrorHandler()
getErrorHandler
in interface XMLReader
public boolean getFeature(String mName) throws SAXNotRecognizedException, SAXNotSupportedException
getFeature
in interface XMLReader
SAXNotRecognizedException
SAXNotSupportedException
public Object getProperty(String mName) throws SAXNotRecognizedException, SAXNotSupportedException
getProperty
in interface XMLReader
SAXNotRecognizedException
SAXNotSupportedException
public void parse(InputSource mInput) throws IOException, SAXException
parse
in interface XMLReader
IOException
SAXException
public void parse(String mSystemID) throws IOException, SAXException
parse
in interface XMLReader
IOException
SAXException
public void setContentHandler(ContentHandler paramContentHandler)
setContentHandler
in interface XMLReader
public void setDTDHandler(DTDHandler paramHandler)
setDTDHandler
in interface XMLReader
public void setEntityResolver(EntityResolver paramResolver)
setEntityResolver
in interface XMLReader
public void setErrorHandler(ErrorHandler paramHandler)
setErrorHandler
in interface XMLReader
public void setFeature(String paramName, boolean paramValue) throws SAXNotRecognizedException, SAXNotSupportedException
setFeature
in interface XMLReader
SAXNotRecognizedException
SAXNotSupportedException
public void setProperty(String paramName, Object paramValue) throws SAXNotRecognizedException, SAXNotSupportedException
setProperty
in interface XMLReader
SAXNotRecognizedException
SAXNotSupportedException
public Void call() throws TTException
call
in interface Callable<Void>
TTException
- if can't call serailzerCopyright © 2013. All Rights Reserved.