public final class JaxbUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static javax.xml.bind.Unmarshaller createValidatingUnmarshaller(javax.xml.bind.JAXBContext context,
javax.xml.validation.Schema schema)
throws javax.xml.bind.JAXBException
context - the contextschema - the schemajavax.xml.bind.JAXBException - the JAXB exceptionpublic static javax.xml.bind.Marshaller createValidatingMarshaller(javax.xml.bind.JAXBContext context,
javax.xml.validation.Schema schema)
throws javax.xml.bind.JAXBException
context - the contextschema - the schemajavax.xml.bind.JAXBException - the JAXB exceptionpublic static javax.xml.bind.ValidationEventHandler createValidationEventHandler()
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
context - the contextbundleId - the bundle idresourcePath - the resource pathjavax.xml.bind.JAXBException - the JAXB exceptionorg.xml.sax.SAXException - the SAX exceptionpublic 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
context - the contextbundleId - the bundle idresourcePath - the resource pathjavax.xml.bind.JAXBException - the JAXB exceptionorg.xml.sax.SAXException - the SAX exceptionpublic 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
bundleId - the bundle idcontextPackage - the context packageclassLoader - the class loaderschemaLocation - the schema locationinputStream - the input stream. It is closed.javax.xml.bind.JAXBException - the JAXB exceptionorg.xml.sax.SAXException - the SAX exceptionpublic 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
contextPackage - the context packageclassLoader - the class loaderschema - the schemainputStream - the input stream. It is closed.javax.xml.bind.JAXBException - the JAXB exceptionorg.xml.sax.SAXException - the SAX exceptionpublic 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
jaxbElement - the jaxb elementbundleId - the bundle idcontextPackage - the context packageclassLoader - the class loaderschemaPath - the schema pathoutputStream - the output streamjavax.xml.bind.JAXBException - the JAXB exceptionorg.xml.sax.SAXException - the SAX exceptionpublic 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
jaxbElement - the jaxb elementcontextPackage - the context packageclassLoader - the class loaderschema - the schemaoutputStream - the output streamjavax.xml.bind.JAXBException - the JAXB exceptionorg.xml.sax.SAXException - the SAX exception