com.candle.roma.kxm
Class KxmMsgConvertOptions

java.lang.Object
  |
  +--com.candle.roma.kxm.KxmMsgConvertOptions
All Implemented Interfaces:
java.lang.Cloneable

public class KxmMsgConvertOptions
extends java.lang.Object
implements java.lang.Cloneable

Represents the message conversion options. This object is used to provide options to the KxmMessage.convert(String format, KxmMsgConvertOptions options) method.

See Also:
KxmMessage

Field Summary
static int BY_MAP
          Message conversion option.
See setOptions(int options)
static int DISABLE_NAMESPACES
          Message conversion option.
See setOptions(int options)
static int HANDLE_NAMESPACES
          Message conversion option.
See setOptions(int options)
static int HEX_XML_FORMAT
          Message conversion option.
See setOptions(int options)
static int MAP_REQUIRED
          Message conversion option.
See setOptions(int options)
static int OLD_TEXT_FORMAT
          Message conversion option.
See setOptions(int options)
static int SCALAR_AS_ARRAY
          Message conversion option.
See setOptions(int options)
static int TO_FORMAT
          Message conversion option.
See setOptions(int options)
static int TO_XML
          Message conversion option.
See setOptions(int options)
 
Constructor Summary
KxmMsgConvertOptions()
          Creates the object with no options set.
KxmMsgConvertOptions(int options)
          Creates the object and sets the specified coversion options.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the object.
 long getHandle()
           
 java.lang.String getNsUri()
          Returns the XML namespace URI that will be associated with the root element of the converted message.
 int getOptions()
          Returns the message conversion options.
 void setNsUri(java.lang.String uri)
          Sets the XML namespace URI that will be associated with the root element of the converted message.
 void setOptions(int options)
          Sets the message conversion options.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TO_XML

public static final int TO_XML
Message conversion option.
See setOptions(int options)

TO_FORMAT

public static final int TO_FORMAT
Message conversion option.
See setOptions(int options)

BY_MAP

public static final int BY_MAP
Message conversion option.
See setOptions(int options)

MAP_REQUIRED

public static final int MAP_REQUIRED
Message conversion option.
See setOptions(int options)

HANDLE_NAMESPACES

public static final int HANDLE_NAMESPACES
Message conversion option.
See setOptions(int options)

OLD_TEXT_FORMAT

public static final int OLD_TEXT_FORMAT
Message conversion option.
See setOptions(int options)

DISABLE_NAMESPACES

public static final int DISABLE_NAMESPACES
Message conversion option.
See setOptions(int options)

HEX_XML_FORMAT

public static final int HEX_XML_FORMAT
Message conversion option.
See setOptions(int options)

SCALAR_AS_ARRAY

public static final int SCALAR_AS_ARRAY
Message conversion option.
See setOptions(int options)
Constructor Detail

KxmMsgConvertOptions

public KxmMsgConvertOptions()
Creates the object with no options set.

KxmMsgConvertOptions

public KxmMsgConvertOptions(int options)
Creates the object and sets the specified coversion options.
Parameters:
options - Message conversion options.
See setOptions(int options)
Method Detail

getOptions

public int getOptions()
Returns the message conversion options.

setOptions

public void setOptions(int options)
Sets the message conversion options.
Parameters:
options - Message conversion options. One of the following mutually exclusive options must be specified:
  • KxmMsgConvertOptions.TO_XML A message will be converted into a standalone XML document. Conversion maps are not used in this case.
  • KxmMsgConvertOptions.TO_FORMAT A message will be converted into format defined in the Metadata Repository. Initially, the conversion engine searches for a conversion map that is able to convert the current message format to the target format. The search is performed in the same namespace where the source format resides. If no appropriate map found then the format is converted based on the default conversion rules.
  • KxmMsgConvertOptions.BY_MAP A message will be converted by the map defined in the Metadata Repository. The message cannot be a standalone one and should have the same format as the source format of the map.
A combination of the following optional modifiers may be specified in addition to one of the above options.
  • KxmMsgConvertOptions.MAP_REQUIRED May be used along with the TO_FORMAT option only. The conversion engine will report an error if the appropriate conversion map is not found in the Metadata Repository. By default, the conversion engine silently attempts to perform implicit conversion. Use this option to avoid the implicit conversion.
  • KxmMsgConvertOptions.HANDLE_NAMESPACES Enables XML Namespace handling.
  • KxmMsgConvertOptions.OLD_TEXT_FORMAT Enables handling of the data text representation used in the eBP 3.1 and earlier versions.
  • KxmMsgConvertOptions.DISABLE_NAMESPACES Disables XML Namespace handling. The handling is enabled by default.
  • KxmMsgConvertOptions.HEX_XML_FORMAT
    By default binary data is stored into XML elements as BASE64 encoded sequence. If this option is specified then binary data is stored as HEX sequence.
  • KxmMsgConvertOptions.SCALAR_AS_ARRAY
    This option does not impact conversion but changes how array operations will work for the KxmMessage object that is result of the conversion. If this option is specified then array operations will work for scalar fields.

setNsUri

public void setNsUri(java.lang.String uri)
Sets the XML namespace URI that will be associated with the root element of the converted message.
Parameters:
uri - XML namespace URI.

getNsUri

public java.lang.String getNsUri()
Returns the XML namespace URI that will be associated with the root element of the converted message.

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the object.

getHandle

public long getHandle()