org.sourceforge.ifx.utils
Class IFXEncoder

java.lang.Object
  extended byorg.sourceforge.ifx.utils.IFXEncoder

public class IFXEncoder
extends java.lang.Object

Encodes an IFXObject to its equivalent IFX XML Element.

Version:
$Revision: 1.2 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
IFXEncoder()
          Creates an IFXEncoder object in the default namespace.
IFXEncoder(java.lang.String namespacePrefix, java.lang.String namespaceURI)
          Creates an IFXEncoder in the specified namespace.
 
Method Summary
 org.jdom.Element encode(IFXObject obj)
          Builds a JDOM Element for the IFXObject supplied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IFXEncoder

public IFXEncoder()
Creates an IFXEncoder object in the default namespace.


IFXEncoder

public IFXEncoder(java.lang.String namespacePrefix,
                  java.lang.String namespaceURI)
Creates an IFXEncoder in the specified namespace.

Parameters:
namespacePrefix - the namespace prefix to use. If set to null, then the element will be considered to be in the default namespace.
namespaceURI - the URI of the namespace.
Method Detail

encode

public org.jdom.Element encode(IFXObject obj)
                        throws IFXException
Builds a JDOM Element for the IFXObject supplied. No validation is performed, regardless of the setting. To validate, use the encode() methods instead.

Parameters:
obj - an IFXObject.
Returns:
a JDOM Element.
Throws:
IFXException - if an exception was encountered in encoding.