Class TotalDigitsFacet

All Implemented Interfaces:
DatabindableDatatype, XSDatatype, Serializable, org.relaxng.datatype.Datatype

public class TotalDigitsFacet extends DataTypeWithLexicalConstraintFacet
'totalDigits' facet. this class holds these facet information and performs validation.
See Also:
  • Field Details

    • precision

      public final int precision
      maximum number of total digits.
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
  • Constructor Details

    • TotalDigitsFacet

      public TotalDigitsFacet(String nsUri, String typeName, XSDatatypeImpl baseType, int _precision, boolean _isFixed) throws org.relaxng.datatype.DatatypeException
      Throws:
      org.relaxng.datatype.DatatypeException
  • Method Details

    • checkLexicalConstraint

      protected boolean checkLexicalConstraint(String content)
      Specified by:
      checkLexicalConstraint in class DataTypeWithLexicalConstraintFacet
    • diagnoseByFacet

      protected void diagnoseByFacet(String content, org.relaxng.datatype.ValidationContext context) throws org.relaxng.datatype.DatatypeException
      Specified by:
      diagnoseByFacet in class DataTypeWithFacet
      Throws:
      org.relaxng.datatype.DatatypeException
    • countPrecision

      protected static int countPrecision(String literal)
      counts the number of digits