|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.sf.saxon.type.SchemaType
|
+--net.sf.saxon.type.SimpleType
This class represents a simple type, as defined in the XML Schema specification. This may be an atomic type, a list type, or a union type. In the non-schema-aware version of Saxon, the simple type will always be a built-in type. With the schema-aware product, it may also be a user-defined simple type.
| Field Summary |
| Fields inherited from class net.sf.saxon.type.SchemaType |
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION, finalProhibitions, INVALID, UNVALIDATED, VALIDATED, VALIDATING, validationPhase |
| Constructor Summary | |
SimpleType()
|
|
| Method Summary | |
java.lang.CharSequence |
applyWhitespaceNormalization(java.lang.CharSequence value)
Apply the whitespace normalization rules for this simple type |
SimpleType |
getBuiltInBaseType()
Returns the built-in base type this type is derived from. |
Facet |
getFacet(java.lang.String name)
Returns the first facet associated with the given name, defined either on this type or on a type from which it is derived |
FacetCollection |
getFacetCollection()
Get the FacetCollection for this simple type |
java.util.Iterator |
getFacets()
Returns an Iterator over all the Facets (including inherited facets) for this type. |
java.util.Iterator |
getFacets(java.lang.String name)
Return all the facets having the given name |
abstract SequenceIterator |
getTypedValue(java.lang.CharSequence value,
NamespaceResolver resolver)
Get the typed value corresponding to a given string value, assuming it is valid against this type |
SequenceIterator |
getTypedValue(NodeInfo node)
Get the typed value of a node that is annotated with this schema type |
int |
getWhitespaceAction()
Determine the whitespace normalization required for values of this type |
boolean |
isListType()
Returns true if this type is derived by list, or if it is derived by restriction from a list type, or if it is a union that contains a list as one of its members |
boolean |
isNamespaceSensitive()
Test whether this simple type is namespace-sensitive, that is, whether it is derived from xs:QName or xs:NOTATION |
boolean |
isSimpleType()
Returns true if this SchemaType is a SimpleType |
java.lang.String |
isTypeDerivationOK(SimpleType b,
int derivation)
Check whether type derivation is allowed. |
boolean |
isUnionType()
Return true if this type is a union type (that is, if its variety is union) |
java.util.Iterator |
iterateMemberTypes()
Returns an Iterator over all the SimpleTypes that are members of a union type. |
void |
setFacetCollection(FacetCollection facets)
Set the FacetCollection for this simple type. |
boolean |
validate(SchemaMarker schema)
Checks the validity of this SimpleType definition. |
abstract void |
validateContent(java.lang.CharSequence value,
NamespaceResolver nsResolver)
Check whether a given input string is valid according to this SimpleType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleType()
| Method Detail |
public final boolean isSimpleType()
isSimpleType in class SchemaTypepublic boolean isListType()
public boolean isUnionType()
public java.util.Iterator iterateMemberTypes()
public void setFacetCollection(FacetCollection facets)
facets - the collection of facets for this type.public FacetCollection getFacetCollection()
public Facet getFacet(java.lang.String name)
public java.util.Iterator getFacets(java.lang.String name)
public java.util.Iterator getFacets()
public int getWhitespaceAction()
public java.lang.CharSequence applyWhitespaceNormalization(java.lang.CharSequence value)
value - the string before whitespace normalization
public SimpleType getBuiltInBaseType()
public boolean isNamespaceSensitive()
public java.lang.String isTypeDerivationOK(SimpleType b,
int derivation)
b - the base typederivation - the disallowed derivations, as a bit-significant integer
public boolean validate(SchemaMarker schema)
throws SchemaException
schema - a Schema used for error reporting
SchemaException - if this SimpleType definition is invalid.
public abstract void validateContent(java.lang.CharSequence value,
NamespaceResolver nsResolver)
throws ValidationException
value - the input string to be checkednsResolver - a namespace resolver used to resolve namespace prefixes if the type
is namespace sensitive. The value supplied may be null; in this case any namespace-sensitive
content will throw an UnsupportedOperationException.
ValidationException - if the content is invalid
java.lang.UnsupportedOperationException - if the type is namespace-sensitive and no namespace
resolver is supplied
public final SequenceIterator getTypedValue(NodeInfo node)
throws XPathException
getTypedValue in class SchemaTypenode - the node whose typed value is required
AtomicValue
XPathException
public abstract SequenceIterator getTypedValue(java.lang.CharSequence value,
NamespaceResolver resolver)
throws ValidationException
value - the string valueresolver - a namespace resolver used to resolve any namespace prefixes appearing
in the content of values. Can supply null, in which case any namespace-sensitive content
will be rejected.
AtomicValue
ValidationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||