Class JAXBDocumentType

java.lang.Object
com.helger.jaxb.builder.JAXBDocumentType
All Implemented Interfaces:
IJAXBDocumentType

@NotThreadSafe @Deprecated(forRemoval=true, since="11.0.3") public class JAXBDocumentType extends Object implements IJAXBDocumentType
Deprecated, for removal: This API element is subject to removal in a future version.
Stand alone implementation of IJAXBDocumentType. It is not thread-safe because of the lazily loaded Schema.
Author:
Philip Helger
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    JAXBDocumentType(Class<?> aClass, List<? extends com.helger.commons.io.resource.ClassPathResource> aXSDs, String sNamespaceURI, String sLocalName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Simple constructor when you know what you are doing.
    JAXBDocumentType(Class<?> aClass, List<? extends com.helger.commons.io.resource.ClassPathResource> aXSDs, Function<? super String,? extends String> aTypeToElementNameMapper)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final com.helger.commons.collection.impl.ICommonsList<com.helger.commons.io.resource.ClassPathResource>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final Class<?>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final Supplier<com.helger.xml.schema.XMLSchemaCache>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    setXMLSchemaCacheProvider(Supplier<com.helger.xml.schema.XMLSchemaCache> aXMLSchemaCacheProvider)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.helger.jaxb.builder.IJAXBDocumentType

    getValidator, getValidator, validateXML
  • Field Details

    • JAXB_DEFAULT

      public static final String JAXB_DEFAULT
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details

    • JAXBDocumentType

      public JAXBDocumentType(@Nonnull Class<?> aClass, @Nullable List<? extends com.helger.commons.io.resource.ClassPathResource> aXSDs, @Nullable Function<? super String,? extends String> aTypeToElementNameMapper)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor
      Parameters:
      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.
    • JAXBDocumentType

      public JAXBDocumentType(@Nonnull Class<?> aClass, @Nullable List<? extends com.helger.commons.io.resource.ClassPathResource> aXSDs, @Nullable String sNamespaceURI, @Nonnull @Nonempty String sLocalName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Simple constructor when you know what you are doing.
      Parameters:
      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.
      Since:
      9.4.0
  • Method Details

    • getImplementationClass

      @Nonnull public final Class<?> getImplementationClass()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getImplementationClass in interface IJAXBDocumentType
      Returns:
      The class implementing this document type. Never null.
    • getAllXSDResources

      @Nonnull @ReturnsMutableCopy public final com.helger.commons.collection.impl.ICommonsList<com.helger.commons.io.resource.ClassPathResource> getAllXSDResources()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getAllXSDResources in interface IJAXBDocumentType
      Returns:
      The list of all paths within the classpath where the main XSD file resides. Never null but maybe empty.
    • getXMLSchemaCacheProvider

      @Nonnull public final Supplier<com.helger.xml.schema.XMLSchemaCache> getXMLSchemaCacheProvider()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setXMLSchemaCacheProvider

      @Nonnull public final JAXBDocumentType setXMLSchemaCacheProvider(@Nonnull Supplier<com.helger.xml.schema.XMLSchemaCache> aXMLSchemaCacheProvider)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getNamespaceURI

      @Nonnull public final String getNamespaceURI()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getNamespaceURI in interface IJAXBDocumentType
      Returns:
      The non-null XML namespace of this JAXB document type. If the element has no namespace this method must also return the empty string.
    • getLocalName

      @Nonnull @Nonempty public final String getLocalName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getLocalName in interface IJAXBDocumentType
      Returns:
      The local name of the root element of an XML document of this type. Corresponds to the name of the implementation class (without a package).
    • getSchema

      @Nullable public Schema getSchema()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getSchema in interface IJAXBDocumentType
      Returns:
      The compiled Schema object.
    • equals

      public boolean equals(Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object