oemware.core.util
Class JaxbUtils

java.lang.Object
  extended by oemware.core.util.JaxbUtils

public final class JaxbUtils
extends java.lang.Object

The jaxb xml utils.


Constructor Summary
JaxbUtils()
           
 
Method Summary
static void jaxbMarshal(java.io.OutputStream pOutput, java.lang.String pPackage, java.lang.String pRootElementName, java.lang.Class pRootType, java.lang.Object pObject, boolean pHumanReadable)
          Converts jaxb classes to Xml (marshal).
static void jaxbMarshal(java.lang.String pFileName, java.lang.String pPackage, java.lang.String pRootElementName, java.lang.Class pRootType, java.lang.Object pObject)
          Converts jaxb classes to Xml (marshal).
static void jaxbMarshal(java.lang.String pFileName, java.lang.String pPackage, java.lang.String pRootElementName, java.lang.Class pRootType, java.lang.Object pObject, boolean pHumanReadable)
          Converts jaxb classes to Xml (marshal).
static java.lang.Object jaxbUnmarshal(java.io.InputStream pInput, java.lang.String pPackage)
          Does a jaxb parse.
static java.lang.Object jaxbUnmarshal(java.lang.String pFileName, java.lang.String pPackage)
          Does a jaxb parse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxbUtils

public JaxbUtils()
Method Detail

jaxbMarshal

public static void jaxbMarshal(java.lang.String pFileName,
                               java.lang.String pPackage,
                               java.lang.String pRootElementName,
                               java.lang.Class pRootType,
                               java.lang.Object pObject)
                        throws CoreException
Converts jaxb classes to Xml (marshal).

Parameters:
pFileName - The file name. This expects the file in the classpath.
pPackage - The package where the jaxb generated files are located.
pRootElementName - The root element name.
pRootType - The root class type.
pObject - The object to marshall.
Throws:
CoreException

jaxbMarshal

public static void jaxbMarshal(java.io.OutputStream pOutput,
                               java.lang.String pPackage,
                               java.lang.String pRootElementName,
                               java.lang.Class pRootType,
                               java.lang.Object pObject,
                               boolean pHumanReadable)
                        throws CoreException
Converts jaxb classes to Xml (marshal).

Parameters:
pOutput - The output stream.
pPackage - The package where the jaxb generated files are located.
pRootElementName - The root element name.
pRootType - The root class type.
pObject - The object to marshall.
pHumanReadable - The flag to put eol and indents. Warning - This takes a lot more space.
Throws:
CoreException

jaxbMarshal

public static void jaxbMarshal(java.lang.String pFileName,
                               java.lang.String pPackage,
                               java.lang.String pRootElementName,
                               java.lang.Class pRootType,
                               java.lang.Object pObject,
                               boolean pHumanReadable)
                        throws CoreException
Converts jaxb classes to Xml (marshal).

Parameters:
pFileName - The file name. This expects the file in the classpath.
pPackage - The package where the jaxb generated files are located.
pRootElementName - The root element name.
pRootType - The root class type.
pObject - The object to marshall.
pHumanReadable - The flag to put eol and indents. Warning - This takes a lot more space.
Throws:
CoreException

jaxbUnmarshal

public static java.lang.Object jaxbUnmarshal(java.lang.String pFileName,
                                             java.lang.String pPackage)
                                      throws CoreException
Does a jaxb parse.

Parameters:
pFileName - The file name. This expects the file in the classpath.
pPackage - The package where the jaxb generated files are located.
Returns:
The object.
Throws:
CoreException

jaxbUnmarshal

public static java.lang.Object jaxbUnmarshal(java.io.InputStream pInput,
                                             java.lang.String pPackage)
                                      throws CoreException
Does a jaxb parse.

Parameters:
pInput - The input stream.
pPackage - The package where the jaxb generated files are located.
Returns:
The object.
Throws:
CoreException


Copyright © 2009 Deft Labs - Released under LGPL, Version 3.0