org.apache.openejb.jee
Class JaxbJavaee
java.lang.Object
org.apache.openejb.jee.JaxbJavaee
public class JaxbJavaee
- extends Object
- Version:
- $Rev: 1160123 $ $Date: 2011-08-22 06:40:16 +0000 (Mon, 22 Aug 2011) $
|
Method Summary |
static
|
marshal(Class<T> type,
Object object)
|
static
|
marshal(Class<T> type,
Object object,
OutputStream out)
|
static
|
unmarshal(Class<T> type,
InputStream in,
boolean validate)
Read in a T from the input stream. |
static
|
unmarshalHandlerChains(Class<T> type,
InputStream in)
|
static
|
unmarshalJavaee(Class<T> type,
InputStream in)
Convert the namespaceURI in the input to the javaee URI, do not validate the xml, and read in a T. |
static
|
unmarshalTaglib(Class<T> type,
InputStream in)
Convert the namespaceURI in the input to the taglib URI, do not validate the xml, and read in a T. |
static void |
validateJavaee(JavaeeSchema type,
InputStream in)
validate the inputStream, which should be a Java EE standard deployment descriptor against its schema type
Note, this method will use the new Java EE 6 schema to validate the old descriptors after changing their namespace and version. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentPublicId
public static final ThreadLocal<Set<String>> currentPublicId
JaxbJavaee
public JaxbJavaee()
marshal
public static <T> String marshal(Class<T> type,
Object object)
throws JAXBException
- Throws:
JAXBException
marshal
public static <T> void marshal(Class<T> type,
Object object,
OutputStream out)
throws JAXBException
- Throws:
JAXBException
unmarshalJavaee
public static <T> Object unmarshalJavaee(Class<T> type,
InputStream in)
throws ParserConfigurationException,
SAXException,
JAXBException
- Convert the namespaceURI in the input to the javaee URI, do not validate the xml, and read in a T.
- Type Parameters:
T - class of object to be returned- Parameters:
type - Class of object to be read inin - input stream to read
- Returns:
- a T read from the input stream
- Throws:
ParserConfigurationException - is the SAX parser can not be configured
SAXException - if there is an xml problem
JAXBException - if the xml cannot be marshalled into a T.
unmarshal
public static <T> Object unmarshal(Class<T> type,
InputStream in,
boolean validate)
throws ParserConfigurationException,
SAXException,
JAXBException
- Read in a T from the input stream.
- Type Parameters:
T - class of object to be returned- Parameters:
type - Class of object to be read inin - input stream to readvalidate - whether to validate the input.
- Returns:
- a T read from the input stream
- Throws:
ParserConfigurationException - is the SAX parser can not be configured
SAXException - if there is an xml problem
JAXBException - if the xml cannot be marshalled into a T.
unmarshalTaglib
public static <T> Object unmarshalTaglib(Class<T> type,
InputStream in)
throws ParserConfigurationException,
SAXException,
JAXBException
- Convert the namespaceURI in the input to the taglib URI, do not validate the xml, and read in a T.
- Type Parameters:
T - class of object to be returned- Parameters:
type - Class of object to be read inin - input stream to read
- Returns:
- a T read from the input stream
- Throws:
ParserConfigurationException - is the SAX parser can not be configured
SAXException - if there is an xml problem
JAXBException - if the xml cannot be marshalled into a T.
unmarshalHandlerChains
public static <T> Object unmarshalHandlerChains(Class<T> type,
InputStream in)
throws ParserConfigurationException,
SAXException,
JAXBException
- Type Parameters:
T - class of object to be returned- Parameters:
type - Class of object to be read inin - input stream to read
- Returns:
- a T read from the input stream
- Throws:
ParserConfigurationException - is the SAX parser can not be configured
SAXException - if there is an xml problem
JAXBException - if the xml cannot be marshalled into a T.
validateJavaee
public static void validateJavaee(JavaeeSchema type,
InputStream in)
throws ParserConfigurationException,
SAXException,
IOException
- validate the inputStream, which should be a Java EE standard deployment descriptor against its schema type
Note, this method will use the new Java EE 6 schema to validate the old descriptors after changing their namespace and version.
- Parameters:
type - in -
- Throws:
ParserConfigurationException
SAXException
IOException
Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.