|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectcom.saxonica.schema.SchemaStructure
com.saxonica.schema.SchemaTypeImpl
com.saxonica.schema.UserSimpleType
com.saxonica.schema.UserUnionType
public class UserUnionType
A class that represents the XML Schema Union simple-type.
| Field Summary |
|---|
| Fields inherited from interface net.sf.saxon.type.SchemaType |
|---|
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION |
| Fields inherited from interface net.sf.saxon.type.SchemaComponent |
|---|
FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING |
| Fields inherited from interface com.saxonica.schema.SerializableSchemaComponent |
|---|
ALL_COMPOSITOR, ATOMIC_TYPE, ATTRIBUTE_DECL, ATTRIBUTE_GROUP, ATTRIBUTE_GROUP_REF, ATTRIBUTE_USE, ATTRIBUTE_WILDCARD, CHOICE_COMPOSITOR, COMPLEX_TYPE, ELEMENT_DECL, ELEMENT_PARTICLE, ELEMENT_WILDCARD, FACET, KEY, KEYREF, LIST_TYPE, MODEL_GROUP, MODEL_GROUP_REF, NOTATION, SEQUENCE_COMPOSITOR, UNION_TYPE, UNIQUE |
| Constructor Summary | |
|---|---|
UserUnionType(SchemaAwareConfiguration config)
Creates a new Union type. |
|
| Method Summary | |
|---|---|
AtomicType |
getCommonAtomicType()
Get the most specific possible atomic type that all items in this SimpleType belong to |
int |
getComponentTypeCode()
Get a unique number identifying the type of component |
List |
getMemberTypeReferences()
Get the list of member types |
SequenceIterator |
getTypedValue(CharSequence value,
NamespaceResolver resolver,
NameChecker nameChecker)
Get the typed value corresponding to a given string value, assuming it is valid against this type |
boolean |
isAtomicType()
Test whether this Simple Type is an atomic type |
boolean |
isBuiltInType()
Determine whether this is a built-in type or a user-defined type |
boolean |
isListType()
Determine whether this is a list type |
boolean |
isNamespaceSensitive()
Test whether this type is namespace sensitive, that is, if a namespace context is needed to translate between the lexical space and the value space. |
boolean |
isUnionType()
Return true if this type is a union type (that is, if its variety is union) |
Iterator |
iterateMemberTypeReferences()
Returns an Iterator over all the SimpleTypes that are members of a union type. |
void |
serialize(SchemaSerializer serializer)
Serialize the schema component |
void |
setMemberTypeReferences(List members)
Set the member types of this union type. |
boolean |
validate(SchemaCompiler compiler)
Validate this Union, replacing all unresolved forwards references at the same time |
ValidationException |
validateContent(CharSequence value,
NamespaceResolver nsResolver,
NameChecker nameChecker)
Check whether a given input string is valid according to this SimpleType |
| Methods inherited from class com.saxonica.schema.UserSimpleType |
|---|
analyzeContentExpression, applyWhitespaceNormalization, atomize, checkAgainstFacets, checkTypeDerivationIsOK, getBuiltInBaseType, getFacet, getFacetCollection, getFacetList, getFacets, getFacets, getTypedValue, getWhitespaceAction, isSimpleType, isTypeDerivationOK, setFacetCollection |
| Methods inherited from class com.saxonica.schema.SchemaStructure |
|---|
getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getSystemId, getValidationStatus, lookForCycles, setConfiguration, setFixupStatus, setLineNumber, setLocator, setSystemId, setValidationStatus |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.saxon.type.SimpleType |
|---|
isExternalType |
| Methods inherited from interface net.sf.saxon.type.SchemaType |
|---|
allowsDerivation, getBaseType, getBlock, getDerivationMethod, getDescription, getDisplayName, getFingerprint, getNameCode, isAnonymousType, isComplexType, isSameType |
| Methods inherited from interface net.sf.saxon.type.SchemaComponent |
|---|
getValidationStatus |
| Constructor Detail |
|---|
public UserUnionType(SchemaAwareConfiguration config)
config - the Configuration for this Union (Cannot be null)| Method Detail |
|---|
public AtomicType getCommonAtomicType()
public void setMemberTypeReferences(List members)
members - a list of TypeReference objectspublic List getMemberTypeReferences()
TypeReference objectspublic Iterator iterateMemberTypeReferences()
public boolean isAtomicType()
isAtomicType in interface SchemaTypeisAtomicType in interface SimpleTypeisAtomicType in class UserSimpleTypepublic boolean isBuiltInType()
public boolean isListType()
isListType in interface SimpleTypeisListType in class UserSimpleTypepublic boolean isUnionType()
isUnionType in interface SimpleTypeisUnionType in class UserSimpleTypepublic boolean isNamespaceSensitive()
public boolean validate(SchemaCompiler compiler)
throws SchemaException,
ValidationException
validate in class UserSimpleTypeSchemaException
ValidationException
public ValidationException validateContent(CharSequence value,
NamespaceResolver nsResolver,
NameChecker nameChecker)
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.nameChecker -
UnsupportedOperationException - if the type is namespace-sensitive and no namespace
resolver is supplied
public SequenceIterator getTypedValue(CharSequence value,
NamespaceResolver resolver,
NameChecker nameChecker)
throws ValidationException
SimpleType
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.nameChecker - a NameChecker used in the case of types that are defined in terms of the
XML NCName syntax: this is used to check conformance to XML 1.0 or XML 1.1 naming rules, as
appropriate
AtomicValue
ValidationException - if the supplied value is not in the lexical space of the data type
public void serialize(SchemaSerializer serializer)
throws IOException
IOExceptionpublic int getComponentTypeCode()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||