Class JXESchemaDefinition

  • All Implemented Interfaces:
    JXESchemaDefinitionType

    public final class JXESchemaDefinition
    extends java.lang.Object
    implements JXESchemaDefinitionType
    The type of schema definitions. A schema definition is typically used with a JXEHardenedDispatchingResolver to resolve schemas from internal Java resources. When an XML parser is required to locate the XSD schema for a namespace n, it consults the map of schema definitions and, if a schema exists with the given namespace URI, passes the fileIdentifier() to the dispatching resolver which then uses that identifier to open location().
    • Method Detail

      • withNamespace

        public final JXESchemaDefinition withNamespace​(java.net.URI value)
        Copy the current immutable object by setting a value for the namespace attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for namespace
        Returns:
        A modified copy of the this object
      • withFileIdentifier

        public final JXESchemaDefinition withFileIdentifier​(java.lang.String value)
        Copy the current immutable object by setting a value for the fileIdentifier attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for fileIdentifier
        Returns:
        A modified copy of the this object
      • withLocation

        public final JXESchemaDefinition withLocation​(java.net.URL value)
        Copy the current immutable object by setting a value for the location attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for location
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(java.lang.Object another)
        This instance is equal to all instances of JXESchemaDefinition that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: namespace, fileIdentifier.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value JXESchemaDefinition with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • of

        public static JXESchemaDefinition of​(java.net.URI namespace,
                                             java.lang.String fileIdentifier,
                                             java.net.URL location)
        Construct a new immutable JXESchemaDefinition instance.
        Parameters:
        namespace - The value for the namespace attribute
        fileIdentifier - The value for the fileIdentifier attribute
        location - The value for the location attribute
        Returns:
        An immutable JXESchemaDefinition instance
      • copyOf

        public static JXESchemaDefinition copyOf​(JXESchemaDefinitionType instance)
        Creates an immutable copy of a JXESchemaDefinitionType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable JXESchemaDefinition instance