|
||||||||||
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 |
ALL_DERIVATIONS, DERIVE_BY_EXTENSION, DERIVE_BY_LIST, DERIVE_BY_RESTRICTION, DERIVE_BY_SUBSTITUTION, DERIVE_BY_UNION, 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,
NodeInfo node)
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 SchemaType
public 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 javax.xml.transform.TransformerException
schema
- a Schema used for error reporting
javax.xml.transform.TransformerException
- 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 suppliedpublic final SequenceIterator getTypedValue(NodeInfo node) throws XPathException
getTypedValue
in class SchemaType
node
- the node whose typed value is required
AtomicValue
XPathException
public abstract SequenceIterator getTypedValue(java.lang.CharSequence value, NodeInfo node) throws ValidationException
value
- the string valuenode
- the containing node: used only to resolve namespace prefixes in QName-valued content
AtomicValue
ValidationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |