Package com.saxonica.ee.schema
Class LengthFacet
- java.lang.Object
-
- com.saxonica.ee.schema.Facet
-
- com.saxonica.ee.schema.LengthRangeFacet
-
- com.saxonica.ee.schema.LengthFacet
-
public class LengthFacet extends LengthRangeFacet
Represents the length facet
-
-
Constructor Summary
Constructors Constructor Description LengthFacet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler)Check that this facet is legal when used on a type derived by restrictionjava.lang.StringgetName()Returns the name of this FacetbooleantestLength(int actualLength)Test whether a supplied length conforms to this required length.-
Methods inherited from class com.saxonica.ee.schema.LengthRangeFacet
getFacetAsFunctionItem, getValue, setNumericValue, setValue, testAtomicValue, toLong
-
Methods inherited from class com.saxonica.ee.schema.Facet
getConstraintName, getMessage, getWhitespaceAction, isConstraining, isFacetName, isFixed, isNewlyIntroduced, makeFacet, serializeFacet, setFixed, setMessage, testListValue
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:FacetReturns the name of this Facet
-
checkFacetRestriction
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:
checkFacetRestrictionin classFacet- Parameters:
base- the type from which the restricted type is derivedcompiler- the schema compilertype- the type on which the facet is defined- Throws:
SchemaException- if the facet is not legalValidationException- if a value is found that does not conform to the facet
-
testLength
public boolean testLength(int actualLength)
Test whether a supplied length conforms to this required length.- Specified by:
testLengthin classLengthRangeFacet- Parameters:
actualLength- the actual length of the list- Returns:
- true if the facet allows a list of this length, otherwise false
-
-