public abstract class DigitsFacet extends Facet
Constructor and Description |
---|
DigitsFacet() |
Modifier and Type | Method and Description |
---|---|
void |
checkFacetRestriction(UserSimpleType type,
SimpleType base,
SchemaCompiler compiler)
Check that this facet is legal when used on a type derived by restriction
|
Function |
getFacetAsFunctionItem()
Get a function item that represents this Facet schema component.
|
int |
getNumericValue()
Get the value of this facet as an integer (used for integer facets such as minLength or totalDigits)
|
java.lang.String |
getValue()
Get the value of this facet as a string
|
void |
setNumericValue(int value)
Set the value of this facet as an integer (used for integer facets such as minLength or totalDigits)
|
abstract void |
setValue(java.lang.String value)
Set the value of this facet as a string
|
boolean |
testAtomicValue(AtomicValue value)
Test whether an atomic value conforms to this facet
|
getMessage, getName, getWhitespaceAction, isConstraining, isFacetName, isFixed, isNewlyIntroduced, makeFacet, serializeFacet, setFixed, setMessage, testLength, testListValue, toLong
public abstract void setValue(java.lang.String value) throws SchemaException
value
- the string value of the facetSchemaException
- if the value is invalidpublic java.lang.String getValue()
public int getNumericValue()
public void setNumericValue(int value)
value
- the value, as an integerpublic void checkFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler) throws SchemaException, ValidationException
checkFacetRestriction
in class Facet
base
- the type from which the restricted type is derivedcompiler
- the schema compilertype
- the type on which the facet is definedSchemaException
- 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 facetpublic boolean testAtomicValue(AtomicValue value)
testAtomicValue
in class Facet
value
- the value to be testedpublic Function getFacetAsFunctionItem()
Facet
getFacetAsFunctionItem
in class Facet
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.