@NotThreadSafe public class JAXBDocumentType extends Object implements IJAXBDocumentType
IJAXBDocumentType. It is not
thread-safe because of the lazily loaded Schema.| Modifier and Type | Field and Description |
|---|---|
static String |
JAXB_DEFAULT |
| Constructor and Description |
|---|
JAXBDocumentType(Class<?> aClass,
List<? extends com.helger.commons.io.resource.ClassPathResource> aXSDs,
Function<? super String,? extends String> aTypeToElementNameMapper)
Constructor
|
JAXBDocumentType(Class<?> aClass,
List<? extends com.helger.commons.io.resource.ClassPathResource> aXSDs,
String sNamespaceURI,
String sLocalName)
Simple constructor when you know what you are doing.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
com.helger.commons.collection.impl.ICommonsList<com.helger.commons.io.resource.ClassPathResource> |
getAllXSDResources() |
Class<?> |
getImplementationClass() |
String |
getLocalName() |
String |
getNamespaceURI() |
Schema |
getSchema() |
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetValidator, getValidator, validateXMLpublic static final String JAXB_DEFAULT
public JAXBDocumentType(@Nonnull Class<?> aClass, @Nullable List<? extends com.helger.commons.io.resource.ClassPathResource> aXSDs, @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!aXSDs - 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.public JAXBDocumentType(@Nonnull Class<?> aClass, @Nullable List<? extends com.helger.commons.io.resource.ClassPathResource> aXSDs, @Nullable String sNamespaceURI, @Nonnull @Nonempty String sLocalName)
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!aXSDs - 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!sNamespaceURI - The namespace URI to use. May be null.sLocalName - The locale name of the element. May neither be null nor
empty.@Nonnull public Class<?> getImplementationClass()
getImplementationClass in interface IJAXBDocumentTypenull.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<com.helger.commons.io.resource.ClassPathResource> getAllXSDResources()
getAllXSDResources 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@Nullable public Schema getSchema()
getSchema in interface IJAXBDocumentTypeSchema object.Copyright © 2015–2021 Philip Helger. All rights reserved.