com.resilientedge.util.xmlmapping
Class XmlMapping

java.lang.Object
  |
  +--com.resilientedge.util.xmlmapping.XmlMapping

public abstract class XmlMapping
extends java.lang.Object

The public for marshalling JavaBeans to and from XML.

Version:
$Revision: 1.1.1.1 $
Author:
jwh

Constructor Summary
XmlMapping()
           
 
Method Summary
static XmlMapping getInstance()
          Factory method that returns the default concrete XmlMapping impl.
static XmlMapping getInstance(java.lang.String[] files)
          Factory method that creates a concrete XmlMapping impl.
protected  void log(java.lang.String message)
          Method Description
abstract  java.lang.String marshal(java.lang.Object objectToMarshal)
          Marshals the object to XML using the implementation's appropriate mapping logic
static void setMappingClass(java.lang.Class mappingClass)
          Set the class that provides xml mapping
static void setMappingFileName(java.lang.String mappingFileName)
          Set the class that provides xml mapping
abstract  java.lang.Object unmarshal(java.lang.String xml)
          Unmarshals the object from XML using the implementation's appropriate mapping logic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlMapping

public XmlMapping()
Method Detail

marshal

public abstract java.lang.String marshal(java.lang.Object objectToMarshal)
                                  throws XmlMappingException
Marshals the object to XML using the implementation's appropriate mapping logic
Parameters:
objectToMarshal - the object to marshal to XML
Returns:
The resulting XML from the marshalling
Throws:
XmlMappingException - Exception Description

unmarshal

public abstract java.lang.Object unmarshal(java.lang.String xml)
                                    throws XmlMappingException
Unmarshals the object from XML using the implementation's appropriate mapping logic
Parameters:
xml - the string containing the full XML document to parse
Returns:
the object unmarshaled from XML
Throws:
XmlMappingException - Exception Description

setMappingClass

public static void setMappingClass(java.lang.Class mappingClass)
Set the class that provides xml mapping
Parameters:
mappingClass - The new MappingClass value

setMappingFileName

public static void setMappingFileName(java.lang.String mappingFileName)
Set the class that provides xml mapping
Parameters:
mappingFileName - The new MappingFileName value

getInstance

public static XmlMapping getInstance()
                              throws XmlMappingException
Factory method that returns the default concrete XmlMapping impl.
Returns:
The Instance value
Throws:
XmlMappingException - Exception Description

getInstance

public static XmlMapping getInstance(java.lang.String[] files)
                              throws XmlMappingException
Factory method that creates a concrete XmlMapping impl. based on a set of mapping files.
Parameters:
files - the list of mapping files to be used by the implementation
Returns:
the XmlMapping instance
Throws:
XmlMappingException - thrown if an error occurred within the implementation

log

protected void log(java.lang.String message)
Method Description
Parameters:
message - Parameter Description


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.