|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.schema.Facet com.saxonica.schema.DigitsFacet
public class DigitsFacet
Represents either of the facets totalDigits or fractionDigits
Field Summary | |
---|---|
static int |
FRACTION_DIGITS
Constant identifying the fractionDigits facet |
static int |
TOTAL_DIGITS
Constant identifying the totalDigits facet |
Fields inherited from class com.saxonica.schema.Facet |
---|
ENUMERATION, FRACTIONDIGITS, LENGTH, MAX_EXCLUSIVE, MAX_INCLUSIVE, MAX_LENGTH, MIN_EXCLUSIVE, MIN_INCLUSIVE, MIN_LENGTH, PATTERN, TOTALDIGITS, WHITESPACE |
Constructor Summary | |
---|---|
DigitsFacet(int facetType)
Construct a totalDigits or fractionDigits facet. |
Method Summary | |
---|---|
void |
checkFacetRestriction(UserSimpleType type,
SimpleType base)
Check that this facet is legal when used on a type derived by restriction |
String |
getName()
Get the name of this facet |
String |
getValue()
Get the value of this facet as a string |
void |
setValue(String value)
Set the value of this facet. |
boolean |
testAtomicValue(AtomicValue value)
Test whether an atomic value conforms to this facet |
Methods inherited from class com.saxonica.schema.Facet |
---|
appliesToWholeList, getWhitespaceAction, isFacetName, isFixed, isNewlyIntroduced, makeFacet, serializeFacet, setFixed, testLength, toLong |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TOTAL_DIGITS
public static final int FRACTION_DIGITS
Constructor Detail |
---|
public DigitsFacet(int facetType)
facetType
- indicates which facet to construct. One of TOTAL_DIGITS
or
FRACTION_DIGITS
Method Detail |
---|
public String getName()
getName
in class Facet
public String getValue()
getValue
in class Facet
public void setValue(String value) throws SchemaException
setValue
in class Facet
value
- the value of the facet. This must be a string that parses as an integer.
SchemaException
- if the value is invalid (not an integer)public void checkFacetRestriction(UserSimpleType type, SimpleType base) throws SchemaException, ValidationException
checkFacetRestriction
in class Facet
base
- the type from which the restricted type is derivedtype
- the type on which the facet is defined
SchemaException
- 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
public boolean testAtomicValue(AtomicValue value)
testAtomicValue
in class Facet
value
- the value to be tested
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |