Package org.jvnet.fastinfoset
Interface FastInfosetSerializer
-
- All Known Subinterfaces:
FastInfosetWriter
- All Known Implementing Classes:
DOMDocumentSerializer,Encoder,FastInfosetWriter,SAXDocumentSerializer,SAXDocumentSerializerWithPrefixMapping,StAXDocumentSerializer
public interface FastInfosetSerializerA general interface for serializers of fast infoset documents.This interface contains common methods that are not specific to any API associated with the serialization of XML Infoset to fast infoset documents.
- Author:
- Paul.Sandoz@Sun.Com
-
-
Field Summary
Fields Modifier and Type Field Description static intATTRIBUTE_VALUE_MAP_MEMORY_CONSTRAINTThe default value for limit on the size of indexed Map for attribute values Limit is measured in bytes not in number of entriesstatic StringBUFFER_SIZE_PROPERTYThe property name to be used for getting and setting the buffer size of a parser.static intCHARACTER_CONTENT_CHUNK_MAP_MEMORY_CONSTRAINTThe default value for limit on the size of indexed Map for attribute values Limit is measured in bytes not in number of entriesstatic StringEXTERNAL_VOCABULARIES_PROPERTYThe property name to be used for getting and setting the Map containing external vocabularies.static StringIGNORE_COMMENTS_FEATUREThe feature to ignore comments.static StringIGNORE_DTD_FEATUREThe feature to ignore the document type declaration and the internal subset.static StringIGNORE_PROCESSING_INSTRUCTIONS_FEATUREThe feature to ignore processing instructions.static StringIGNORE_WHITE_SPACE_TEXT_CONTENT_FEATUREThe feature to ignore text content that consists completely of white space characters.static intMAX_ATTRIBUTE_VALUE_SIZEThe default maximum size of the attribute values, that will be indexed.static intMAX_CHARACTER_CONTENT_CHUNK_SIZEThe default maximum size of the character content chunks, that will be indexed.static intMIN_ATTRIBUTE_VALUE_SIZEThe default minimum size of the attribute values, that will be indexed.static intMIN_CHARACTER_CONTENT_CHUNK_SIZEThe default minimum size of the character content chunks, that will be indexed.static StringREGISTERED_ENCODING_ALGORITHMS_PROPERTYThe property name to be used for getting and setting the Map containing encoding algorithms.static StringUTF_16BEThe character encoding scheme string for UTF-16BE.static StringUTF_8The character encoding scheme string for UTF-8.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetAttributeValueMapMemoryLimit()Gets the limit on the memory size of Map of attribute values that will be indexed.intgetCharacterContentChunkMapMemoryLimit()Gets the limit on the memory size, allocated for indexed character content chunks.StringgetCharacterEncodingScheme()Gets the character encoding scheme.booleangetIgnoreComments()Get theIGNORE_COMMENTS_FEATURE.booleangetIgnoreDTD()Get theIGNORE_DTD_FEATURE.booleangetIgnoreProcesingInstructions()booleangetIgnoreWhiteSpaceTextContent()intgetMaxAttributeValueSize()Gets the maximum size of attribute values that will be indexed.intgetMaxCharacterContentChunkSize()Gets the maximum size of character content chunks that might be indexed.intgetMinAttributeValueSize()Gets the minimum size of attribute values that will be indexed.intgetMinCharacterContentChunkSize()Gets the minimum size of character content chunks that will be indexed.MapgetRegisteredEncodingAlgorithms()Gets the set of registered encoding algorithms.VocabularyApplicationDatagetVocabularyApplicationData()Get the application data associated with the serializer vocabulary.voidreset()Reset the serializer for reuse serializing another XML infoset.voidsetAttributeValueMapMemoryLimit(int size)Sets the limit on the memory size of Map of attribute values that will be indexed.voidsetCharacterContentChunkMapMemoryLimit(int size)Sets the limit on the memory size, allocated for indexed character content chunks.voidsetCharacterEncodingScheme(String characterEncodingScheme)Sets the character encoding scheme.voidsetExternalVocabulary(ExternalVocabulary v)Set the external vocabulary that shall be used when serializing.voidsetIgnoreComments(boolean ignoreComments)Set theIGNORE_COMMENTS_FEATURE.voidsetIgnoreDTD(boolean ignoreDTD)Set theIGNORE_DTD_FEATURE.voidsetIgnoreProcesingInstructions(boolean ignoreProcesingInstructions)voidsetIgnoreWhiteSpaceTextContent(boolean ignoreWhiteSpaceTextContent)voidsetMaxAttributeValueSize(int size)Sets the maximum size of attribute values that will be indexed.voidsetMaxCharacterContentChunkSize(int size)Sets the maximum size of character content chunks that might be indexed.voidsetMinAttributeValueSize(int size)Sets the minimum size of attribute values that will be indexed.voidsetMinCharacterContentChunkSize(int size)Sets the minimum size of character content chunks that will be indexed.voidsetOutputStream(OutputStream s)Set the OutputStream to serialize the XML infoset to a fast infoset document.voidsetRegisteredEncodingAlgorithms(Map algorithms)Sets the set of registered encoding algorithms.voidsetVocabularyApplicationData(VocabularyApplicationData data)Set the application data to be associated with the serializer vocabulary.
-
-
-
Field Detail
-
IGNORE_DTD_FEATURE
static final String IGNORE_DTD_FEATURE
The feature to ignore the document type declaration and the internal subset.The default value is false. If true a serializer shall ignore document type declaration and the internal subset.
- See Also:
- Constant Field Values
-
IGNORE_COMMENTS_FEATURE
static final String IGNORE_COMMENTS_FEATURE
The feature to ignore comments.The default value is false. If true a serializer shall ignore comments and shall not serialize them.
- See Also:
- Constant Field Values
-
IGNORE_PROCESSING_INSTRUCTIONS_FEATURE
static final String IGNORE_PROCESSING_INSTRUCTIONS_FEATURE
The feature to ignore processing instructions.The default value is false. If true a serializer shall ignore processing instructions and shall not serialize them.
- See Also:
- Constant Field Values
-
IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE
static final String IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE
The feature to ignore text content that consists completely of white space characters.The default value is false. If true a serializer shall ignore text content that consists completely of white space characters.
- See Also:
- Constant Field Values
-
BUFFER_SIZE_PROPERTY
static final String BUFFER_SIZE_PROPERTY
The property name to be used for getting and setting the buffer size of a parser.- See Also:
- Constant Field Values
-
REGISTERED_ENCODING_ALGORITHMS_PROPERTY
static final String REGISTERED_ENCODING_ALGORITHMS_PROPERTY
The property name to be used for getting and setting the Map containing encoding algorithms.- See Also:
- Constant Field Values
-
EXTERNAL_VOCABULARIES_PROPERTY
static final String EXTERNAL_VOCABULARIES_PROPERTY
The property name to be used for getting and setting the Map containing external vocabularies.- See Also:
- Constant Field Values
-
MIN_CHARACTER_CONTENT_CHUNK_SIZE
static final int MIN_CHARACTER_CONTENT_CHUNK_SIZE
The default minimum size of the character content chunks, that will be indexed.- See Also:
- Constant Field Values
-
MAX_CHARACTER_CONTENT_CHUNK_SIZE
static final int MAX_CHARACTER_CONTENT_CHUNK_SIZE
The default maximum size of the character content chunks, that will be indexed.- See Also:
- Constant Field Values
-
CHARACTER_CONTENT_CHUNK_MAP_MEMORY_CONSTRAINT
static final int CHARACTER_CONTENT_CHUNK_MAP_MEMORY_CONSTRAINT
The default value for limit on the size of indexed Map for attribute values Limit is measured in bytes not in number of entries- See Also:
- Constant Field Values
-
MIN_ATTRIBUTE_VALUE_SIZE
static final int MIN_ATTRIBUTE_VALUE_SIZE
The default minimum size of the attribute values, that will be indexed.- See Also:
- Constant Field Values
-
MAX_ATTRIBUTE_VALUE_SIZE
static final int MAX_ATTRIBUTE_VALUE_SIZE
The default maximum size of the attribute values, that will be indexed.- See Also:
- Constant Field Values
-
ATTRIBUTE_VALUE_MAP_MEMORY_CONSTRAINT
static final int ATTRIBUTE_VALUE_MAP_MEMORY_CONSTRAINT
The default value for limit on the size of indexed Map for attribute values Limit is measured in bytes not in number of entries- See Also:
- Constant Field Values
-
UTF_8
static final String UTF_8
The character encoding scheme string for UTF-8.- See Also:
- Constant Field Values
-
UTF_16BE
static final String UTF_16BE
The character encoding scheme string for UTF-16BE.- See Also:
- Constant Field Values
-
-
Method Detail
-
setIgnoreDTD
void setIgnoreDTD(boolean ignoreDTD)
Set theIGNORE_DTD_FEATURE.- Parameters:
ignoreDTD- true if the feature shall be ignored.
-
getIgnoreDTD
boolean getIgnoreDTD()
Get theIGNORE_DTD_FEATURE.- Returns:
- true if the feature is ignored, false otherwise.
-
setIgnoreComments
void setIgnoreComments(boolean ignoreComments)
Set theIGNORE_COMMENTS_FEATURE.- Parameters:
ignoreComments- true if the feature shall be ignored.
-
getIgnoreComments
boolean getIgnoreComments()
Get theIGNORE_COMMENTS_FEATURE.- Returns:
- true if the feature is ignored, false otherwise.
-
setIgnoreProcesingInstructions
void setIgnoreProcesingInstructions(boolean ignoreProcesingInstructions)
- Parameters:
ignoreProcesingInstructions- true if the feature shall be ignored.
-
getIgnoreProcesingInstructions
boolean getIgnoreProcesingInstructions()
- Returns:
- true if the feature is ignored, false otherwise.
-
setIgnoreWhiteSpaceTextContent
void setIgnoreWhiteSpaceTextContent(boolean ignoreWhiteSpaceTextContent)
- Parameters:
ignoreWhiteSpaceTextContent- true if the feature shall be ignored.
-
getIgnoreWhiteSpaceTextContent
boolean getIgnoreWhiteSpaceTextContent()
- Returns:
- true if the feature is ignored, false otherwise.
-
setCharacterEncodingScheme
void setCharacterEncodingScheme(String characterEncodingScheme)
Sets the character encoding scheme. The character encoding can be either UTF-8 or UTF-16BE for the the encoding of chunks of CIIs, the [normalized value] property of attribute information items, comment information items and processing instruction information items.- Parameters:
characterEncodingScheme- The set of registered algorithms.
-
getCharacterEncodingScheme
String getCharacterEncodingScheme()
Gets the character encoding scheme.- Returns:
- The character encoding scheme.
-
setRegisteredEncodingAlgorithms
void setRegisteredEncodingAlgorithms(Map algorithms)
Sets the set of registered encoding algorithms.- Parameters:
algorithms- The set of registered algorithms.
-
getRegisteredEncodingAlgorithms
Map getRegisteredEncodingAlgorithms()
Gets the set of registered encoding algorithms.- Returns:
- The set of registered algorithms.
-
getMinCharacterContentChunkSize
int getMinCharacterContentChunkSize()
Gets the minimum size of character content chunks that will be indexed.- Returns:
- The minimum character content chunk size.
-
setMinCharacterContentChunkSize
void setMinCharacterContentChunkSize(int size)
Sets the minimum size of character content chunks that will be indexed.- Parameters:
size- the minimum character content chunk size.
-
getMaxCharacterContentChunkSize
int getMaxCharacterContentChunkSize()
Gets the maximum size of character content chunks that might be indexed.- Returns:
- The maximum character content chunk size.
-
setMaxCharacterContentChunkSize
void setMaxCharacterContentChunkSize(int size)
Sets the maximum size of character content chunks that might be indexed.- Parameters:
size- the maximum character content chunk size.
-
getCharacterContentChunkMapMemoryLimit
int getCharacterContentChunkMapMemoryLimit()
Gets the limit on the memory size, allocated for indexed character content chunks.- Returns:
- the limit on the memory size, allocated for indexed character content chunks.
-
setCharacterContentChunkMapMemoryLimit
void setCharacterContentChunkMapMemoryLimit(int size)
Sets the limit on the memory size, allocated for indexed character content chunks.- Parameters:
size- the limit on the memory size, allocated for indexed character content chunks.
-
getMinAttributeValueSize
int getMinAttributeValueSize()
Gets the minimum size of attribute values that will be indexed.- Returns:
- The minimum attribute values size.
-
setMinAttributeValueSize
void setMinAttributeValueSize(int size)
Sets the minimum size of attribute values that will be indexed.- Parameters:
size- the minimum attribute values size.
-
getMaxAttributeValueSize
int getMaxAttributeValueSize()
Gets the maximum size of attribute values that will be indexed.- Returns:
- The maximum attribute values size.
-
setMaxAttributeValueSize
void setMaxAttributeValueSize(int size)
Sets the maximum size of attribute values that will be indexed.- Parameters:
size- the maximum attribute values size.
-
getAttributeValueMapMemoryLimit
int getAttributeValueMapMemoryLimit()
Gets the limit on the memory size of Map of attribute values that will be indexed.- Returns:
- The attribute value size limit.
-
setAttributeValueMapMemoryLimit
void setAttributeValueMapMemoryLimit(int size)
Sets the limit on the memory size of Map of attribute values that will be indexed.- Parameters:
size- The attribute value size limit. Any value less that a length of size limit will be indexed.
-
setExternalVocabulary
void setExternalVocabulary(ExternalVocabulary v)
Set the external vocabulary that shall be used when serializing.- Parameters:
v- the vocabulary.
-
setVocabularyApplicationData
void setVocabularyApplicationData(VocabularyApplicationData data)
Set the application data to be associated with the serializer vocabulary.- Parameters:
data- the application data.
-
getVocabularyApplicationData
VocabularyApplicationData getVocabularyApplicationData()
Get the application data associated with the serializer vocabulary.- Returns:
- the application data.
-
reset
void reset()
Reset the serializer for reuse serializing another XML infoset.
-
setOutputStream
void setOutputStream(OutputStream s)
Set the OutputStream to serialize the XML infoset to a fast infoset document.- Parameters:
s- the OutputStream where the fast infoset document is written to.
-
-