org.jvnet.fastinfoset
Interface FastInfosetSerializer

All Known Subinterfaces:
FastInfosetWriter
All Known Implementing Classes:
DOMDocumentSerializer, Encoder, SAXDocumentSerializer, SAXDocumentSerializerWithPrefixMapping, StAXDocumentSerializer

public interface FastInfosetSerializer

A 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
static int ATTRIBUTE_VALUE_MAP_MEMORY_CONSTRAINT
          The default value for limit on the size of indexed Map for character content chunks Limit is measured in bytes not in number of entries
static int ATTRIBUTE_VALUE_SIZE_CONSTRAINT
          The default value for the limit on the size of attribute values that will be indexed.
static java.lang.String BUFFER_SIZE_PROPERTY
          The property name to be used for getting and setting the buffer size of a parser.
static 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
static int CHARACTER_CONTENT_CHUNK_SIZE_CONSTRAINT
          The default value for the limit on the size of character content chunks that will be indexed.
static java.lang.String EXTERNAL_VOCABULARIES_PROPERTY
          The property name to be used for getting and setting the Map containing external vocabularies.
static java.lang.String IGNORE_COMMENTS_FEATURE
          The feature to ignore comments.
static java.lang.String IGNORE_DTD_FEATURE
          The feature to ignore the document type declaration and the internal subset.
static java.lang.String IGNORE_PROCESSING_INSTRUCTIONS_FEATURE
          The feature to ignore processing instructions.
static java.lang.String IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE
          The feature to ignore text content that consists completely of white space characters.
static java.lang.String REGISTERED_ENCODING_ALGORITHMS_PROPERTY
          The property name to be used for getting and setting the Map containing encoding algorithms.
static java.lang.String UTF_16BE
          The character encoding scheme string for UTF-16BE.
static java.lang.String UTF_8
          The character encoding scheme string for UTF-8.
 
Method Summary
 int getAttributeValueMapMemoryLimit()
          Gets the limit on the memory size of Map of attribute values that will be indexed.
 int getAttributeValueSizeLimit()
          Gets the limit on the size of attribute values that will be indexed.
 int getCharacterContentChunkMapMemoryLimit()
          Gets the limit on the memory size of Map of attribute values that will be indexed.
 int getCharacterContentChunkSizeLimit()
          Gets the limit on the size of character content chunks that will be indexed.
 java.lang.String getCharacterEncodingScheme()
          Gets the character encoding scheme.
 boolean getIgnoreComments()
          Get the IGNORE_COMMENTS_FEATURE.
 boolean getIgnoreDTD()
          Get the IGNORE_DTD_FEATURE.
 boolean getIgnoreProcesingInstructions()
          Get the IGNORE_PROCESSING_INSTRUCTIONS_FEATURE.
 boolean getIgnoreWhiteSpaceTextContent()
          Get the IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE.
 java.util.Map getRegisteredEncodingAlgorithms()
          Gets the set of registered encoding algorithms.
 VocabularyApplicationData getVocabularyApplicationData()
          Get the application data associated with the serializer vocabulary.
 void reset()
          Reset the serializer for reuse serializing another XML infoset.
 void setAttributeValueMapMemoryLimit(int size)
          Sets the limit on the memory size of Map of attribute values that will be indexed.
 void setAttributeValueSizeLimit(int size)
          Sets the limit on the size of attribute values that will be indexed.
 void setCharacterContentChunkMapMemoryLimit(int size)
          Sets the limit on the memory size of Map of attribute values that will be indexed.
 void setCharacterContentChunkSizeLimit(int size)
          Sets the limit on the size of character content chunks that will be indexed.
 void setCharacterEncodingScheme(java.lang.String characterEncodingScheme)
          Sets the character encoding scheme.
 void setExternalVocabulary(ExternalVocabulary v)
          Set the external vocabulary that shall be used when serializing.
 void setIgnoreComments(boolean ignoreComments)
          Set the IGNORE_COMMENTS_FEATURE.
 void setIgnoreDTD(boolean ignoreDTD)
          Set the IGNORE_DTD_FEATURE.
 void setIgnoreProcesingInstructions(boolean ignoreProcesingInstructions)
          Set the IGNORE_PROCESSING_INSTRUCTIONS_FEATURE.
 void setIgnoreWhiteSpaceTextContent(boolean ignoreWhiteSpaceTextContent)
          Set the IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE.
 void setOutputStream(java.io.OutputStream s)
          Set the OutputStream to serialize the XML infoset to a fast infoset document.
 void setRegisteredEncodingAlgorithms(java.util.Map algorithms)
          Sets the set of registered encoding algorithms.
 void setVocabularyApplicationData(VocabularyApplicationData data)
          Set the application data to be associated with the serializer vocabulary.
 

Field Detail

IGNORE_DTD_FEATURE

static final java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String EXTERNAL_VOCABULARIES_PROPERTY
The property name to be used for getting and setting the Map containing external vocabularies.

See Also:
Constant Field Values

CHARACTER_CONTENT_CHUNK_SIZE_CONSTRAINT

static final int CHARACTER_CONTENT_CHUNK_SIZE_CONSTRAINT
The default value for the limit on the size of 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

ATTRIBUTE_VALUE_SIZE_CONSTRAINT

static final int ATTRIBUTE_VALUE_SIZE_CONSTRAINT
The default value for the limit on the size of 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 character content chunks Limit is measured in bytes not in number of entries

See Also:
Constant Field Values

UTF_8

static final java.lang.String UTF_8
The character encoding scheme string for UTF-8.

See Also:
Constant Field Values

UTF_16BE

static final java.lang.String UTF_16BE
The character encoding scheme string for UTF-16BE.

See Also:
Constant Field Values
Method Detail

setIgnoreDTD

void setIgnoreDTD(boolean ignoreDTD)
Set the IGNORE_DTD_FEATURE.

Parameters:
ignoreDTD - true if the feature shall be ignored.

getIgnoreDTD

boolean getIgnoreDTD()
Get the IGNORE_DTD_FEATURE.

Returns:
true if the feature is ignored, false otherwise.

setIgnoreComments

void setIgnoreComments(boolean ignoreComments)
Set the IGNORE_COMMENTS_FEATURE.

Parameters:
ignoreComments - true if the feature shall be ignored.

getIgnoreComments

boolean getIgnoreComments()
Get the IGNORE_COMMENTS_FEATURE.

Returns:
true if the feature is ignored, false otherwise.

setIgnoreProcesingInstructions

void setIgnoreProcesingInstructions(boolean ignoreProcesingInstructions)
Set the IGNORE_PROCESSING_INSTRUCTIONS_FEATURE.

Parameters:
ignoreProcesingInstructions - true if the feature shall be ignored.

getIgnoreProcesingInstructions

boolean getIgnoreProcesingInstructions()
Get the IGNORE_PROCESSING_INSTRUCTIONS_FEATURE.

Returns:
true if the feature is ignored, false otherwise.

setIgnoreWhiteSpaceTextContent

void setIgnoreWhiteSpaceTextContent(boolean ignoreWhiteSpaceTextContent)
Set the IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE.

Parameters:
ignoreWhiteSpaceTextContent - true if the feature shall be ignored.

getIgnoreWhiteSpaceTextContent

boolean getIgnoreWhiteSpaceTextContent()
Get the IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE.

Returns:
true if the feature is ignored, false otherwise.

setCharacterEncodingScheme

void setCharacterEncodingScheme(java.lang.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

java.lang.String getCharacterEncodingScheme()
Gets the character encoding scheme.

Returns:
The character encoding scheme.

setRegisteredEncodingAlgorithms

void setRegisteredEncodingAlgorithms(java.util.Map algorithms)
Sets the set of registered encoding algorithms.

Parameters:
algorithms - The set of registered algorithms.

getRegisteredEncodingAlgorithms

java.util.Map getRegisteredEncodingAlgorithms()
Gets the set of registered encoding algorithms.

Returns:
The set of registered algorithms.

setCharacterContentChunkSizeLimit

void setCharacterContentChunkSizeLimit(int size)
Sets the limit on the size of character content chunks that will be indexed.

Parameters:
size - The character content chunk size limit. Any chunk less that a length of size limit will be indexed.

getCharacterContentChunkSizeLimit

int getCharacterContentChunkSizeLimit()
Gets the limit on the size of character content chunks that will be indexed.

Returns:
The character content chunk size limit.

setCharacterContentChunkMapMemoryLimit

void setCharacterContentChunkMapMemoryLimit(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.

getCharacterContentChunkMapMemoryLimit

int getCharacterContentChunkMapMemoryLimit()
Gets the limit on the memory size of Map of attribute values that will be indexed.

Returns:
The attribute value size limit.

setAttributeValueSizeLimit

void setAttributeValueSizeLimit(int size)
Sets the limit on the size 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.

getAttributeValueSizeLimit

int getAttributeValueSizeLimit()
Gets the limit on the size 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.

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.

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(java.io.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.