org.apache.axiom.om
Class OMOutputFormat

java.lang.Object
  extended by org.apache.axiom.om.OMOutputFormat

public class OMOutputFormat
extends Object

Formats options for OM Output.

Setting of all the properties in a OMOutputFormat should be done before calling the getContentType() method. It is advised to set all the properties at the creation time of the OMOutputFormat and not to change them later.


Field Summary
static String ACTION_PROPERTY
           
static String DEFAULT_CHAR_SET_ENCODING
          Field DEFAULT_CHAR_SET_ENCODING.
static String USE_CTE_BASE64_FOR_NON_TEXTUAL_ATTACHMENTS
           
 
Constructor Summary
OMOutputFormat()
           
 
Method Summary
 boolean containsKey(String key)
           
 String getCharSetEncoding()
          Returns the character set encoding scheme.
 String getContentType()
          Return the content-type value that should be written with the message.
 String getContentTypeForMTOM(String SOAPContentType)
          Generates a Content-Type value for MTOM messages.
 String getContentTypeForSwA(String SOAPContentType)
           
 String getMimeBoundary()
           
 String getNextContentId()
           
 int getOptimizedThreshold()
           
 Object getProperty(String key)
           
 String getRootContentId()
           
 String getXmlVersion()
           
 boolean isAutoCloseWriter()
           
 boolean isDoingSWA()
           
 boolean isIgnoreXMLDeclaration()
           
 boolean isOptimized()
           
 boolean isSOAP11()
           
 void setAutoCloseWriter(boolean autoCloseWriter)
           
 void setCharSetEncoding(String charSetEncoding)
           
 void setContentType(String c)
          Set a raw content-type (i.e.
 void setDoingSWA(boolean doingSWA)
           
 void setDoOptimize(boolean b)
           
 void setIgnoreXMLDeclaration(boolean ignoreXMLDeclaration)
           
 void setMimeBoundary(String mimeBoundary)
           
 void setOptimizedThreshold(int optimizedThreshold)
           
 Object setProperty(String key, Object value)
           
 void setRootContentId(String rootContentId)
           
 void setSOAP11(boolean b)
           
 void setXmlVersion(String xmlVersion)
           
 String toString()
          Use toString for logging state of the OMOutputFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_CHAR_SET_ENCODING

public static final String DEFAULT_CHAR_SET_ENCODING
Field DEFAULT_CHAR_SET_ENCODING. Specifies the default character encoding scheme to be used.

See Also:
Constant Field Values

ACTION_PROPERTY

public static final String ACTION_PROPERTY
See Also:
Constant Field Values

USE_CTE_BASE64_FOR_NON_TEXTUAL_ATTACHMENTS

public static final String USE_CTE_BASE64_FOR_NON_TEXTUAL_ATTACHMENTS
See Also:
Constant Field Values
Constructor Detail

OMOutputFormat

public OMOutputFormat()
Method Detail

getProperty

public Object getProperty(String key)
Parameters:
key - String
Returns:
property or null

setProperty

public Object setProperty(String key,
                          Object value)
Parameters:
key - String
value - Object
Returns:
old value or null

containsKey

public boolean containsKey(String key)
Parameters:
key -
Returns:
true if known key

isOptimized

public boolean isOptimized()

getContentType

public String getContentType()
Return the content-type value that should be written with the message. (i.e. if optimized, then a multipart/related content-type is returned).

Returns:
content-type value

setContentType

public void setContentType(String c)
Set a raw content-type (i.e. "text/xml" (SOAP 1.1) or "application/xml" (REST)) If this method is not invoked, OMOutputFormat will choose a content-type value consistent with the soap version.

Parameters:
c -

getMimeBoundary

public String getMimeBoundary()

getRootContentId

public String getRootContentId()

getNextContentId

public String getNextContentId()

getCharSetEncoding

public String getCharSetEncoding()
Returns the character set encoding scheme. If the value of the charSetEncoding is not set then the default will be returned.

Returns:
Returns encoding string.

setCharSetEncoding

public void setCharSetEncoding(String charSetEncoding)

getXmlVersion

public String getXmlVersion()

setXmlVersion

public void setXmlVersion(String xmlVersion)

setSOAP11

public void setSOAP11(boolean b)

isSOAP11

public boolean isSOAP11()

isIgnoreXMLDeclaration

public boolean isIgnoreXMLDeclaration()

setIgnoreXMLDeclaration

public void setIgnoreXMLDeclaration(boolean ignoreXMLDeclaration)

setDoOptimize

public void setDoOptimize(boolean b)

isDoingSWA

public boolean isDoingSWA()

setDoingSWA

public void setDoingSWA(boolean doingSWA)

getContentTypeForMTOM

public String getContentTypeForMTOM(String SOAPContentType)
Generates a Content-Type value for MTOM messages. This is a MIME Multipart/Related Content-Type value as defined by RFC 2387 and the XOP specification. The generated header will look like the following: Content-Type: multipart/related; boundary=[MIME BOUNDARY VALUE]; type="application/xop+xml"; start="[MESSAGE CONTENT ID]"; start-info="[MESSAGE CONTENT TYPE]";

Parameters:
SOAPContentType -
Returns:

getContentTypeForSwA

public String getContentTypeForSwA(String SOAPContentType)

isAutoCloseWriter

public boolean isAutoCloseWriter()

setAutoCloseWriter

public void setAutoCloseWriter(boolean autoCloseWriter)

setMimeBoundary

public void setMimeBoundary(String mimeBoundary)

setRootContentId

public void setRootContentId(String rootContentId)

toString

public String toString()
Use toString for logging state of the OMOutputFormat

Overrides:
toString in class Object

setOptimizedThreshold

public void setOptimizedThreshold(int optimizedThreshold)

getOptimizedThreshold

public int getOptimizedThreshold()


Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.