EXIficient

com.siemens.ct.exi
Interface EXIFactory

All Known Implementing Classes:
DefaultEXIFactory

public interface EXIFactory

An EXI Factory is used for setting EXI coding options on one hand and retrieving the according reader and writer classes on the other hand.

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

Method Summary
 DecoderBlock createDecoderBlock(java.io.InputStream inputStream)
          Returns an EXI DecoderBlock according coding options like CodingMode etc.
 EncoderBlock createEncoderBlock(java.io.OutputStream outputStream)
          Returns an EXI EncoderBlock according coding options like CodingMode etc.
 EXIDecoder createEXIDecoder()
          Returns an EXIDecoder
 EXIEncoder createEXIEncoder()
          Returns an EXIEncoder
 org.xml.sax.XMLReader createEXIReader()
          Returns an EXIReader
 EXIWriter createEXIWriter()
          Returns an EXIWriter
 TypeDecoder createTypeDecoder()
          Returns an EXI TypeDecoder according coding options such as schema-informed or schema-less grammar and options like Preserve.LexicalValues
 TypeEncoder createTypeEncoder()
          Returns an EXI TypeEncoder according coding options such as schema-informed or schema-less grammar and options like Preserve.LexicalValues
 CodingMode getCodingMode()
          Returns the currently used CodingMode.
 FidelityOptions getFidelityOptions()
          Returns the fidelity options used by the EXI factory (e.g. preserving XML comments or DTDs).
 Grammar getGrammar()
          Returns the currently used EXI Grammar.
 boolean isEXIBodyOnly()
           
 boolean isFragment()
          Returns whether we deal with a fragment
 void setCodingMode(CodingMode codingMode)
          Re-sets the coding mode used by the factory.
 void setDatatypeRepresentationMap(DatatypeRepresentation[] datatypeRepresentations)
          By default, each typed value in an EXI stream is represented by the associated built-in EXI datatype representation.
 void setEXIBodyOnly(boolean exiBodyOnly)
          Sets whether an EXI Body is preceded by an EXI Header.
 void setFidelityOptions(FidelityOptions fidelityOptions)
          Sets the fidelity options used by the EXI factory (e.g. preserving XML comments or DTDs).
 void setFragment(boolean isFragment)
          Informs the factory that we are dealing with an XML fragment instead of an XML document
 void setGrammar(Grammar grammar)
          Sets the EXI Grammar used for coding.
 

Method Detail

setFidelityOptions

void setFidelityOptions(FidelityOptions fidelityOptions)
Sets the fidelity options used by the EXI factory (e.g. preserving XML comments or DTDs).

Parameters:
fidelityOptions - new fidelity options
See Also:
FidelityOptions

getFidelityOptions

FidelityOptions getFidelityOptions()
Returns the fidelity options used by the EXI factory (e.g. preserving XML comments or DTDs).

Returns:
fidelity options currently used by the factory
See Also:
FidelityOptions

setFragment

void setFragment(boolean isFragment)
Informs the factory that we are dealing with an XML fragment instead of an XML document


isFragment

boolean isFragment()
Returns whether we deal with a fragment

Returns:
is fragment

setGrammar

void setGrammar(Grammar grammar)
Sets the EXI Grammar used for coding.


getGrammar

Grammar getGrammar()
Returns the currently used EXI Grammar. By default a SchemaLessGrammar is used.

Returns:
grammar used by the factory

setCodingMode

void setCodingMode(CodingMode codingMode)
Re-sets the coding mode used by the factory.

Parameters:
codingMode -

getCodingMode

CodingMode getCodingMode()
Returns the currently used CodingMode. By default BIT_PACKED is used.

Returns:
coding-mode used by the factory

setEXIBodyOnly

void setEXIBodyOnly(boolean exiBodyOnly)
Sets whether an EXI Body is preceded by an EXI Header. By default any EXI stream consists of an EXI header followed by an EXI Body. e.g. SelfContained Fragments are treated differently and no additional header is added.

Parameters:
exiBodyOnly -

isEXIBodyOnly

boolean isEXIBodyOnly()

setDatatypeRepresentationMap

void setDatatypeRepresentationMap(DatatypeRepresentation[] datatypeRepresentations)
By default, each typed value in an EXI stream is represented by the associated built-in EXI datatype representation. However, EXI processors MAY provide the capability to specify different built-in EXI datatype representations or user-defined datatype representations for representing specific schema datatypes. This capability is called Datatype Representation Map.


createEXIEncoder

EXIEncoder createEXIEncoder()
Returns an EXIEncoder

Returns:
encoder using the previously set coding options.

createEXIWriter

EXIWriter createEXIWriter()
Returns an EXIWriter

Returns:
writer using the previously set coding options.

createEXIDecoder

EXIDecoder createEXIDecoder()
Returns an EXIDecoder

Returns:
decoder using the previously set coding options.

createEXIReader

org.xml.sax.XMLReader createEXIReader()
Returns an EXIReader

Returns:
reader using the previously set coding options.

createEncoderBlock

EncoderBlock createEncoderBlock(java.io.OutputStream outputStream)
Returns an EXI EncoderBlock according coding options like CodingMode etc.

Returns:
encoder block according given EXI options
See Also:
EncoderBlock

createDecoderBlock

DecoderBlock createDecoderBlock(java.io.InputStream inputStream)
                                throws java.io.IOException
Returns an EXI DecoderBlock according coding options like CodingMode etc.

Returns:
decoder block according given EXI options
Throws:
java.io.IOException
See Also:
DecoderBlock

createTypeEncoder

TypeEncoder createTypeEncoder()
Returns an EXI TypeEncoder according coding options such as schema-informed or schema-less grammar and options like Preserve.LexicalValues

Returns:
type encoder according given EXI options
See Also:
TypeEncoder

createTypeDecoder

TypeDecoder createTypeDecoder()
Returns an EXI TypeDecoder according coding options such as schema-informed or schema-less grammar and options like Preserve.LexicalValues

Returns:
type decoder according given EXI options
See Also:
TypeDecoder

EXIficient