public class EnumerationFacetSet extends Facet
Constructor and Description |
---|
EnumerationFacetSet() |
Modifier and Type | Method and Description |
---|---|
void |
addEnumerationValue(AtomicSequence val,
String stringValue)
Add a permitted value to the set of enumeration values.
|
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()
The name of this facet.
|
String |
getSharedInstance(String value)
Get an instance of the facet value that is stored in the schema rather than the instance
|
String |
getValue()
Get a string representation of the value of the facet
|
void |
serializeFacet(SchemaModelSerializer serializer)
Serialize this facet
|
boolean |
testAtomicValue(AtomicValue value)
Test whether an atomic value conforms to this facet
|
boolean |
testListValue(AtomicSequence value)
Test whether a list value conforms to this facet.
|
getMessage, getWhitespaceAction, isConstraining, isFacetName, isFixed, isNewlyIntroduced, makeFacet, setFixed, setMessage, testLength, toLong
public String getName()
public void addEnumerationValue(AtomicSequence val, String stringValue)
val
- the value to be added. This must be an atomic value or a sequence of atomic values.stringValue
- the string value of the facet as writtenpublic String getValue()
public void checkFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler) throws SchemaException
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 legalpublic boolean testAtomicValue(AtomicValue value)
testAtomicValue
in class Facet
value
- the value to be testedpublic boolean testListValue(AtomicSequence value)
testListValue
in class Facet
value
- the value to be testedpublic String getSharedInstance(String value)
value
- the value requiredpublic void serializeFacet(SchemaModelSerializer serializer) throws XPathException
serializeFacet
in class Facet
serializer
- receives the content for serializationXPathException
- if an error occurs writing the value to the outputpublic FunctionItem getFacetAsFunctionItem()
Facet
getFacetAsFunctionItem
in class Facet
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.