Package org.javastro.ivoa.entities
Class IvoaJAXBUtils
java.lang.Object
org.javastro.ivoa.entities.IvoaJAXBUtils
Some utilities to make working with JAXB marshalling easier. Sets up all of
the validation and namespaces etc.
- Since:
- VOTech Stage 7 TODO need to rationalize with @see org.javastro.ivoa.entities.jaxb.Utils
- Author:
- Paul Harrison (paul.harrison@manchester.ac.uk) 10 Jun 2008
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> SchemafindSchema(Class<T> clazz) static SchemafindSchema(String namespace) static Documentmarshall(jakarta.xml.bind.JAXBElement<?> element, Transformer stylesheet, Schema schema) static voidstatic <T> Tunmarshall(InputStream inputStream, Class<T> class1) static <T> Tunmarshall(Reader rd, Class<T> clazz) static <T> Tunmarshall(Reader r, Class<T> clazz, boolean validate) static <T> Tunmarshall(Node doc, Class<T> clazz, boolean validate)
-
Field Details
-
identityTransformer
-
-
Method Details
-
marshall
public static Document marshall(jakarta.xml.bind.JAXBElement<?> element, Transformer stylesheet, Schema schema) throws jakarta.xml.bind.JAXBException, TransformerException - Parameters:
element- the element to be marshalledstylesheet- a stylesheet to transform the element - may be identityschema- if non-null then this schema is used to validate- Returns:
- Throws:
jakarta.xml.bind.JAXBExceptionTransformerException
-
unmarshall
public static <T> T unmarshall(InputStream inputStream, Class<T> class1) throws jakarta.xml.bind.JAXBException, IOException, SAXException - Throws:
jakarta.xml.bind.JAXBExceptionIOExceptionSAXException
-
unmarshall
public static <T> T unmarshall(Reader rd, Class<T> clazz) throws jakarta.xml.bind.JAXBException, IOException, SAXException - Throws:
jakarta.xml.bind.JAXBExceptionIOExceptionSAXException
-
unmarshall
public static <T> T unmarshall(Node doc, Class<T> clazz, boolean validate) throws jakarta.xml.bind.JAXBException, IOException, SAXException - Throws:
jakarta.xml.bind.JAXBExceptionIOExceptionSAXException
-
unmarshall
public static <T> T unmarshall(Reader r, Class<T> clazz, boolean validate) throws jakarta.xml.bind.JAXBException, IOException, SAXException - Throws:
jakarta.xml.bind.JAXBExceptionIOExceptionSAXException
-
findSchema
-
findSchema
- Throws:
IOExceptionSAXException
-
printXML
-