public class EnumerationFacet extends Facet
EnumerationFacetSet
which
is a pseudo-facet used to perform the validation.Constructor and Description |
---|
EnumerationFacet() |
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.
|
java.lang.String |
getName()
Get the name of this facet
|
NamespaceResolver |
getNamespaceContext()
Get the namespace context of the value
|
AtomicSequence |
getTypedValue(SimpleType type,
ConversionRules rules)
Get the typed value of the enumeration value
|
java.lang.String |
getValue()
Returns the lexical representation of this facet
|
void |
setNamespaceContext(NamespaceResolver map)
Save the namespace context for this enumeration value.
|
void |
setValue(java.lang.String value)
Set the value of this facet
|
boolean |
testAtomicValue(AtomicValue value)
Test whether an atomic value conforms to this facet
|
getConstraintName, getMessage, getWhitespaceAction, isConstraining, isFacetName, isFixed, isNewlyIntroduced, makeFacet, serializeFacet, setFixed, setMessage, testLength, testListValue, toLong
public java.lang.String getName()
public java.lang.String getValue()
public NamespaceResolver getNamespaceContext()
public void setValue(java.lang.String value)
value
- the raw enumeration value as written in the schemapublic AtomicSequence getTypedValue(SimpleType type, ConversionRules rules) throws SchemaException, MissingComponentException
type
- the simple type containing this facetrules
- the conversion rules for the configurationSchemaException
- if the schema is invalidMissingComponentException
- if an unresolved reference to a schema component is encounteredpublic void checkFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler) throws SchemaException, MissingComponentException
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 value is not legal given the base typeMissingComponentException
public void setNamespaceContext(NamespaceResolver map)
map
- a NamespaceResolver mapping namespace prefixes (as strings) onto namespace URIs (as strings)public boolean testAtomicValue(AtomicValue value)
testAtomicValue
in class Facet
value
- the value to be testedpublic Function getFacetAsFunctionItem()
Facet
getFacetAsFunctionItem
in class Facet
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.