public class EnumerationFacetSet extends Facet
Constructor and Description |
---|
EnumerationFacetSet() |
Modifier and Type | Method and Description |
---|---|
void |
addEnumerationValue(AtomicSequence val,
java.lang.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
|
Function |
getFacetAsFunctionItem()
Get a function item that represents this Facet schema component.
|
java.lang.String |
getName()
The name of this facet.
|
AtomicSequence |
getSharedInstance(AtomicSequence value)
Get an instance of the facet value that is stored in the schema rather than the instance
|
java.lang.String |
getSharedInstance(java.lang.String value)
Get an instance of the facet value that is stored in the schema rather than the instance
|
java.util.List<java.lang.String> |
getStringValues()
Get the enumeration values, as strings
|
java.lang.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 java.lang.String getName()
public java.util.List<java.lang.String> getStringValues()
public void addEnumerationValue(AtomicSequence val, java.lang.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 java.lang.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 java.lang.String getSharedInstance(java.lang.String value)
value
- the value requiredpublic AtomicSequence getSharedInstance(AtomicSequence 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 Function getFacetAsFunctionItem()
Facet
getFacetAsFunctionItem
in class Facet
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.