Class DigitsFacet

java.lang.Object
com.saxonica.ee.schema.Facet
com.saxonica.ee.schema.DigitsFacet
Direct Known Subclasses:
FractionDigitsFacet, TotalDigitsFacet

public abstract class DigitsFacet extends Facet
Represents either of the facets totalDigits or fractionDigits
  • Constructor Details Link icon

    • DigitsFacet Link icon

      public DigitsFacet()
  • Method Details Link icon

    • setValue Link icon

      public abstract void setValue(String value) throws SchemaException
      Set the value of this facet as a string
      Parameters:
      value - the string value of the facet
      Throws:
      SchemaException - if the value is invalid
    • getValue Link icon

      public UnicodeString getValue()
      Get the value of this facet as a string
      Specified by:
      getValue in class Facet
      Returns:
      the value of this facet as a string
    • getNumericValue Link icon

      public int getNumericValue()
      Get the value of this facet as an integer (used for integer facets such as minLength or totalDigits)
      Returns:
      the value of the facet expressed as an integer
    • setNumericValue Link icon

      public void setNumericValue(int value)
      Set the value of this facet as an integer (used for integer facets such as minLength or totalDigits)
      Parameters:
      value - the value, as an integer
    • checkFacetRestriction Link icon

      public void checkFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler) throws SchemaException, ValidationException
      Check that this facet is legal when used on a type derived by restriction
      Overrides:
      checkFacetRestriction in class Facet
      Parameters:
      type - the type on which the facet is defined
      base - the type from which the restricted type is derived
      compiler - the schema compiler
      Throws:
      SchemaException - if the facet is not allowed for this simple type, or if the combination of facets is inconsistent with values defined on the base type.
      ValidationException - if a value is found that does not conform to the facet
    • testAtomicValue Link icon

      public boolean testAtomicValue(AtomicValue value)
      Test whether an atomic value conforms to this facet
      Specified by:
      testAtomicValue in class Facet
      Parameters:
      value - the value to be tested
      Returns:
      true if the value conforms; false if it doesn't conform
    • getFacetAsFunctionItem Link icon

      public FunctionItem getFacetAsFunctionItem()
      Description copied from class: Facet
      Get a function item that represents this Facet schema component.
      Specified by:
      getFacetAsFunctionItem in class Facet