Package org.opencastproject.util
Class JaxbXmlSchemaGenerator
java.lang.Object
org.opencastproject.util.JaxbXmlSchemaGenerator
Provides utility methods for transforming a
JAXBContext into an XML schema.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetXmlSchema(Class<?> clazz) Builds an xml schema.static StringgetXmlSchema(javax.xml.bind.JAXBContext jaxbContext) Builds an xml schema from a JAXBContext.
-
Method Details
-
getXmlSchema
Builds an xml schema from a JAXBContext.- Parameters:
jaxbContext- the jaxb context- Returns:
- the xml as a string
- Throws:
IOException- if the JAXBContext can not be transformed into an xml schema
-
getXmlSchema
Builds an xml schema. If the class is not XmlType or XmlRootElement annotated, return null;- Parameters:
clazz- the jaxb annotated class- Returns:
- the xml as a string, or null if the class can not be transformed to a schema
-