public class DefaultEXIFactory extends Object implements EXIFactory
EXIFactory class.EXIFactory| Modifier and Type | Field and Description |
|---|---|
protected int |
blockSize |
protected CodingMode |
codingMode |
protected DecodingOptions |
decodingOptions |
protected QName[] |
dtrMapRepresentations |
protected Map<QName,Datatype> |
dtrMapRepresentationsDatatype |
protected QName[] |
dtrMapTypes |
protected EncodingOptions |
encodingOptions |
protected FidelityOptions |
fidelityOptions |
protected Grammars |
grammar |
protected boolean |
grammarLearningDisabled |
protected boolean |
isFragment |
protected boolean |
isUsingNonEvolvingGrammrs |
protected boolean |
localValuePartitions |
protected int |
maximumNumberOfBuiltInElementGrammars |
protected int |
maximumNumberOfBuiltInProductions |
protected static QNameSort |
qnameSort |
protected QName[] |
scElements |
protected SelfContainedHandler |
scHandler |
protected SchemaIdResolver |
schemaIdResolver |
protected List<String> |
sharedStrings |
protected int |
valueMaxLength |
protected int |
valuePartitionCapacity |
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultEXIFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bubbleSort(QName[] dtrMapTypes,
QName[] dtrMapRepresentations) |
EXIFactory |
clone()
Returns a shallow copy of this EXI factory.
|
EXIBodyDecoder |
createEXIBodyDecoder()
Returns an
EXIBodyDecoder |
EXIBodyEncoder |
createEXIBodyEncoder()
Returns an
EXIBodyEncoder |
EXIStreamDecoder |
createEXIStreamDecoder()
Returns an
EXIStreamDecoder |
EXIStreamEncoder |
createEXIStreamEncoder()
Returns an
EXIStreamEncoder |
StringDecoder |
createStringDecoder()
Returns an EXI
StringDecoder according coding options |
StringEncoder |
createStringEncoder()
Returns an EXI
StringEncoder according coding options |
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 |
protected void |
doSanityCheck() |
boolean |
equals(Object o) |
int |
getBlockSize()
The blockSize option specifies the block size used for EXI compression.
|
CodingMode |
getCodingMode()
Returns the currently used
CodingMode. |
QName[] |
getDatatypeRepresentationMapRepresentations()
EXI processors MAY provide the capability to specify different built-in
EXI datatype representations or user-defined datatype representations for
representing specific schema datatypes.
|
QName[] |
getDatatypeRepresentationMapTypes()
EXI processors MAY provide the capability to specify different built-in
EXI datatype representations or user-defined datatype representations for
representing specific schema datatypes.
|
DecodingOptions |
getDecodingOptions()
Returns the options used by the EXI decoder.
|
EncodingOptions |
getEncodingOptions()
Returns the header options used by the EXI encoder.
|
FidelityOptions |
getFidelityOptions()
Returns the fidelity options used by the EXI factory (e.g. preserving XML
comments or DTDs).
|
Grammars |
getGrammars()
Returns the currently used EXI
Grammars. |
int |
getMaximumNumberOfBuiltInElementGrammars()
The EXI profile defines a parameter that restricts the maximum number of
elements for which evolving built-in element grammars can be
instantiated.
|
int |
getMaximumNumberOfBuiltInProductions()
The EXI profile defines a parameter that restricts the maximum number of
top-level productions that can be dynamically inserted in built-in
element grammars.
|
SchemaIdResolver |
getSchemaIdResolver()
Returns schemaId resolver for this factory;
|
SelfContainedHandler |
getSelfContainedHandler()
Returns selfContained element handler.
|
List<String> |
getSharedStrings()
(Experimental) Return list of shared strings.
|
int |
getValueMaxLength()
The default value "unbounded" is assumed when the "valueMaxLength"
element is absent.
|
int |
getValuePartitionCapacity()
The default value "unbounded" is assumed when the
"valuePartitionCapacity" element is absent
|
int |
hashCode() |
boolean |
isFragment()
Returns whether we deal with a fragment
|
boolean |
isGrammarLearningDisabled()
The EXI profile defines parameters that restrict grammar learning.
|
boolean |
isLocalValuePartitions()
The localValuePartitions option of the EXI profile is a Boolean used to
indicate whether local value partitions are used. ] The value "0"
indicates that no local value partition is used while "1" represents the
behavior of the EXI 1.0 specification
|
protected boolean |
isSchemaInformed() |
boolean |
isSelfContainedElement(QName element)
Returns boolean value telling whether a certain element is encoded as
selfContained fragment.
|
boolean |
isUsingNonEvolvingGrammars()
(Experimental) Returns whether non-evolving grammars are used
|
static EXIFactory |
newInstance() |
Datatype |
registerDatatypeRepresentationMapDatatype(QName dtrMapRepresentation,
Datatype datatype)
The DTR map representation may use built-in String datatypes (e.g.,
exi:string) or use user-defined type representations. |
void |
setBlockSize(int blockSize)
The default blockSize is intentionally large (1,000,000) but can be
reduced for processing large documents on devices with limited memory.
|
void |
setCodingMode(CodingMode codingMode)
Re-sets the coding mode used by the factory.
|
void |
setDatatypeRepresentationMap(QName[] dtrMapTypes,
QName[] dtrMapRepresentations)
By default, each typed value in an EXI stream is represented by the
associated built-in EXI datatype representation.
|
void |
setDecodingOptions(DecodingOptions decodingOptions)
Sets the options used by the EXI Decoder(e.g., ignore schemaId).
|
protected static void |
setDefaultValues(EXIFactory factory) |
void |
setEncodingOptions(EncodingOptions encodingOptions)
Sets the header options used by the EXI Encoder(e.g., include EXI Cookie,
EXI Options document).
|
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 |
setGrammars(Grammars grammar)
Sets the EXI
Grammars used for coding. |
void |
setLocalValuePartitions(boolean useLocalValuePartitions)
The EXI profile defines a parameter that can disable the use of local
value references.
|
void |
setMaximumNumberOfBuiltInElementGrammars(int maximumNumberOfBuiltInElementGrammars)
The EXI profile defines a parameter that restricts the maximum number of
elements for which evolving built-in element grammars can be
instantiated.
|
void |
setMaximumNumberOfBuiltInProductions(int maximumNumberOfBuiltInProductions)
The EXI profile defines a parameter that restricts the maximum number of
top-level productions that can be dynamically inserted in built-in
element grammars.
|
void |
setSchemaIdResolver(SchemaIdResolver schemaIdResolver)
Sets specific schemaId resolver.
|
void |
setSelfContainedElements(QName[] scElements)
Self-contained elements may be read independently from the rest of the
EXI body, allowing them to be indexed for random access.
|
void |
setSelfContainedElements(QName[] scElements,
SelfContainedHandler scHandler)
Self-contained elements may be read independently from the rest of the
EXI body, allowing them to be indexed for random access.
|
void |
setSharedStrings(List<String> sharedStrings)
(Experimental) Feature to pre-agree on shared strings.
|
void |
setUsingNonEvolvingGrammars(boolean isNonEvolving)
(Experimental) Feature which dictates that grammar does not grow in any
circumstance
|
void |
setValueMaxLength(int valueMaxLength)
The valueMaxLength option specifies the maximum length of value content
items to be considered for addition to the string table.
|
void |
setValuePartitionCapacity(int valuePartitionCapacity)
The valuePartitionCapacity option specifies the maximum number of value
content items in the string table at any given time.
|
String |
toString() |
protected void |
updateFactoryAccordingCanonicalEXI() |
protected Grammars grammar
protected boolean isFragment
protected CodingMode codingMode
protected FidelityOptions fidelityOptions
protected EncodingOptions encodingOptions
protected DecodingOptions decodingOptions
protected SchemaIdResolver schemaIdResolver
protected QName[] dtrMapTypes
protected QName[] dtrMapRepresentations
protected QName[] scElements
protected SelfContainedHandler scHandler
protected int blockSize
protected int valueMaxLength
protected int valuePartitionCapacity
protected boolean localValuePartitions
protected int maximumNumberOfBuiltInElementGrammars
protected int maximumNumberOfBuiltInProductions
protected boolean grammarLearningDisabled
protected boolean isUsingNonEvolvingGrammrs
protected static final QNameSort qnameSort
protected static void setDefaultValues(EXIFactory factory)
public static EXIFactory newInstance()
public void setFidelityOptions(FidelityOptions fidelityOptions)
EXIFactorysetFidelityOptions in interface EXIFactoryfidelityOptions - new fidelity optionsFidelityOptionspublic FidelityOptions getFidelityOptions()
EXIFactorygetFidelityOptions in interface EXIFactoryFidelityOptionspublic void setEncodingOptions(EncodingOptions encodingOptions)
EXIFactorysetEncodingOptions in interface EXIFactoryencodingOptions - header optionsEncodingOptionspublic EncodingOptions getEncodingOptions()
EXIFactorygetEncodingOptions in interface EXIFactoryEncodingOptionspublic void setDecodingOptions(DecodingOptions decodingOptions)
EXIFactorysetDecodingOptions in interface EXIFactorydecodingOptions - decoding optionsdecoding optionspublic DecodingOptions getDecodingOptions()
EXIFactorygetDecodingOptions in interface EXIFactoryDecodingOptionspublic void setSchemaIdResolver(SchemaIdResolver schemaIdResolver)
EXIFactorysetSchemaIdResolver in interface EXIFactoryschemaIdResolver - schemaId resolverSchemaIdResolverpublic SchemaIdResolver getSchemaIdResolver()
EXIFactorygetSchemaIdResolver in interface EXIFactorypublic void setDatatypeRepresentationMap(QName[] dtrMapTypes, QName[] dtrMapRepresentations)
EXIFactorysetDatatypeRepresentationMap in interface EXIFactorydtrMapTypes - dtrMap typesdtrMapRepresentations - dtrMap representationspublic Datatype registerDatatypeRepresentationMapDatatype(QName dtrMapRepresentation, Datatype datatype)
EXIFactoryexi:string) or use user-defined type representations. This
method allows to register the datatype that should be used.registerDatatypeRepresentationMapDatatype in interface EXIFactorydtrMapRepresentation - dtrMap typedatatype - dtrMap datatypedtrMapRepresentation, or null if there
was no mappingpublic QName[] getDatatypeRepresentationMapTypes()
EXIFactorygetDatatypeRepresentationMapTypes in interface EXIFactorynullpublic QName[] getDatatypeRepresentationMapRepresentations()
EXIFactorygetDatatypeRepresentationMapRepresentations in interface EXIFactorynullpublic void setSelfContainedElements(QName[] scElements)
EXIFactorysetSelfContainedElements in interface EXIFactoryscElements - selfContained elementspublic void setSelfContainedElements(QName[] scElements, SelfContainedHandler scHandler)
EXIFactorysetSelfContainedElements in interface EXIFactoryscElements - selfContained elementsscHandler - handler for SC elementspublic boolean isSelfContainedElement(QName element)
EXIFactoryisSelfContainedElement in interface EXIFactoryelement - qualified element namepublic SelfContainedHandler getSelfContainedHandler()
EXIFactorygetSelfContainedHandler in interface EXIFactorypublic void setGrammars(Grammars grammar)
EXIFactoryGrammars used for coding.setGrammars in interface EXIFactorygrammar - grammarpublic Grammars getGrammars()
EXIFactoryGrammars. By default a
SchemaLessGrammars is used.getGrammars in interface EXIFactoryprotected boolean isSchemaInformed()
public void setFragment(boolean isFragment)
EXIFactorysetFragment in interface EXIFactoryisFragment - true if is fragmentpublic boolean isFragment()
EXIFactoryisFragment in interface EXIFactorypublic void setCodingMode(CodingMode codingMode)
EXIFactorysetCodingMode in interface EXIFactorycodingMode - coding modepublic CodingMode getCodingMode()
EXIFactoryCodingMode. By default BIT_PACKED
is used.getCodingMode in interface EXIFactorypublic void setBlockSize(int blockSize)
EXIFactorysetBlockSize in interface EXIFactoryblockSize - blockSizepublic int getBlockSize()
EXIFactorygetBlockSize in interface EXIFactorypublic void setValueMaxLength(int valueMaxLength)
EXIFactorySee http://www.w3.org/TR/exi/#key-valueMaxLengthOption
setValueMaxLength in interface EXIFactoryvalueMaxLength - the maximum string length of value content items to be
considered for addition to the string tablepublic int getValueMaxLength()
EXIFactorygetValueMaxLength in interface EXIFactorypublic void setValuePartitionCapacity(int valuePartitionCapacity)
EXIFactorySee http://www.w3.org/TR/exi/#key-valuePartitionCapacityOption
setValuePartitionCapacity in interface EXIFactoryvaluePartitionCapacity - the total capacity of value partitions in a string tablepublic int getValuePartitionCapacity()
EXIFactorygetValuePartitionCapacity in interface EXIFactorypublic void setLocalValuePartitions(boolean useLocalValuePartitions)
EXIFactoryThe localValuePartitions option of the EXI profile is a Boolean used to indicate whether local value partitions are used. ] The value "0" indicates that no local value partition is used while "1" represents the behavior of the EXI 1.0 specification
setLocalValuePartitions in interface EXIFactoryuseLocalValuePartitions - whether to use localValue partitionspublic boolean isLocalValuePartitions()
EXIFactoryisLocalValuePartitions in interface EXIFactorypublic void setMaximumNumberOfBuiltInElementGrammars(int maximumNumberOfBuiltInElementGrammars)
EXIFactoryThe value "unbounded" (-1) indicates that no restrictions are used and represents the behavior of the EXI 1.0 specification
setMaximumNumberOfBuiltInElementGrammars in interface EXIFactorymaximumNumberOfBuiltInElementGrammars - maximum number of Built-In element grammarspublic int getMaximumNumberOfBuiltInElementGrammars()
EXIFactorygetMaximumNumberOfBuiltInElementGrammars in interface EXIFactorypublic void setMaximumNumberOfBuiltInProductions(int maximumNumberOfBuiltInProductions)
EXIFactoryThe value "unbounded" (-1) indicates that no restrictions are used and represents the behavior of the EXI 1.0 specification
setMaximumNumberOfBuiltInProductions in interface EXIFactorymaximumNumberOfBuiltInProductions - maximum number of Built-In productionspublic int getMaximumNumberOfBuiltInProductions()
EXIFactorygetMaximumNumberOfBuiltInProductions in interface EXIFactorypublic boolean isGrammarLearningDisabled()
EXIFactoryisGrammarLearningDisabled in interface EXIFactorypublic void setSharedStrings(List<String> sharedStrings)
EXIFactorysetSharedStrings in interface EXIFactorysharedStrings - list of shared stringspublic List<String> getSharedStrings()
EXIFactorygetSharedStrings in interface EXIFactorypublic void setUsingNonEvolvingGrammars(boolean isNonEvolving)
EXIFactorysetUsingNonEvolvingGrammars in interface EXIFactoryisNonEvolving - whether instead of built-in grammars schema-informed Element
Fragment Grammar is usedpublic boolean isUsingNonEvolvingGrammars()
EXIFactoryisUsingNonEvolvingGrammars in interface EXIFactoryprotected void doSanityCheck()
throws EXIException
EXIExceptionpublic EXIBodyEncoder createEXIBodyEncoder() throws EXIException
EXIFactoryEXIBodyEncodercreateEXIBodyEncoder in interface EXIFactoryEXIException - EXI exceptionpublic EXIStreamEncoder createEXIStreamEncoder() throws EXIException
EXIFactoryEXIStreamEncodercreateEXIStreamEncoder in interface EXIFactoryEXIException - EXI exceptionprotected void updateFactoryAccordingCanonicalEXI()
throws UnsupportedOption
UnsupportedOptionpublic EXIBodyDecoder createEXIBodyDecoder() throws EXIException
EXIFactoryEXIBodyDecodercreateEXIBodyDecoder in interface EXIFactoryEXIException - EXI exceptionpublic EXIStreamDecoder createEXIStreamDecoder() throws EXIException
EXIFactoryEXIStreamDecodercreateEXIStreamDecoder in interface EXIFactoryEXIException - EXI exceptionpublic StringEncoder createStringEncoder()
EXIFactoryStringEncoder according coding optionscreateStringEncoder in interface EXIFactorypublic StringDecoder createStringDecoder()
EXIFactoryStringDecoder according coding optionscreateStringDecoder in interface EXIFactorypublic TypeEncoder createTypeEncoder() throws EXIException
EXIFactoryTypeEncoder according coding options such as
schema-informed or schema-less grammar and options like
Preserve.LexicalValuescreateTypeEncoder in interface EXIFactoryEXIException - EXI exceptionTypeEncoderpublic TypeDecoder createTypeDecoder() throws EXIException
EXIFactoryTypeDecoder according coding options such as
schema-informed or schema-less grammar and options like
Preserve.LexicalValuescreateTypeDecoder in interface EXIFactoryEXIException - EXI exceptionTypeDecoderpublic EXIFactory clone()
EXIFactoryclone in interface EXIFactoryclone in class ObjectCopyright © 2018 Siemens AG. All rights reserved.