|
|||||||||
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.EnumerationFacet
public class EnumerationFacet
Represents a single enumeration facet defined on a simple type. Note that unlike other
facets, a value cannot be validated against a single enumeration facet; for this reason
all the individual enumeration facets are assembled into an EnumerationFacetSet
which
is a pseudo-facet used to perform the validation.
Constructor Summary | |
---|---|
EnumerationFacet()
|
Method Summary | |
---|---|
void |
checkFacetRestriction(UserSimpleType type,
SimpleType base,
SchemaCompiler compiler)
Check that this facet is legal when used on a type derived by restriction |
String |
getName()
Get the name of this facet |
NamespaceResolver |
getNamespaceContext()
Get the namespace context of the value |
Value |
getTypedValue(SimpleType type,
Configuration config)
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 |
Methods inherited from class com.saxonica.schema.Facet |
---|
getMessage, getWhitespaceAction, isConstraining, isFacetName, isFixed, isNewlyIntroduced, makeFacet, serializeFacet, setFixed, setMessage, testLength, testListValue, toLong |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnumerationFacet()
Method Detail |
---|
public String getName()
getName
in class Facet
public String getValue()
getValue
in class Facet
public NamespaceResolver getNamespaceContext()
public void setValue(String value)
value
- the raw enumeration value as written in the schemapublic Value getTypedValue(SimpleType type, Configuration config) throws SchemaException, UnresolvedReferenceException
type
- the simple type containing this facet
SchemaException
UnresolvedReferenceException
public 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
- type
- the type on which the facet is defined
SchemaException
- if the facet value is not legal given the base type
UnresolvedReferenceException
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 tested
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |