Class LengthFacet

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

public class LengthFacet extends DataTypeWithValueConstraintFacet
"length", "minLength", and "maxLength" facet validator. this class also detects inconsistent facet setting (for example, minLength=100 and maxLength=0)
See Also:
  • Field Details

    • length

      public final int length
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
  • Constructor Details

    • LengthFacet

      protected LengthFacet(String nsUri, String typeName, XSDatatypeImpl baseType, TypeIncubator facets) throws org.relaxng.datatype.DatatypeException
      Throws:
      org.relaxng.datatype.DatatypeException
    • LengthFacet

      protected LengthFacet(String nsUri, String typeName, XSDatatypeImpl baseType, int _length, boolean _isFixed) throws org.relaxng.datatype.DatatypeException
      Throws:
      org.relaxng.datatype.DatatypeException
  • Method Details

    • _createValue

      public Object _createValue(String content, org.relaxng.datatype.ValidationContext context)
      Description copied from class: XSDatatypeImpl
      converts a whitespace-processed lexical value into the corresponding value object
      Specified by:
      _createValue in class XSDatatypeImpl
    • 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