net.sf.omap.xml
Class XMLMapper

java.lang.Object
  extended bynet.sf.omap.xml.XMLMapper

public class XMLMapper
extends java.lang.Object


Constructor Summary
XMLMapper(java.io.File definition)
          Creates a Object to XML mapper that will use the default String character set.
XMLMapper(java.io.File definition, java.nio.charset.Charset charset)
          Creates a Object to XML mapper
XMLMapper(java.io.File definition, java.lang.String charset)
          Creates a Object to XML mapper
XMLMapper(java.lang.String definitionName)
          Creates a Object to XML mapper that will use the default String character set.
XMLMapper(java.lang.String definitionName, java.nio.charset.Charset charset)
          Creates a Object to XML mapper
XMLMapper(java.lang.String definitionName, java.lang.String charset)
          Creates a Object to XML mapper
 
Method Summary
 void map(java.lang.Object o, java.io.File out)
          Maps the object to XML save to the given file
 void map(java.lang.Object o, java.io.OutputStream out)
          Maps the object to XML save to the given output stream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLMapper

public XMLMapper(java.io.File definition)
Creates a Object to XML mapper that will use the default String character set.

Parameters:
definition - the file containing the mapping definition

XMLMapper

public XMLMapper(java.lang.String definitionName)
Creates a Object to XML mapper that will use the default String character set.

Parameters:
definitionName - the resource name of the mapping definition

XMLMapper

public XMLMapper(java.io.File definition,
                 java.lang.String charset)
Creates a Object to XML mapper

Parameters:
definition - the file that contains mapping definition
charset - the character set to use

XMLMapper

public XMLMapper(java.lang.String definitionName,
                 java.lang.String charset)
Creates a Object to XML mapper

Parameters:
definitionName - the resource name of the mapping definition
charset - the character set to use

XMLMapper

public XMLMapper(java.io.File definition,
                 java.nio.charset.Charset charset)
Creates a Object to XML mapper

Parameters:
definition - the file containing the mapping definition
charset - the character set to use (a Charset object

XMLMapper

public XMLMapper(java.lang.String definitionName,
                 java.nio.charset.Charset charset)
Creates a Object to XML mapper

Parameters:
definitionName - the resource name of the mapping definition
charset - the character set to use (a Charset object
Method Detail

map

public void map(java.lang.Object o,
                java.io.File out)
         throws java.io.IOException
Maps the object to XML save to the given file

Parameters:
o - the object to map
out - the file where to write the mapped XML
Throws:
java.io.IOException

map

public void map(java.lang.Object o,
                java.io.OutputStream out)
         throws java.io.IOException
Maps the object to XML save to the given output stream

Parameters:
o - the object to map
out - the OutputStream where to write the mapped XML
Throws:
java.io.IOException