Class SchemaModule<T>


  • public class SchemaModule<T>
    extends java.lang.Object
    Represents a versioned set of generated classes corresponding to a versioned XML schema. This can be a single stand-alone schema, or an extension to an existing schema. For example, repo-common-N.xsd defines a schema for a repository with packages, and the collection of the schemas for all N would be represented by a single SchemaModule instance. They can then be used for marshalling or unmarshalling XML documents by the repository framework.
    • Constructor Detail

      • SchemaModule

        public SchemaModule​(@NonNull
                            java.lang.String ofPattern,
                            @NonNull
                            java.lang.String xsdPattern,
                            @NonNull
                            java.lang.Class<?> resourceRoot)
        Parameters:
        ofPattern - Fully-qualified class name of the JAXB ObjectFactory classes making up this module. Should have a single %d parameter, corresponding to the 1-indexed version of the schema.
        xsdPattern - Filename pattern of the XSDs making up this module. Should have a single %d parameter, corresponding to the 1-indexed version of the schema.
        resourceRoot - A class instance used via Class.getResource(String) to read the XSD file.
    • Method Detail

      • createLatestFactory

        @NonNull
        public T createLatestFactory()
        Creates an ObjectFactory for the latest known version of this module.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getNamespacePrefix

        @NonNull
        public java.lang.String getNamespacePrefix()
        Gets the namespace prefix (the namespace with the final number (if any) removed) for our latest schema version.
      • getLatestNamespace

        public java.lang.String getLatestNamespace()
        Gets the namespace of the our latest schema version.