SMILA (incubation) API documentation

org.eclipse.smila.utils.jaxb
Class JaxbUtils

java.lang.Object
  extended by org.eclipse.smila.utils.jaxb.JaxbUtils

public final class JaxbUtils
extends java.lang.Object

The Class JaxbHelper.


Method Summary
static javax.xml.bind.Marshaller createValidatingMarshaller(javax.xml.bind.JAXBContext context, javax.xml.validation.Schema schema)
          Creates the validating marshaller.
static javax.xml.bind.Marshaller createValidatingMarshaller(javax.xml.bind.JAXBContext context, java.lang.String bundleId, java.lang.String resourcePath)
          Creates the validating marshaller.
static javax.xml.bind.Unmarshaller createValidatingUnmarshaller(javax.xml.bind.JAXBContext context, javax.xml.validation.Schema schema)
          Creates the validating unmarshaller.
static javax.xml.bind.Unmarshaller createValidatingUnmarshaller(javax.xml.bind.JAXBContext context, java.lang.String bundleId, java.lang.String resourcePath)
          Creates the validating unmarshaller.
static javax.xml.bind.ValidationEventHandler createValidationEventHandler()
          Creates the validation event handler.
static void marshall(java.lang.Object jaxbElement, java.lang.String contextPackage, java.lang.ClassLoader classLoader, javax.xml.validation.Schema schema, java.io.OutputStream outputStream)
          Marshall.
static void marshall(java.lang.Object jaxbElement, java.lang.String bundleId, java.lang.String contextPackage, java.lang.ClassLoader classLoader, java.lang.String schemaPath, java.io.OutputStream outputStream)
          Marshall.
static java.lang.Object unmarshall(java.lang.String contextPackage, java.lang.ClassLoader classLoader, javax.xml.validation.Schema schema, java.io.InputStream inputStream)
          Unmarshall.
static java.lang.Object unmarshall(java.lang.String bundleId, java.lang.String contextPackage, java.lang.ClassLoader classLoader, java.lang.String schemaLocation, java.io.InputStream inputStream)
          Unmarshall.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createValidatingUnmarshaller

public static javax.xml.bind.Unmarshaller createValidatingUnmarshaller(javax.xml.bind.JAXBContext context,
                                                                       javax.xml.validation.Schema schema)
                                                                throws javax.xml.bind.JAXBException
Creates the validating unmarshaller.

Parameters:
context - the context
schema - the schema
Returns:
the unmarshaller
Throws:
javax.xml.bind.JAXBException - the JAXB exception

createValidatingMarshaller

public static javax.xml.bind.Marshaller createValidatingMarshaller(javax.xml.bind.JAXBContext context,
                                                                   javax.xml.validation.Schema schema)
                                                            throws javax.xml.bind.JAXBException
Creates the validating marshaller.

Parameters:
context - the context
schema - the schema
Returns:
the marshaller
Throws:
javax.xml.bind.JAXBException - the JAXB exception

createValidationEventHandler

public static javax.xml.bind.ValidationEventHandler createValidationEventHandler()
Creates the validation event handler.

Returns:
the validation event handler

createValidatingUnmarshaller

public static javax.xml.bind.Unmarshaller createValidatingUnmarshaller(javax.xml.bind.JAXBContext context,
                                                                       java.lang.String bundleId,
                                                                       java.lang.String resourcePath)
                                                                throws javax.xml.bind.JAXBException,
                                                                       org.xml.sax.SAXException
Creates the validating unmarshaller.

Parameters:
context - the context
bundleId - the bundle id
resourcePath - the resource path
Returns:
the unmarshaller
Throws:
javax.xml.bind.JAXBException - the JAXB exception
org.xml.sax.SAXException - the SAX exception

createValidatingMarshaller

public static javax.xml.bind.Marshaller createValidatingMarshaller(javax.xml.bind.JAXBContext context,
                                                                   java.lang.String bundleId,
                                                                   java.lang.String resourcePath)
                                                            throws javax.xml.bind.JAXBException,
                                                                   org.xml.sax.SAXException
Creates the validating marshaller.

Parameters:
context - the context
bundleId - the bundle id
resourcePath - the resource path
Returns:
the marshaller
Throws:
javax.xml.bind.JAXBException - the JAXB exception
org.xml.sax.SAXException - the SAX exception

unmarshall

public static java.lang.Object unmarshall(java.lang.String bundleId,
                                          java.lang.String contextPackage,
                                          java.lang.ClassLoader classLoader,
                                          java.lang.String schemaLocation,
                                          java.io.InputStream inputStream)
                                   throws javax.xml.bind.JAXBException,
                                          org.xml.sax.SAXException
Unmarshall.

Parameters:
bundleId - the bundle id
contextPackage - the context package
classLoader - the class loader
schemaLocation - the schema location
inputStream - the input stream
Returns:
the object
Throws:
javax.xml.bind.JAXBException - the JAXB exception
org.xml.sax.SAXException - the SAX exception

unmarshall

public static java.lang.Object unmarshall(java.lang.String contextPackage,
                                          java.lang.ClassLoader classLoader,
                                          javax.xml.validation.Schema schema,
                                          java.io.InputStream inputStream)
                                   throws javax.xml.bind.JAXBException,
                                          org.xml.sax.SAXException
Unmarshall.

Parameters:
contextPackage - the context package
classLoader - the class loader
schema - the schema
inputStream - the input stream
Returns:
the object
Throws:
javax.xml.bind.JAXBException - the JAXB exception
org.xml.sax.SAXException - the SAX exception

marshall

public static void marshall(java.lang.Object jaxbElement,
                            java.lang.String bundleId,
                            java.lang.String contextPackage,
                            java.lang.ClassLoader classLoader,
                            java.lang.String schemaPath,
                            java.io.OutputStream outputStream)
                     throws javax.xml.bind.JAXBException,
                            org.xml.sax.SAXException
Marshall.

Parameters:
jaxbElement - the jaxb element
bundleId - the bundle id
contextPackage - the context package
classLoader - the class loader
schemaPath - the schema path
outputStream - the output stream
Throws:
javax.xml.bind.JAXBException - the JAXB exception
org.xml.sax.SAXException - the SAX exception

marshall

public static void marshall(java.lang.Object jaxbElement,
                            java.lang.String contextPackage,
                            java.lang.ClassLoader classLoader,
                            javax.xml.validation.Schema schema,
                            java.io.OutputStream outputStream)
                     throws javax.xml.bind.JAXBException,
                            org.xml.sax.SAXException
Marshall.

Parameters:
jaxbElement - the jaxb element
contextPackage - the context package
classLoader - the class loader
schema - the schema
outputStream - the output stream
Throws:
javax.xml.bind.JAXBException - the JAXB exception
org.xml.sax.SAXException - the SAX exception

SMILA (incubation) API documentation