EXIficient

com.siemens.ct.exi
Interface EXIEncoder

All Known Implementing Classes:
EXIEncoderPrefixAware, EXIEncoderPrefixLess

public interface EXIEncoder

Internal EXI Encoder interface to transform XML events to an EXI stream.

Version:
0.3.20090414
Author:
Daniel.Peintner.EXT@siemens.com, Joerg.Heuer@siemens.com

Method Summary
 void encodeAttribute(java.lang.String uri, java.lang.String localName, java.lang.String prefix, java.lang.String value)
          Supplies an attribute.
 void encodeCharacters(java.lang.String chars)
          Supplies a comment as corresponding characters.
 void encodeComment(char[] ch, int start, int length)
          Supplies the text of a comment.
 void encodeDocType(java.lang.String name, java.lang.String publicID, java.lang.String systemID, java.lang.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 encodeEndFragmentSelfContained()
          Supplies the end tag of an SC fragment.
 void encodeEntityReference(java.lang.String name)
          Supplies the name of an entity reference
 void encodeNamespaceDeclaration(java.lang.String uri, java.lang.String prefix)
          Namespaces are reported as a discrete Namespace event.
 void encodeProcessingInstruction(java.lang.String target, java.lang.String data)
          Supplies the target and data for an underlying processing instruction.
 void encodeStartDocument()
          Reports the beginning of a set of XML events
 void encodeStartElement(java.lang.String uri, java.lang.String localName, java.lang.String prefix)
          Supplies the start of an element.
 int encodeStartFragmentSelfContained(java.lang.String uri, java.lang.String localName, java.lang.String prefix)
          Supplies the start of a self-contained element.
 void encodeXsiNil(java.lang.String nil)
          Supplies an xsi:nil attribute.
 void encodeXsiType(java.lang.String xsiTypeRaw)
          Supplies an xsi:type case.
 org.xml.sax.helpers.NamespaceSupport getNamespaces()
          Provides namespace support.
 void setErrorHandler(ErrorHandler errorHandler)
           
 void setOutput(java.io.OutputStream os, boolean exiBodyOnly)
           
 

Method Detail

setOutput

void setOutput(java.io.OutputStream os,
               boolean exiBodyOnly)
               throws EXIException
Throws:
EXIException

setErrorHandler

void setErrorHandler(ErrorHandler errorHandler)

getNamespaces

org.xml.sax.helpers.NamespaceSupport getNamespaces()
Provides namespace support.

Returns:
NamespaceSupport for prefix mapping

encodeStartDocument

void encodeStartDocument()
                         throws EXIException
Reports the beginning of a set of XML events

Throws:
EXIException

encodeEndDocument

void encodeEndDocument()
                       throws EXIException
Reports the end of a set of XML events.

Throws:
EXIException

encodeStartElement

void encodeStartElement(java.lang.String uri,
                        java.lang.String localName,
                        java.lang.String prefix)
                        throws EXIException
Supplies the start of an element.

Provides access to the namespace URI, local name , and prefix representation of the start tag.

Parameters:
uri -
localName -
prefix - (can be null according to fidelity options)
Throws:
EXIException

encodeStartFragmentSelfContained

int encodeStartFragmentSelfContained(java.lang.String uri,
                                     java.lang.String localName,
                                     java.lang.String prefix)
                                     throws EXIException
Supplies the start of a self-contained element. Self contained elements may be read independently from the rest of the EXI body, allowing them to be indexed for random access.

Provides access to the namespace URI, and local name of the start tag.

Parameters:
uri -
localName -
Returns:
byte where the selfContained fragments starts or -1 if not retrievable
Throws:
EXIException

encodeEndElement

void encodeEndElement()
                      throws EXIException
Supplies the end tag of an element.

Throws:
EXIException

encodeEndFragmentSelfContained

void encodeEndFragmentSelfContained()
                                    throws EXIException
Supplies the end tag of an SC fragment.

Throws:
EXIException

encodeAttribute

void encodeAttribute(java.lang.String uri,
                     java.lang.String localName,
                     java.lang.String prefix,
                     java.lang.String value)
                     throws EXIException
Supplies an attribute.

Provides access to the namespace URI, local name, prefix, and value of the attribute.

Parameters:
uri -
localName -
prefix - (can be null according to fidelity options)
value -
Throws:
EXIException

encodeNamespaceDeclaration

void encodeNamespaceDeclaration(java.lang.String uri,
                                java.lang.String prefix)
                                throws EXIException
Namespaces are reported as a discrete Namespace event.

Parameters:
uri -
prefix -
Throws:
EXIException

encodeXsiNil

void encodeXsiNil(java.lang.String nil)
                  throws EXIException
Supplies an xsi:nil attribute.

Parameters:
nil -
Throws:
EXIException

encodeXsiType

void encodeXsiType(java.lang.String xsiTypeRaw)
                   throws EXIException
Supplies an xsi:type case.

Parameters:
xsiTypeRaw - xsi:type value
Throws:
EXIException

encodeCharacters

void encodeCharacters(java.lang.String chars)
                      throws EXIException
Supplies a comment as corresponding characters.

Note that ignorable whitespace and significant whitespace are also reported as Character events.

Parameters:
chars -
Throws:
EXIException

encodeDocType

void encodeDocType(java.lang.String name,
                   java.lang.String publicID,
                   java.lang.String systemID,
                   java.lang.String text)
                   throws EXIException
Supplies content items to represent a DOCTYPE definition

Parameters:
name -
publicID -
systemID -
text -
Throws:
EXIException

encodeEntityReference

void encodeEntityReference(java.lang.String name)
                           throws EXIException
Supplies the name of an entity reference

Parameters:
name -
Throws:
EXIException

encodeComment

void encodeComment(char[] ch,
                   int start,
                   int length)
                   throws EXIException
Supplies the text of a comment.

Parameters:
ch -
start -
length -
Throws:
EXIException

encodeProcessingInstruction

void encodeProcessingInstruction(java.lang.String target,
                                 java.lang.String data)
                                 throws EXIException
Supplies the target and data for an underlying processing instruction.

Parameters:
target -
data -
Throws:
EXIException

EXIficient