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
|
FunctionItem |
getFacetAsFunctionItem()
Get a function item that represents this Facet schema component.
|
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
|
String |
getValue()
Returns the lexical representation of this facet
|
void |
setNamespaceContext(NamespaceResolver map)
Save the namespace context for this enumeration value.
|
void |
setValue(String value)
Set the value of this facet
|
boolean |
testAtomicValue(AtomicValue value)
Test whether an atomic value conforms to this facet
|
getMessage, getWhitespaceAction, isConstraining, isFacetName, isFixed, isNewlyIntroduced, makeFacet, serializeFacet, setFixed, setMessage, testLength, testListValue, toLong
public String getName()
public String getValue()
public NamespaceResolver getNamespaceContext()
public void setValue(String value)
value
- the raw enumeration value as written in the schemapublic AtomicSequence getTypedValue(SimpleType type, ConversionRules rules) throws SchemaException, UnresolvedReferenceException
type
- the simple type containing this facetrules
- the conversion rules for the configurationSchemaException
- if the schema is invalidUnresolvedReferenceException
- if an unresolved reference to a schema component is encounteredpublic void checkFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler) throws SchemaException, UnresolvedReferenceException
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 typeUnresolvedReferenceException
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 FunctionItem getFacetAsFunctionItem()
Facet
getFacetAsFunctionItem
in class Facet
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.