EXIficient

com.siemens.ct.exi.core
Class EXIEncoderInOrderSC

java.lang.Object
  extended by com.siemens.ct.exi.core.AbstractEXICoder
      extended by com.siemens.ct.exi.core.AbstractEXIEncoder
          extended by com.siemens.ct.exi.core.EXIEncoderInOrder
              extended by com.siemens.ct.exi.core.EXIEncoderInOrderSC
All Implemented Interfaces:
EXIEncoder

public class EXIEncoderInOrderSC
extends EXIEncoderInOrder

Encoder for SELF_CONTAINED elements

All productions of the form LeftHandSide : SC Fragment are evaluated as follows:

  1. Save the string table, grammars and any implementation-specific state learned while processing this EXI Body.
  2. Initialize the string table, grammars and any implementation-specific state learned while processing this EXI Body to the state they held just prior to processing this EXI Body.
  3. Skip to the next byte-aligned boundary in the stream if it is not already at such a boundary.
  4. Let qname be the qname of the SE event immediately preceding this SC event.
  5. Let content be the sequence of events following this SC event that match the grammar for element qname, up to and including the terminating EE event.
  6. Evaluate the sequence of events (SD, SE(qname), content, ED) according to the Fragment grammar.
  7. Skip to the next byte-aligned boundary in the stream if it is not already at such a boundary.
  8. Restore the string table, grammars and implementation-specific state learned while processing this EXI Body to that saved in step 1 above.

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

Field Summary
 
Fields inherited from class com.siemens.ct.exi.core.AbstractEXICoder
INITIAL_STACK_SIZE
 
Constructor Summary
EXIEncoderInOrderSC(EXIFactory exiFactory)
           
 
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 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.
 void encodeXsiNil(java.lang.String value, java.lang.String pfx)
          Supplies an xsi:nil attribute.
 void encodeXsiType(java.lang.String xsiTypeRaw)
          Supplies an xsi:type case.
 void setErrorHandler(ErrorHandler errorHandler)
           
 void setOutput(java.io.OutputStream os, boolean exiBodyOnly)
           
 
Methods inherited from class com.siemens.ct.exi.core.AbstractEXICoder
getNamespaces
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EXIEncoderInOrderSC

public EXIEncoderInOrderSC(EXIFactory exiFactory)
Method Detail

setOutput

public void setOutput(java.io.OutputStream os,
                      boolean exiBodyOnly)
               throws EXIException
Specified by:
setOutput in interface EXIEncoder
Overrides:
setOutput in class EXIEncoderInOrder
Throws:
EXIException

setErrorHandler

public void setErrorHandler(ErrorHandler errorHandler)
Specified by:
setErrorHandler in interface EXIEncoder
Overrides:
setErrorHandler in class AbstractEXICoder

encodeStartDocument

public void encodeStartDocument()
                         throws EXIException,
                                java.io.IOException
Description copied from interface: EXIEncoder
Reports the beginning of a set of XML events

Specified by:
encodeStartDocument in interface EXIEncoder
Overrides:
encodeStartDocument in class AbstractEXIEncoder
Throws:
EXIException
java.io.IOException

encodeEndDocument

public void encodeEndDocument()
                       throws EXIException,
                              java.io.IOException
Description copied from interface: EXIEncoder
Reports the end of a set of XML events.

Specified by:
encodeEndDocument in interface EXIEncoder
Overrides:
encodeEndDocument in class AbstractEXIEncoder
Throws:
EXIException
java.io.IOException

encodeStartElement

public void encodeStartElement(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String prefix)
                        throws EXIException,
                               java.io.IOException
Description copied from interface: EXIEncoder
Supplies the start of an element.

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

Specified by:
encodeStartElement in interface EXIEncoder
Overrides:
encodeStartElement in class AbstractEXIEncoder
prefix - (can be null according to fidelity options)
Throws:
EXIException
java.io.IOException

encodeEndElement

public void encodeEndElement()
                      throws EXIException,
                             java.io.IOException
Description copied from interface: EXIEncoder
Supplies the end tag of an element.

Specified by:
encodeEndElement in interface EXIEncoder
Overrides:
encodeEndElement in class AbstractEXIEncoder
Throws:
EXIException
java.io.IOException

encodeAttribute

public void encodeAttribute(java.lang.String uri,
                            java.lang.String localName,
                            java.lang.String prefix,
                            java.lang.String value)
                     throws EXIException,
                            java.io.IOException
Description copied from interface: EXIEncoder
Supplies an attribute.

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

Specified by:
encodeAttribute in interface EXIEncoder
Overrides:
encodeAttribute in class AbstractEXIEncoder
prefix - (can be null according to fidelity options)
Throws:
EXIException
java.io.IOException

encodeNamespaceDeclaration

public void encodeNamespaceDeclaration(java.lang.String uri,
                                       java.lang.String prefix)
                                throws EXIException,
                                       java.io.IOException
Description copied from interface: EXIEncoder
Namespaces are reported as a discrete Namespace event.

Specified by:
encodeNamespaceDeclaration in interface EXIEncoder
Overrides:
encodeNamespaceDeclaration in class AbstractEXIEncoder
Throws:
EXIException
java.io.IOException

encodeXsiNil

public void encodeXsiNil(java.lang.String value,
                         java.lang.String pfx)
                  throws EXIException,
                         java.io.IOException
Description copied from interface: EXIEncoder
Supplies an xsi:nil attribute.

Specified by:
encodeXsiNil in interface EXIEncoder
Overrides:
encodeXsiNil in class AbstractEXIEncoder
Throws:
EXIException
java.io.IOException

encodeXsiType

public void encodeXsiType(java.lang.String xsiTypeRaw)
                   throws EXIException,
                          java.io.IOException
Description copied from interface: EXIEncoder
Supplies an xsi:type case.

Specified by:
encodeXsiType in interface EXIEncoder
Overrides:
encodeXsiType in class AbstractEXIEncoder
Parameters:
xsiTypeRaw - xsi:type value
Throws:
EXIException
java.io.IOException

encodeCharacters

public void encodeCharacters(java.lang.String chars)
                      throws EXIException,
                             java.io.IOException
Description copied from interface: EXIEncoder
Supplies a comment as corresponding characters.

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

Specified by:
encodeCharacters in interface EXIEncoder
Overrides:
encodeCharacters in class AbstractEXIEncoder
Throws:
EXIException
java.io.IOException

encodeDocType

public void encodeDocType(java.lang.String name,
                          java.lang.String publicID,
                          java.lang.String systemID,
                          java.lang.String text)
                   throws EXIException,
                          java.io.IOException
Description copied from interface: EXIEncoder
Supplies content items to represent a DOCTYPE definition

Specified by:
encodeDocType in interface EXIEncoder
Overrides:
encodeDocType in class AbstractEXIEncoder
Throws:
EXIException
java.io.IOException

encodeEntityReference

public void encodeEntityReference(java.lang.String name)
                           throws EXIException,
                                  java.io.IOException
Description copied from interface: EXIEncoder
Supplies the name of an entity reference

Specified by:
encodeEntityReference in interface EXIEncoder
Overrides:
encodeEntityReference in class AbstractEXIEncoder
Throws:
EXIException
java.io.IOException

encodeComment

public void encodeComment(char[] ch,
                          int start,
                          int length)
                   throws EXIException,
                          java.io.IOException
Description copied from interface: EXIEncoder
Supplies the text of a comment.

Specified by:
encodeComment in interface EXIEncoder
Overrides:
encodeComment in class AbstractEXIEncoder
Throws:
EXIException
java.io.IOException

encodeProcessingInstruction

public void encodeProcessingInstruction(java.lang.String target,
                                        java.lang.String data)
                                 throws EXIException,
                                        java.io.IOException
Description copied from interface: EXIEncoder
Supplies the target and data for an underlying processing instruction.

Specified by:
encodeProcessingInstruction in interface EXIEncoder
Overrides:
encodeProcessingInstruction in class AbstractEXIEncoder
Throws:
EXIException
java.io.IOException

EXIficient