|
Qizx 2.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.qizx.xdm.AttributeList
com.qizx.xdm.XMLPushStreamBase
com.qizx.api.util.PushStreamToSAX
An implementation of XMLPushStream that converts to SAX2 events.
This class can be used to export or convert a XML tree from Qizx to any handler accepting SAX2 events.
| Field Summary |
| Fields inherited from class com.qizx.xdm.XMLPushStreamBase |
baseURI, contextualMappings, docStarted, dtdInternalSubset, dtdName, dtdPublicId, dtdSystemid, elementName, elementStarted, endDocumentDone, maxVolume, spaceNeeded, startDocumentDone, trace, volume, VOLUME_LIMIT |
| Fields inherited from class com.qizx.xdm.AttributeList |
attrCnt, attrNames, attrTypes, attrValues, nsContext |
| Fields inherited from interface com.qizx.api.XMLPushStream |
NSCOPY_NOPRESERVE_INHERIT, NSCOPY_NOPRESERVE_NOINHERIT, NSCOPY_PRESERVE_INHERIT, NSCOPY_PRESERVE_NOINHERIT |
| Constructor Summary | |
PushStreamToSAX()
Creates an adapter without handlers. |
|
PushStreamToSAX(DefaultHandler handler)
Creates an SAX adapter directly bound to a SAX DefaultHandler. |
|
| Method Summary | |
protected void |
flushElementStart(boolean empty)
Implementation of processing of "end of start tag", triggered by element content or end of element. |
ContentHandler |
getContentHandler()
Returns the current SAX content handler. |
ErrorHandler |
getErrorHandler()
Returns the current SAX error handler. |
LexicalHandler |
getLexicalHandler()
Returns the current SAX lexical handler. |
boolean |
getNsPrefixes()
Gets the "NS prefixes" option: controls namespace prefix output. |
void |
putComment(String value)
Puts a Comment event. |
void |
putDocumentEnd()
Puts a Document End event. |
boolean |
putDocumentStart()
Puts a Document Start event. |
void |
putElementEnd(QName name)
Puts an Element End event. |
boolean |
putNamespace(String prefix,
String namespaceURI)
Puts a Namespace declaration event for the current element. |
void |
putProcessingInstruction(String target,
String value)
Puts a Processing-instruction event. |
void |
putText(String value)
Puts a Text Fragment event. |
void |
setContentHandler(ContentHandler handler)
Sets the current SAX content handler. |
void |
setErrorHandler(ErrorHandler handler)
Sets the current SAX error handler. |
void |
setLexicalHandler(LexicalHandler handler)
Sets the current SAX lexical output handler. |
void |
setNsPrefixes(boolean nsPrefixes)
Sets the "NS prefixes" option: controls namespace prefix output. |
| Methods inherited from class com.qizx.xdm.XMLPushStreamBase |
abort, checkCommentValue, checkNameMapping, checkPIValue, completeNameMappings, defineContextMappings, flush, isAtRoot, maxVolumeReached, noSpace, putAtom, putAtomText, putAttribute, putChars, putDTD, putElementStart, putLongAtom, putNamespaces, putNodeCopy, putNodeCopy, reset, resolvePrefix, setMaxVolume, setTrace |
| Methods inherited from class com.qizx.xdm.AttributeList |
addAttribute, getAttributeCount, getIndex, getIndex, getIndex, getLength, getLocalName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getQName, getType, getType, getType, getURI, getValue, getValue, getValue, rawAddAttribute |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PushStreamToSAX()
The SAX handlers must then be defined through the set*Handler methods.
public PushStreamToSAX(DefaultHandler handler)
handler - used as content handler and error handler.| Method Detail |
public boolean getNsPrefixes()
public void setNsPrefixes(boolean nsPrefixes)
nsPrefixes - if false, do not output prefixes in SAXpublic ContentHandler getContentHandler()
public void setContentHandler(ContentHandler handler)
handler - SAX content handler used as output (can be null)public LexicalHandler getLexicalHandler()
public void setLexicalHandler(LexicalHandler handler)
handler - SAX lexical handler used as output (can be null)public ErrorHandler getErrorHandler()
public void setErrorHandler(ErrorHandler handler)
handler - SAX error handler used (can be null)
public boolean putDocumentStart()
throws DataModelException
XMLPushStream
DataModelException
public void putDocumentEnd()
throws DataModelException
XMLPushStream
DataModelException
protected void flushElementStart(boolean empty)
throws DataModelException
com.qizx.xdm.XMLPushStreamBaseOutput is normally delayed until this method is called.
empty - true if element has no contents (triggered by elementEnd)
DataModelException
public void putElementEnd(QName name)
throws DataModelException
XMLPushStream
DataModelException
public boolean putNamespace(String prefix,
String namespaceURI)
throws DataModelException
XMLPushStreamMust follow putElementStart and precede the contents of the element. The order is irrelevant. Duplicate namespace declarations are normally an error.
A Namespace declaration associates a prefix with a namespace-URI; it is
equivalent to the xmlns: pseudo-attributes of XML markup.
The empty prefix may be used for the default element namespace.
Note that such declarations are not mandatory: prefixes can be synthesized automatically by a XMLSerializer if missing.
DataModelException
public void putText(String value)
throws DataModelException
XMLPushStreamA text fragment should appear inside an element. Consecutive text events are coalesced into one. An empty text fragment is discarded.
value - a fragment of text
DataModelException - reasons
public void putProcessingInstruction(String target,
String value)
throws DataModelException
XMLPushStream
DataModelException
public void putComment(String value)
throws DataModelException
XMLPushStream
DataModelException
|
© 2008 Axyana Software | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||