|
|||||||||
| 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.UserDefinedType
com.saxonica.schema.UserSimpleType
com.saxonica.schema.sdoc.SimpleTypeDefinition
public class SimpleTypeDefinition
A simple type definition holds all the information about a simpleType
during the course of schema processing. On completion
of schema processing, more specific objects are created, for example
UserListType, UserAtomicType, or UserUnionType, and the SimpleTypeDefinition is then
discarded.
| Field Summary |
|---|
| Fields inherited from class com.saxonica.schema.UserDefinedType |
|---|
extendedTypes, finalProhibitions |
| Fields inherited from interface net.sf.saxon.type.SchemaComponent |
|---|
FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING |
| Fields inherited from interface net.sf.saxon.type.SimpleType |
|---|
VARIETY_ATOMIC, VARIETY_LIST, VARIETY_UNION, VARIETY_UNSPECIFIED_SIMPLE |
| Fields inherited from interface net.sf.saxon.type.SchemaType |
|---|
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION |
| Constructor Summary | |
|---|---|
SimpleTypeDefinition(EnterpriseConfiguration config)
Create a SimpleTypeDefinition |
|
| Method Summary | |
|---|---|
void |
addMemberType(TypeReference memberType)
Add a member type to this union type |
boolean |
fixup(SchemaCompiler compiler)
Check references from this component to other components |
UserSimpleType |
getSimpleType()
Get the simple type created for this definition |
SequenceIterator<AtomicValue> |
getTypedValue(CharSequence value,
NamespaceResolver resolver,
ConversionRules rules)
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()
On a SimpleTypeDefinition, isListType() always returns true if the type is "derived by List". |
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()
On a SimpleTypeDefinition, isUnionType() always returns true if the type is "derived by Union". |
void |
serialize(SchemaModelSerializer serializer)
Serialize the schema component |
protected void |
serializeVariety(SchemaModelSerializer serializer)
|
void |
setIsSimpleContent(boolean b)
Indicate that this simple type represents the content type of a complex type with simple content |
void |
setItemTypeReference(TypeReference itemType)
Set the reference to an item type of this list type |
boolean |
validate(SchemaCompiler compiler)
Checks the validity of this SimpleType definition. |
ValidationFailure |
validateContent(CharSequence value,
NamespaceResolver nsResolver,
ConversionRules rules)
Check whether a given input string is valid according to this SimpleType |
| Methods inherited from class com.saxonica.schema.UserSimpleType |
|---|
addFacet, addInheritedFacets, analyzeContentExpression, applyWhitespaceNormalization, atomize, checkAgainstFacets, checkTypeDerivationIsOK, convertFacetValues, elaborate, getBuiltInBaseType, getExtendedFacetList, getFacet, getFacets, getLocalFacetList, getTypedValue, getWhitespaceAction, isIdRefType, isIdType, isSimpleType, isTypeDerivationOK, mergeEnumerationFacets, postprocess, preprocess, setFacetList |
| Methods inherited from class com.saxonica.schema.SchemaStructure |
|---|
getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, lookForCycles, setConfiguration, setFixupStatus, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatus |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.saxonica.schema.UserSchemaComponent |
|---|
elaborate, lookForCycles |
| Methods inherited from interface net.sf.saxon.type.SchemaComponent |
|---|
getRedefinitionLevel, getValidationStatus |
| 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, getName, getNameCode, getSystemId, getTargetNamespace, isAnonymousType, isComplexType, isSameType |
| Constructor Detail |
|---|
public SimpleTypeDefinition(EnterpriseConfiguration config)
config - the Saxon configuration| Method Detail |
|---|
public void setItemTypeReference(TypeReference itemType)
itemType - reference to a type forming the item type of this list typepublic boolean isAtomicType()
isAtomicType in interface SchemaTypeisAtomicType in interface SimpleTypeisAtomicType in class UserSimpleTypepublic boolean isListType()
isListType in interface SimpleTypeisListType in class UserSimpleTypepublic boolean isUnionType()
isUnionType in interface SimpleTypeisUnionType in class UserSimpleTypepublic void setIsSimpleContent(boolean b)
b - true if this is the content type of a complex type with simple contentpublic void addMemberType(TypeReference memberType)
memberType - the member type to be addedpublic UserSimpleType getSimpleType()
public boolean fixup(SchemaCompiler compiler)
throws SchemaException
fixup in interface UserSchemaComponentfixup in class SchemaStructurecompiler - used for error reporting
SchemaException
public boolean validate(SchemaCompiler compiler)
throws SchemaException
validate in interface UserSchemaComponentvalidate in class UserSimpleTypecompiler - used for error reporting
SchemaException - when this SimpleType definition is invalid.
public SequenceIterator<AtomicValue> getTypedValue(CharSequence value,
NamespaceResolver resolver,
ConversionRules rules)
throws ValidationException
getTypedValue in interface SimpleTypevalue - the string valueresolver - a namespace resolver used to resolve prefixes in QNames and notationsrules - the conversion rules for the Configuration
ValidationException - if the supplied value is invalid against this simple typepublic boolean isBuiltInType()
isBuiltInType in interface SimpleTypepublic boolean isNamespaceSensitive()
isNamespaceSensitive in interface SimpleType
public ValidationFailure validateContent(CharSequence value,
NamespaceResolver nsResolver,
ConversionRules rules)
validateContent in interface SimpleTypevalue - 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.rules - the conversion rules for the configuration
UnsupportedOperationException - if the type is namespace-sensitive and no namespace
resolver is suppliedpublic void serialize(SchemaModelSerializer serializer)
serialize in interface SerializableSchemaComponentserialize in class UserSimpleTypeserializer - the object responsible for performing the serialization
protected void serializeVariety(SchemaModelSerializer serializer)
throws XPathException
serializeVariety in class UserSimpleTypeXPathException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||