protected MinLengthFacet(
      String nsUri, String typeName, XSDatatypeImpl baseType, int _minLength, boolean _isFixed)
      throws DatatypeException {
    super(nsUri, typeName, baseType, FACET_MINLENGTH, _isFixed);

    this.minLength = _minLength;

    // loosened facet check
    DataTypeWithFacet o = baseType.getFacetObject(FACET_MINLENGTH);
    if (o != null && ((MinLengthFacet) o).minLength > this.minLength)
      throw new DatatypeException(localize(ERR_LOOSENED_FACET, FACET_MINLENGTH, o.displayName()));

    // consistency with maxLength is checked in XSDatatypeImpl.derive method.
  }
Esempio n. 2
0
 public FinalComponent(XSDatatypeImpl baseType, int finalValue) {
   this(baseType.getNamespaceUri(), baseType.getName(), baseType, finalValue);
 }