public abstract class AbstractEXIBodyEncoder extends AbstractEXIBodyCoder implements EXIBodyEncoder
AbstractEXIBodyCoder.ElementContext, AbstractEXIBodyCoder.RuntimeUriContext| Modifier and Type | Field and Description |
|---|---|
protected List<Value> |
bChars
buffers character values before flushing them out
|
protected EncoderChannel |
channel
Output Channel
|
protected EncodingOptions |
encodingOptions
Encoding options
|
protected EXIHeaderEncoder |
exiHeader |
protected boolean |
isXmlSpacePreserve
The xml:space attribute is defined (default false)
|
protected EventType |
lastEvent
contains last event type
|
protected String |
sePrefix
prefix of previous start element (relevant for preserving prefixes)
|
protected String |
seUri
URI of previous start element (relevant for preserving prefixes)
|
protected StringEncoder |
stringEncoder
String Encoder
|
protected TypeEncoder |
typeEncoder
Type Encoder
|
booleanDatatype, elementContextStack, elementContextStackIndex, errorHandler, exiFactory, fidelityOptions, grammar, grammarContext, gUris, INITIAL_STACK_SIZE, learnedProductions, limitGrammarLearning, maxBuiltInElementGrammars, maxBuiltInProductions, nextUriID, preserveLexicalValues, preservePrefix, runtimeGlobalElements, xsiNilContext, xsiTypeContext| Constructor and Description |
|---|
AbstractEXIBodyEncoder(EXIFactory exiFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkPendingCharacters(EventType nextEvent) |
protected void |
encode1stLevelEventCode(int pos) |
protected void |
encode2ndLevelEventCode(int pos) |
protected void |
encode3rdLevelEventCode(int pos) |
void |
encodeAttribute(QName at,
Value value)
Supplies an attribute with the according value.
|
void |
encodeAttribute(String uri,
String localName,
String prefix,
Value value)
Supplies an attribute.
|
void |
encodeAttributeList(AttributeList attributes)
Supplies a list of namespace declarations, xsi:type and xsi:nil values
and the remaining attributes.
|
void |
encodeAttributeXsiNil(Value nil,
String pfx)
Supplies an xsi:nil attribute.
|
void |
encodeAttributeXsiType(Value type,
String pfx)
Supplies an xsi:type case.
|
void |
encodeCharacters(Value chars)
Supplies characters as Value.
|
protected void |
encodeCharactersForce(Value chars) |
void |
encodeComment(char[] ch,
int start,
int length)
Supplies the text of a comment.
|
void |
encodeDocType(String name,
String publicID,
String systemID,
String text)
Supplies content items to represent a DOCTYPE definition
|
void |
encodeEndDocument()
Reports the end of a set of XML events.
|
void |
encodeEndElement()
Supplies the end tag of an element.
|
void |
encodeEntityReference(String name)
Supplies the name of an entity reference
|
protected QNameContext |
encodeLocalName(String localName,
AbstractEXIBodyCoder.RuntimeUriContext ruc,
EncoderChannel channel) |
void |
encodeNamespaceDeclaration(String uri,
String prefix)
Namespaces are reported as a discrete Namespace event.
|
protected void |
encodeNamespacePrefix(AbstractEXIBodyCoder.RuntimeUriContext uriContext,
String prefix,
EncoderChannel channel) |
void |
encodeProcessingInstruction(String target,
String data)
Supplies the target and data for an underlying processing instruction.
|
protected QNameContext |
encodeQName(String namespaceUri,
String localName,
EncoderChannel channel) |
protected void |
encodeQNamePrefix(QNameContext qnContext,
String prefix,
EncoderChannel channel) |
protected void |
encodeSchemaInvalidAttributeEventCode(int eventCode3) |
void |
encodeStartDocument()
Reports the beginning of a set of XML events
|
void |
encodeStartElement(QName se)
Supplies the start of an element.
|
void |
encodeStartElement(String uri,
String localName,
String prefix)
Supplies the start of an element.
|
protected AbstractEXIBodyCoder.RuntimeUriContext |
encodeUri(String namespaceUri,
EncoderChannel channel) |
void |
flush()
Flushes (possibly) remaining bit(s) to output stream
|
protected Attribute |
getGlobalAttribute(AbstractEXIBodyCoder.RuntimeUriContext uc,
String localName) |
protected Attribute |
getGlobalAttribute(String uri,
String localName) |
void |
initForEachRun() |
protected boolean |
isTypeValid(Datatype datatype,
Value value) |
protected void |
writeString(String text) |
protected abstract void |
writeValue(QNameContext valueContext) |
addUri, declarePrefix, declarePrefix, getCurrentGrammar, getElementContext, getGlobalStartElement, getNumberOfUris, getPrefix, getUri, getUri, getURI, getXsiNilContext, getXsiTypeContext, isBuiltInStartTagGrammarWithAtXsiTypeOnly, popElement, pushElement, setErrorHandler, throwWarning, updateCurrentRule, updateElementContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetErrorHandler, setOutputChannel, setOutputStreamprotected final EXIHeaderEncoder exiHeader
protected String sePrefix
protected String seUri
protected EncoderChannel channel
protected final TypeEncoder typeEncoder
protected final StringEncoder stringEncoder
protected final EncodingOptions encodingOptions
protected boolean isXmlSpacePreserve
protected EventType lastEvent
public AbstractEXIBodyEncoder(EXIFactory exiFactory) throws EXIException
EXIExceptionpublic void initForEachRun()
throws EXIException,
IOException
initForEachRun in class AbstractEXIBodyCoderEXIExceptionIOExceptionprotected QNameContext encodeQName(String namespaceUri, String localName, EncoderChannel channel) throws IOException
IOExceptionprotected AbstractEXIBodyCoder.RuntimeUriContext encodeUri(String namespaceUri, EncoderChannel channel) throws IOException
IOExceptionprotected void encodeQNamePrefix(QNameContext qnContext, String prefix, EncoderChannel channel) throws IOException, EXIException
IOExceptionEXIExceptionprotected QNameContext encodeLocalName(String localName, AbstractEXIBodyCoder.RuntimeUriContext ruc, EncoderChannel channel) throws IOException
IOExceptionprotected void encodeNamespacePrefix(AbstractEXIBodyCoder.RuntimeUriContext uriContext, String prefix, EncoderChannel channel) throws IOException
IOExceptionpublic void flush()
throws IOException
EXIBodyEncoderflush in interface EXIBodyEncoderIOException - IO exceptionprotected void writeString(String text) throws IOException
IOExceptionprotected abstract void writeValue(QNameContext valueContext) throws IOException
IOExceptionprotected void encode1stLevelEventCode(int pos)
throws IOException
IOExceptionprotected void encode2ndLevelEventCode(int pos)
throws IOException
IOExceptionprotected void encode3rdLevelEventCode(int pos)
throws IOException
IOExceptionpublic void encodeStartDocument()
throws EXIException,
IOException
EXIBodyEncoderencodeStartDocument in interface EXIBodyEncoderEXIException - EXI exceptionIOException - IO exceptionpublic void encodeEndDocument()
throws EXIException,
IOException
EXIBodyEncoderencodeEndDocument in interface EXIBodyEncoderEXIException - EXI exceptionIOException - IO exceptionpublic void encodeStartElement(QName se) throws EXIException, IOException
EXIBodyEncoderProvides access to the namespace URI, local name , and prefix representation of the start tag.
encodeStartElement in interface EXIBodyEncoderse - start element's qnameEXIException - EXI exceptionIOException - IO exceptionpublic void encodeStartElement(String uri, String localName, String prefix) throws EXIException, IOException
EXIBodyEncoderProvides access to the namespace URI, local name , and prefix representation of the start tag.
encodeStartElement in interface EXIBodyEncoderuri - element namespace URIlocalName - element local-nameprefix - element prefix (can be null according to fidelity options)EXIException - EXI exceptionIOException - IO exceptionpublic void encodeNamespaceDeclaration(String uri, String prefix) throws EXIException, IOException
EXIBodyEncoderencodeNamespaceDeclaration in interface EXIBodyEncoderuri - namespace URIprefix - namespace prefixEXIException - EXI exceptionIOException - IO exceptionpublic void encodeEndElement()
throws EXIException,
IOException
EXIBodyEncoderencodeEndElement in interface EXIBodyEncoderEXIException - EXI exceptionIOException - IO exceptionpublic void encodeAttributeList(AttributeList attributes) throws EXIException, IOException
EXIBodyEncoderencodeAttributeList in interface EXIBodyEncoderattributes - list of attributesEXIException - EXI exceptionIOException - IO exceptionpublic void encodeAttributeXsiType(Value type, String pfx) throws EXIException, IOException
EXIBodyEncoderencodeAttributeXsiType in interface EXIBodyEncodertype - xsi:type valuepfx - xsi:type prefixEXIException - EXI exceptionIOException - IO exceptionpublic void encodeAttributeXsiNil(Value nil, String pfx) throws EXIException, IOException
EXIBodyEncoderencodeAttributeXsiNil in interface EXIBodyEncodernil - xsi:nil valuepfx - xsi:nil prefixEXIException - EXI exceptionIOException - IO exceptionprotected void encodeSchemaInvalidAttributeEventCode(int eventCode3)
throws IOException
IOExceptionpublic void encodeAttribute(QName at, Value value) throws EXIException, IOException
EXIBodyEncoderProvides access to the namespace URI, local name, prefix, and value of the attribute.
encodeAttribute in interface EXIBodyEncoderat - attribute's qnamevalue - attribute valueEXIException - EXI exceptionIOException - IO exceptionpublic void encodeAttribute(String uri, String localName, String prefix, Value value) throws EXIException, IOException
EXIBodyEncoderProvides access to the namespace URI, local name, prefix, and value of the attribute.
encodeAttribute in interface EXIBodyEncoderuri - attribute namespace URIlocalName - attribute local-nameprefix - attribute prefix (can be null according to fidelity options)value - attribute valueEXIException - EXI exceptionIOException - IO exceptionprotected Attribute getGlobalAttribute(AbstractEXIBodyCoder.RuntimeUriContext uc, String localName)
protected void checkPendingCharacters(EventType nextEvent) throws EXIException, IOException
EXIExceptionIOExceptionpublic void encodeCharacters(Value chars) throws EXIException, IOException
EXIBodyEncoderencodeCharacters in interface EXIBodyEncoderchars - character valuesEXIException - EXI exceptionIOException - IO exceptionprotected void encodeCharactersForce(Value chars) throws EXIException, IOException
EXIExceptionIOExceptionpublic void encodeDocType(String name, String publicID, String systemID, String text) throws EXIException, IOException
EXIBodyEncoderencodeDocType in interface EXIBodyEncodername - doc-type namepublicID - doc-type publicIDsystemID - doc-type systemIDtext - doc-type testEXIException - EXI exceptionIOException - IO exceptionpublic void encodeEntityReference(String name) throws EXIException, IOException
EXIBodyEncoderencodeEntityReference in interface EXIBodyEncodername - entity reference nameEXIException - EXI exceptionIOException - IO exceptionpublic void encodeComment(char[] ch,
int start,
int length)
throws EXIException,
IOException
EXIBodyEncoderencodeComment in interface EXIBodyEncoderch - comment character arraystart - comment character array startlength - comment character array lengthEXIException - EXI exceptionIOException - IO exceptionpublic void encodeProcessingInstruction(String target, String data) throws EXIException, IOException
EXIBodyEncoderencodeProcessingInstruction in interface EXIBodyEncodertarget - processing instruction targetdata - processing instruction dataEXIException - EXI exceptionIOException - IO exceptionCopyright © 2018 Siemens AG. All rights reserved.