EXIficient

com.siemens.ct.exi
Interface EXIFactory

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
DefaultEXIFactory

public interface EXIFactory
extends java.lang.Cloneable

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.4.20090224
Author:
Daniel.Peintner.EXT@siemens.com, Joerg.Heuer@siemens.com

Method Summary
 EXIFactory clone()
          Returns a shallow copy of this EXI factory.
 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
 boolean isSelfContainedElement(javax.xml.namespace.QName element)
          Returns boolean value telling whether a certain element is encoded as selfContained 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.
 void setSelfContainedElements(javax.xml.namespace.QName[] scElements)
          Self-contained elements may be read independently from the rest of the EXI body, allowing them to be indexed for random access.
 

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.


setSelfContainedElements

void setSelfContainedElements(javax.xml.namespace.QName[] scElements)
Self-contained elements may be read independently from the rest of the EXI body, allowing them to be indexed for random access. The "selfContained" element MUST NOT appear in an EXI options document when one of "compression", "pre-compression" or "strict" elements are present in the same options document.

Parameters:
scElements -

isSelfContainedElement

boolean isSelfContainedElement(javax.xml.namespace.QName element)
Returns boolean value telling whether a certain element is encoded as selfContained fragment.

Parameters:
element -

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.

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

clone

EXIFactory clone()
Returns a shallow copy of this EXI factory.

Returns:
EXIFactory

EXIficient