MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.xdmio
Class XDMSerializerSettings

java.lang.Object
  extended by ch.ethz.mxquery.xdmio.XDMSerializerSettings

public class XDMSerializerSettings
extends java.lang.Object

Serializer Setting, following the specification in http://www.w3.org/TR/xslt-xquery-serialization/


Field Summary
static int NORMALIZATION_FORM_FULL
           
static int NORMALIZATION_FORM_NFC
           
static int NORMALIZATION_FORM_NFD
           
static int NORMALIZATION_FORM_NFKC
           
static int NORMALIZATION_FORM_NFKD
           
static int NORMALIZATION_FORM_NONE
           
static int OUTPUT_METHOD_HMTL
           
static int OUTPUT_METHOD_TEXT
           
static int OUTPUT_METHOD_XHMTL
           
static int OUTPUT_METHOD_XML
           
static int STANDALONE_NO
           
static int STANDALONE_OMIT
           
static int STANDALONE_YES
           
 
Constructor Summary
XDMSerializerSettings()
          Creates a serializer settings object with a default XML Output model
XDMSerializerSettings(int outputMethod)
          Creates a serializer settings object with the default setting for the given output method
 
Method Summary
 Set getCdataSectionElements()
          Get the set of element names whose text contents should be serialized as CDATA, not as regular strings
 java.util.Hashtable getCharacterMaps()
          Get the list of character substitutions
 java.lang.String getDoctypePublic()
          Get the public id of a doctype declaration
 java.lang.String getDoctypeRootElem()
          Get the root element name of a doctype declaration
 java.lang.String getDoctypeSystem()
          Get the system id of a doctype declaration
 java.lang.String getEncoding()
          Get the encoding for the serialization
 java.lang.String getMediaType()
          Get the media type setting
 int getNormalizationForm()
          Get the unicode normalization format that should be used
 int getOutputMethod()
          Get the output method
 int getStandalone()
          Set the standalone parameter
 java.lang.String getVersion()
          Gets the version parameter
 boolean isByteOrderMark()
          Shall a byte order mark be generated
 boolean isEscapeURIAttributes()
          Shall URI Attributes be escaped?
 boolean isIncludeContentType()
          Shall the content type be included
 boolean isIndent()
          Shall the output be indented?
 boolean isOmitXMLDeclaration()
          Shall the XML declaration be omitted?
 boolean isSerializeStandaloneAttributes()
          Can standalone/top-level attributes be serialized?
 boolean isUndeclarePrefixes()
          Is it allowed to undeclare prefixes?
 void setByteOrderMark(boolean byteOrderMark)
          Set the generation of a byte order mark
 void setCdataSectionElements(Set cdataSectionElements)
          Provide the set of element names whose text contents should be serialized as CDATA, not as regular strings
 void setCharacterMaps(java.util.Hashtable characterMaps)
          Set the list of character substitutions
 void setDoctypePublic(java.lang.String doctypePublic)
          Set the public id of a doctype declaration
 void setDoctypeRootElem(java.lang.String rootElem)
          Set the root element name of a doctype declaration This is not part of the official specification, but might simplify certain tasks
 void setDoctypeSystem(java.lang.String doctypeSystem)
          Set the system id of a doctype declaration
 void setEncoding(java.lang.String encoding)
          Set the encoding for the serialization
 void setEscapeURIAttributes(boolean escapeURIAttributes)
          Set if URI Attributes will be escaped
 void setIncludeContentType(boolean includeContentType)
          Set if the content type shall be included
 void setIndent(boolean indent)
          Set if the output should be indented (= pretty-printed)
 void setMediaType(java.lang.String mediaType)
          Set the media type setting
 void setNormalizationForm(int normalizationForm)
          Set the unicode normalization format that should be used
 void setOmitXMLDeclaration(boolean omitXMLDeclaration)
          Set if the XML declaration be omitted
 void setOutputMethod(int om)
          Set the output method
 void setSerializeStandaloneAttributes(boolean serAttr)
          Allow serializing standalone/top-level attributes This is not part of the spec, but might be useful for debugging/trace cases
 void setStandAlone(int standAlone)
          Set the standalone parameter
 void setUndeclarePrefixes(boolean undeclarePrefixes)
          Set if prefixes may be undeclared
 void setVersion(java.lang.String version)
          Set the version parameter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUT_METHOD_XML

public static final int OUTPUT_METHOD_XML
See Also:
Constant Field Values

OUTPUT_METHOD_XHMTL

public static final int OUTPUT_METHOD_XHMTL
See Also:
Constant Field Values

OUTPUT_METHOD_HMTL

public static final int OUTPUT_METHOD_HMTL
See Also:
Constant Field Values

OUTPUT_METHOD_TEXT

public static final int OUTPUT_METHOD_TEXT
See Also:
Constant Field Values

STANDALONE_OMIT

public static final int STANDALONE_OMIT
See Also:
Constant Field Values

STANDALONE_YES

public static final int STANDALONE_YES
See Also:
Constant Field Values

STANDALONE_NO

public static final int STANDALONE_NO
See Also:
Constant Field Values

NORMALIZATION_FORM_NONE

public static final int NORMALIZATION_FORM_NONE
See Also:
Constant Field Values

NORMALIZATION_FORM_NFC

public static final int NORMALIZATION_FORM_NFC
See Also:
Constant Field Values

NORMALIZATION_FORM_NFD

public static final int NORMALIZATION_FORM_NFD
See Also:
Constant Field Values

NORMALIZATION_FORM_NFKC

public static final int NORMALIZATION_FORM_NFKC
See Also:
Constant Field Values

NORMALIZATION_FORM_NFKD

public static final int NORMALIZATION_FORM_NFKD
See Also:
Constant Field Values

NORMALIZATION_FORM_FULL

public static final int NORMALIZATION_FORM_FULL
See Also:
Constant Field Values
Constructor Detail

XDMSerializerSettings

public XDMSerializerSettings()
Creates a serializer settings object with a default XML Output model


XDMSerializerSettings

public XDMSerializerSettings(int outputMethod)
                      throws MXQueryException
Creates a serializer settings object with the default setting for the given output method

Parameters:
outputMethod -
Throws:
MXQueryException
Method Detail

isByteOrderMark

public boolean isByteOrderMark()
Shall a byte order mark be generated

Returns:
true yes, false no

setByteOrderMark

public void setByteOrderMark(boolean byteOrderMark)
Set the generation of a byte order mark

Parameters:
byteOrderMark -

getCdataSectionElements

public Set getCdataSectionElements()
Get the set of element names whose text contents should be serialized as CDATA, not as regular strings

Returns:
a Set of element names

setCdataSectionElements

public void setCdataSectionElements(Set cdataSectionElements)
Provide the set of element names whose text contents should be serialized as CDATA, not as regular strings

Parameters:
cdataSectionElements - a Set of element names

getDoctypeSystem

public java.lang.String getDoctypeSystem()
Get the system id of a doctype declaration

Returns:
the System ID of a doctype declaration

setDoctypeSystem

public void setDoctypeSystem(java.lang.String doctypeSystem)
Set the system id of a doctype declaration

Parameters:
doctypeSystem - the System ID of a doctype declaration

getDoctypePublic

public java.lang.String getDoctypePublic()
Get the public id of a doctype declaration

Returns:
the Public ID of a doctype declaration

setDoctypePublic

public void setDoctypePublic(java.lang.String doctypePublic)
Set the public id of a doctype declaration

Parameters:
doctypePublic - the Public ID of a doctype declaration

getDoctypeRootElem

public java.lang.String getDoctypeRootElem()
Get the root element name of a doctype declaration

Returns:
the root element name of a doctype declaration

setDoctypeRootElem

public void setDoctypeRootElem(java.lang.String rootElem)
Set the root element name of a doctype declaration This is not part of the official specification, but might simplify certain tasks

Parameters:
rootElem - the root element name of a doctype declaration

isSerializeStandaloneAttributes

public boolean isSerializeStandaloneAttributes()
Can standalone/top-level attributes be serialized?

Returns:
true yes, false no

setSerializeStandaloneAttributes

public void setSerializeStandaloneAttributes(boolean serAttr)
Allow serializing standalone/top-level attributes This is not part of the spec, but might be useful for debugging/trace cases

Parameters:
serAttr - true yes, false no

getEncoding

public java.lang.String getEncoding()
Get the encoding for the serialization

Returns:
a string values expressing the desired encoding

setEncoding

public void setEncoding(java.lang.String encoding)
Set the encoding for the serialization

Parameters:
encoding - a string values expressing the desired encoding

isEscapeURIAttributes

public boolean isEscapeURIAttributes()
Shall URI Attributes be escaped?

Returns:
true yes, false no

setEscapeURIAttributes

public void setEscapeURIAttributes(boolean escapeURIAttributes)
Set if URI Attributes will be escaped

Parameters:
escapeURIAttributes - true yes, false no

isIncludeContentType

public boolean isIncludeContentType()
Shall the content type be included

Returns:
true yes, false no

setIncludeContentType

public void setIncludeContentType(boolean includeContentType)
Set if the content type shall be included

Parameters:
includeContentType - true yes, false no

isIndent

public boolean isIndent()
Shall the output be indented?

Returns:
true yes, false no

setIndent

public void setIndent(boolean indent)
Set if the output should be indented (= pretty-printed)

Parameters:
indent - true yes, false no

getMediaType

public java.lang.String getMediaType()
Get the media type setting

Returns:
a string specifying the MIME media type

setMediaType

public void setMediaType(java.lang.String mediaType)
Set the media type setting

Parameters:
mediaType - a string specifying the MIME media type

getOutputMethod

public int getOutputMethod()
Get the output method

Returns:
one of OUTPUT_METHOD_XML, OUTPUT_METHOD_XHTML, OUTPUT_METHOD_HTML, OUTPUT_METHOD_TEXT

setOutputMethod

public void setOutputMethod(int om)
Set the output method

Parameters:
om - one of OUTPUT_METHOD_XML, OUTPUT_METHOD_XHTML, OUTPUT_METHOD_HTML, OUTPUT_METHOD_TEXT

getNormalizationForm

public int getNormalizationForm()
Get the unicode normalization format that should be used

Returns:
one of NORMALIZATION_FORM_NONE, NORMALIZATION_FORM_NFC, NORMALIZATION_FORM_NFD, NORMALIZATION_FORM_NFKC, NORMALIZATION_FORM_NFKD, NORMALIZATION_FORM_FULL

setNormalizationForm

public void setNormalizationForm(int normalizationForm)
                          throws MXQueryException
Set the unicode normalization format that should be used

Parameters:
normalizationForm - NORMALIZATION_FORM_NONE, NORMALIZATION_FORM_NFC, NORMALIZATION_FORM_NFD, NORMALIZATION_FORM_NFKC, NORMALIZATION_FORM_NFKD, NORMALIZATION_FORM_FULL
Throws:
MXQueryException

isOmitXMLDeclaration

public boolean isOmitXMLDeclaration()
Shall the XML declaration be omitted?

Returns:
true yes, false no

setOmitXMLDeclaration

public void setOmitXMLDeclaration(boolean omitXMLDeclaration)
Set if the XML declaration be omitted

Parameters:
omitXMLDeclaration - true yes, false no

getStandalone

public int getStandalone()
Set the standalone parameter

Returns:
one of STANDALONE_OMIT, STANDALONE_YES, STANDALONE_NO

setStandAlone

public void setStandAlone(int standAlone)
Set the standalone parameter

Parameters:
standAlone - one of STANDALONE_OMIT, STANDALONE_YES, STANDALONE_NO

isUndeclarePrefixes

public boolean isUndeclarePrefixes()
Is it allowed to undeclare prefixes?

Returns:
true yes, false no

setUndeclarePrefixes

public void setUndeclarePrefixes(boolean undeclarePrefixes)
Set if prefixes may be undeclared

Parameters:
undeclarePrefixes - true yes, false no

getCharacterMaps

public java.util.Hashtable getCharacterMaps()
Get the list of character substitutions

Returns:
a Hashtable containing (character -> replacement) mappings

setCharacterMaps

public void setCharacterMaps(java.util.Hashtable characterMaps)
Set the list of character substitutions

Parameters:
characterMaps - a Hashtable containing (character -> replacement) mappings

getVersion

public java.lang.String getVersion()
Gets the version parameter

Returns:
the version number for this document (e.g. 1.0 for XML 1.0)

setVersion

public void setVersion(java.lang.String version)
                throws MXQueryException
Set the version parameter

Parameters:
version -
Throws:
MXQueryException

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich