@NotThreadSafe public class JAXBDocumentType extends Object implements IJAXBDocumentType
IJAXBDocumentType. It is not
thread-safe because of the lazily loaded Schema.| Constructor and Description |
|---|
JAXBDocumentType(Class<?> aClass,
List<String> aXSDPaths,
Function<? super String,? extends String> aTypeToElementNameMapper)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected Schema |
createSchema(ClassLoader aClassLoader)
Create the schema.
|
boolean |
equals(Object o) |
com.helger.commons.collection.impl.ICommonsList<String> |
getAllXSDPaths() |
Class<?> |
getImplementationClass() |
String |
getLocalName() |
String |
getNamespaceURI() |
Schema |
getSchema(ClassLoader aClassLoader) |
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAllXSDResources, getAllXSDResources, getValidator, getValidator, getValidator, validateXML, validateXMLpublic JAXBDocumentType(@Nonnull Class<?> aClass, @Nullable List<String> aXSDPaths, @Nullable Function<? super String,? extends String> aTypeToElementNameMapper)
aClass - The JAXB generated class of the root element. May not be
null. This class must have the @XmlType
annotation and the package the class resides in must have the
@XmlSchema annotation with a non-null
namespace property!aXSDPaths - The classpath relative paths to the XML Schema. May not be
null but maybe empty. If the main XSD imports another
XSD, the imported XSD must come first in the list. So the XSDs
without any dependencies must come first!aTypeToElementNameMapper - An optional function to determine element name from type name. E.g.
in UBL the type has an additional "Type" at the end that may not
occur here. SBDH in contrary does not have such a suffix. May be
null indicating that no name mapping is necessary.@Nonnull public Class<?> getImplementationClass()
getImplementationClass in interface IJAXBDocumentTypenull.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<String> getAllXSDPaths()
getAllXSDPaths in interface IJAXBDocumentTypenull but maybe empty.@Nonnull public String getNamespaceURI()
getNamespaceURI in interface IJAXBDocumentTypenull XML namespace of this JAXB document type.
If the element has no namespace this method must also return the
empty string.@Nonnull @Nonempty public String getLocalName()
getLocalName in interface IJAXBDocumentType@Nonnull protected Schema createSchema(@Nullable ClassLoader aClassLoader)
aClassLoader - Optional class loader to use. May be null.null Schema instance.@Nullable public Schema getSchema(@Nullable ClassLoader aClassLoader)
getSchema in interface IJAXBDocumentTypegetSchema in interface com.helger.xml.schema.IHasSchemaaClassLoader - The class loader to be used. May be null indicating
that the default class loader should be used.Schema object retrieved by the
XMLSchemaCache. May be
null if no XSD was provided.Copyright © 2015–2018 Philip Helger. All rights reserved.