Class XmlSchemaRestriction

java.lang.Object
org.apache.ws.commons.schema.walker.XmlSchemaRestriction

public class XmlSchemaRestriction extends Object
This represents an XmlSchemaFacet. It uses an enum to more easily work with different facets, and its equals(Object) and hashCode() reflect that only enumerations and patterns can have multiple constraints.
  • Field Details

  • Constructor Details

  • Method Details

    • getType

      public XmlSchemaRestriction.Type getType()
      The constraining facet's XmlSchemaRestriction.Type.
    • getValue

      public Object getValue()
      The facet's constraint value.
    • isFixed

      public boolean isFixed()
      Whether the constraint value may be overridden in child definitions ( true means it cannot).
    • setValue

      public void setValue(Object value)
      Sets the constraint value.
    • setFixed

      public void setFixed(boolean isFixed)
      Sets whether the constraint value may be overridden in child definitions (true means that it cannot).
    • hashCode

      public int hashCode()
      Generates a hash code based on the contents. If the type is an enumeration, then the isFixed and value elements are used in calculating the hash code. All of the other Restrictions are considered to be the same.
      Overrides:
      hashCode in class Object
      See Also:
    • equals

      public boolean equals(Object obj)
      Determines equality. If the type is an enumeration, then the isFixed and value elements are used determining equality. All of the other Restrictions are considered to be equal to each other.
      Overrides:
      equals in class Object
      See Also:
    • toString

      public String toString()
      Returns a String representation of this facet.
      Overrides:
      toString in class Object