|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.sf.saxon.type.SchemaType
|
+--com.saxonica.schema.UserComplexType
A user-defined complex type (that is, any complex type other than xs:anyType)
| 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 | |
UserComplexType(Schema schema,
javax.xml.transform.SourceLocator locator)
Creates a new Complextype with the given name |
|
| Method Summary | |
void |
addAttributeDecl(AttributeDecl attrDecl)
Adds the given AttributeDecl to this UserComplexType. |
void |
addAttributeGroupReference(AttributeGroupReference attrGroupRef)
Adds the given AttributeGroupReference to this UserComplexType |
void |
cancelValidation()
Cancel validation and compilation: this happens when the complex type is redefined |
void |
compile(Schema schema)
Compile the finite-state machine for validating instances against this type |
boolean |
computeIsAllContent()
Compute whether this complex type has a content model defined by an xs:all compositor |
boolean |
fixup(Schema schema)
Check references from this component to other components |
AllCompositor |
getAllCompositor()
For a complex type with "all" content, get the "all" compositor |
AttributeGroup |
getAttributeGroup()
Returns the attribute group containing details of all the attributes defined for this complex type. |
SchemaType |
getBaseType()
Returns the base type that this type inherits from. |
int |
getBlock()
Returns the value of the 'block' attribute for this element |
AttributeGroupDecl |
getCombinedAttributeGroup()
Returns the attribute group containing details of all the attributes defined for this complex type. |
Particle |
getExtendedParticle(Schema schema)
Get the particle corresponding to this UserComplexType, combining it with the content model of the base type if this type is derived by extension. |
AutomatonState |
getInitialState()
Get the initial state of the finite state machine used for validating against this type. |
SimpleType |
getSimpleContentType()
For a complex type with simple content, return the simple type of the content. |
short |
getStructureType()
Returns the type of this Schema Structure |
SequenceIterator |
getTypedValue(NodeInfo node)
Get the typed value of a node that is annotated with this schema type |
boolean |
isAbstract()
Returns true if this UserComplexType has been marked as Abstract. |
boolean |
isAllContent()
Test whether this complex type has "all" content, that is, a content model using an xs:all compositor |
boolean |
isComplexContent()
Returns true if this complexType is a 'complexContent' |
boolean |
isEmptiable()
Test whether the content model of this complexType allows empty content |
boolean |
isEmptyContent()
Test whether the contentType of this complexType is empty |
boolean |
isMixedContent()
Test whether this complex type allows mixed content |
boolean |
isRestricted()
Returns true if this complexType is a restriction |
boolean |
isSimpleContent()
Returns true if this complexType is a 'simpleContent' |
boolean |
isSimpleType()
Returns true if this SchemaType is a SimpleType |
boolean |
isValidRestriction(SchemaType base,
SchemaMarker schema)
Determine whether this type is a valid restriction of another type |
void |
lookForCycles(Schema schema,
java.util.Stack references)
This method is called to look for cycles. |
void |
recompile(Schema schema)
Recompile the complex type when new members are added to the substitution group of an element |
void |
setAbstract(boolean isAbstract)
Sets whether or not this UserComplexType should be abstract. |
void |
setAnyAttribute(AttributeWildcard wildcard)
Sets the wildcard (anyAttribute) of the complexType. |
void |
setBaseType(SchemaType baseType)
Sets the base type for this UserComplexType |
void |
setBlock(int block)
Sets the value of the 'block' attribute for this UserComplexType. |
void |
setComplexContent(boolean complexContent)
Sets whether or not this complexType is a 'complexContent' |
void |
setMixed(boolean isMixed)
|
void |
setParticle(Particle particle)
Sets the particle representing the content model of this complex type |
void |
setRestriction(boolean restricted)
Sets whether or not this complexType is a restriction |
void |
setSimpleContent(boolean simpleContent)
|
void |
setSimpleContentType(SimpleType type)
|
boolean |
validate(Schema schema)
Checks the validity of this UserComplexType defintion. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UserComplexType(Schema schema,
javax.xml.transform.SourceLocator locator)
schema - the owning Schema| Method Detail |
public boolean isSimpleType()
isSimpleType in interface ComplexTypeisSimpleType in class SchemaTypepublic void addAttributeDecl(AttributeDecl attrDecl)
attrDecl - the AttributeDecl to add to this UserComplexTypepublic void addAttributeGroupReference(AttributeGroupReference attrGroupRef)
attrGroupRef - the AttributeGroupReference to add to this
UserComplexTypepublic AttributeGroup getAttributeGroup()
public AttributeGroupDecl getCombinedAttributeGroup()
public SchemaType getBaseType()
getBaseType in interface ComplexTypegetBaseType in class SchemaTypepublic int getBlock()
getBlock in class SchemaTypepublic boolean isAbstract()
isAbstract in interface ComplexTypepublic boolean isComplexContent()
isComplexContent in interface ComplexTypepublic boolean isSimpleContent()
isSimpleContent in interface ComplexTypepublic void setSimpleContent(boolean simpleContent)
public boolean isAllContent()
isAllContent in interface ComplexTypepublic boolean computeIsAllContent()
public AllCompositor getAllCompositor()
public SimpleType getSimpleContentType()
getSimpleContentType in interface ComplexTypepublic void setSimpleContentType(SimpleType type)
public boolean isRestricted()
isRestricted in interface ComplexTypepublic boolean isEmptyContent()
isEmptyContent in interface ComplexTypepublic void setAbstract(boolean isAbstract)
isAbstract - a boolean that when true makes this UserComplexType
abstract.public void setAnyAttribute(AttributeWildcard wildcard)
public void setBaseType(SchemaType baseType)
setBaseType in class SchemaTypebaseType - the base type which this UserComplexType
extends or restrictspublic void setBlock(int block)
block - the value of the block attribute for this
UserComplexType definition, as a bit-significant integer.public void setComplexContent(boolean complexContent)
complexContent - true if this complexType is a 'complexContent'public void setMixed(boolean isMixed)
public boolean isMixedContent()
ComplexType
isMixedContent in interface ComplexTypepublic void setRestriction(boolean restricted)
restricted - true if this complexType is a restriction
public void setParticle(Particle particle)
throws SchemaException
particle - the Particle to add
SchemaException - if the particle cannot be added (for example,
because there is another with the same name in the same scope)public short getStructureType()
public void lookForCycles(Schema schema,
java.util.Stack references)
throws SchemaException
lookForCycles in interface CircularityCheckerreferences - A list of objects that contain direct or indirect references
to this object, and that must therefore not be referred to from this object.
SchemaException
public boolean fixup(Schema schema)
throws SchemaException
SchemaComponent
fixup in interface SchemaComponentschema - The schema is used for reporting errors
SchemaException
public boolean validate(Schema schema)
throws javax.xml.transform.TransformerException
validate in interface SchemaComponentschema - if this is not null, any errors that are detected should
be reported using the error() method of this schema.
javax.xml.transform.TransformerException - if the ErrorListener decides that an error is fatal.
public boolean isValidRestriction(SchemaType base,
SchemaMarker schema)
throws SchemaException
SchemaException
public void compile(Schema schema)
throws SchemaException
SchemaException
public void recompile(Schema schema)
throws SchemaException
SchemaExceptionpublic void cancelValidation()
public AutomatonState getInitialState()
public Particle getExtendedParticle(Schema schema)
throws SchemaException
SchemaException
public boolean isEmptiable()
throws SchemaException
isEmptiable in interface ComplexTypeSchemaException
public SequenceIterator getTypedValue(NodeInfo node)
throws XPathException
getTypedValue in class SchemaTypenode - the node whose typed value is required
AtomicValue
XPathException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||