org.exolab.castor.xml.schema
public class ComplexType extends XMLType implements ContentModelGroup, Referable
Version: $Revision: 6230 $ $Date: 2006-02-01 15:47:48 -0700 (Wed, 01 Feb 2006) $
Constructor Summary | |
---|---|
ComplexType(Schema schema)
Creates a new Complextype, with no name | |
ComplexType(Schema schema, String name)
Creates a new Complextype with the given name |
Method Summary | |
---|---|
void | addAttributeDecl(AttributeDecl attrDecl)
Adds the given AttributeDecl to this ComplexType
|
void | addAttributeGroupReference(AttributeGroupReference attrGroupRef)
Adds the given AttributeGroupReference to this ComplexType
|
void | addElementDecl(ElementDecl elementDecl)
Adds the given ElementDecl to this ContentModelGroup |
void | addGroup(Group group)
Adds the given Group to this ContentModelGroup |
void | addGroup(ModelGroup group)
Adds the given ModelGroup Definition to this ContentModelGroup |
void | addWildcard(Wildcard wildcard) |
AttributeDecl | createAttributeDecl(String name)
Creates an AttributeDecl with the given name. |
Enumeration | enumerate()
Returns an enumeration of all the Particles of this
ContentModelGroup
|
Wildcard | getAnyAttribute()
Returns the wilcard used in this complexType (can be null) |
AttributeDecl | getAttributeDecl(String name)
Returns the AttributeDecl associated with the given name |
Enumeration | getAttributeDecls()
Returns an Enumeration of *all* the AttributeDecl objects
declared within this ComplexType. |
Enumeration | getAttributeGroupReferences()
Returns an Enumeration of all the AttributeGroup that are referenced
within this ComplexType.
|
XMLType | getBaseType()
Returns the base type that this type inherits from.
|
BlockList | getBlock()
Returns the value of the 'block' attribute for this element
|
ContentType | getContentType()
Returns the content type of this ComplexType.
|
ElementDecl | getElementDecl(String name)
Returns the element declaration with the given name, or null if no
element declaration with that name exists in this ContentModelGroup.
|
FinalList | getFinal()
Returns the list of values for the final property for this
ComplexType, or null if no final values have been set.
|
Enumeration | getLocalAttributeDecls()
Returns an Enumeration of *all* locally defined AttributeDecl
declared within this ComplexType. |
int | getMaxOccurs()
Returns the maximum number of occurances that this ContentModelGroup
may appear |
int | getMinOccurs()
Returns the minimum number of occurances that this ContentModelGroup
must appear |
Structure | getParent()
Returns the parent of this ComplexType, this value may be null if
no parent has been set.
|
Particle | getParticle(int index)
Returns the Particle at the specified index |
int | getParticleCount()
Returns the number of particles contained within
this ContentModelGroup
|
String | getReferenceId()
Returns the Id used to Refer to this Object |
short | getStructureType()
Returns the type of this Schema Structure |
boolean | hasAny()
A helper method that returns true if this complexType
contains an {@literal |
boolean | isAbstract()
Returns true if this ComplexType has been marked as Abstract.
|
boolean | isComplexContent()
Returns true if this complexType is a 'complexContent' |
boolean | isEmptiable() |
boolean | isRedefined()
Returns true if this complexType is a redefinition.
|
boolean | isRestricted()
Returns true if this complexType is a restriction |
boolean | isSimpleContent()
Returns true if this complexType is a 'simpleContent' |
boolean | isTopLevel()
Returns true if this is a top level Complextype |
void | removeAttributeDecl(AttributeDecl attrDecl)
Removes the given AttributeDecl from this ComplexType |
void | removeAttributeGroupReference(AttributeGroupReference attrGroupRef)
Removes the given AttributeGroupReference from this ComplexType |
boolean | removeElementDecl(ElementDecl element)
Removes the given ElementDecl from this ContentModelGroup. |
boolean | removeGroup(Group group)
Removes the given Group from this ContentModelGroup. |
boolean | removeGroup(ModelGroup group)
Removes the given ModelGroup Definition from this ContentModelGroup. |
boolean | removeWildcard(Wildcard wildcard)
Removes the given Wildcard from this Group. |
void | setAbstract(boolean isAbstract)
Sets whether or not this ComplexType should be abstract.
|
void | setAnyAttribute(Wildcard wildcard)
Sets the wildcard (anyAttribute) of the complexType |
void | setBase(String base)
Sets the base type that this type is derived from |
void | setBaseType(XMLType baseType)
Sets the base type for this ComplexType
|
void | setBlock(BlockList block)
Sets the value of the 'block' attribute for this ComplexType.
|
void | setBlock(String block)
Sets the value of the 'block' attribute for this ComplexType.
|
void | setComplexContent(boolean complexContent)
Sets whether or not this complexType is a 'complexContent' |
void | setContentType(ContentType contentType)
Sets the content type of this complexType.
|
void | setFinal(FinalList finalList)
Sets the value of the 'final' attribute for this ComplexType
definition.
|
void | setFinal(String finalValue)
Sets the value of the 'final' attribute for this ComplexType
definition.
|
protected void | setParent(Structure parent)
Sets the parent for this ComplexType
|
void | setRedefined()
Sets this Group has redefined. |
void | setRestriction(boolean restricted)
Sets whether or not this complexType is a restriction |
void | setSimpleContent(boolean simpleContent)
Sets whether or not this complexType is a 'simpleContent' |
void | useResolver(Resolver resolver) |
void | validate()
Checks the validity of this ComplexType defintion.
|
Parameters: schema the owning Schema document
Parameters: schema the owning Schema name of the Complextype
Parameters: attrDecl the AttributeDecl to add to this ComplexType
Throws: SchemaException when an AttributeDecl already exists with the same name as the given AttributeDecl
Parameters: attrGroupRef the AttributeGroupReference to add to this ComplexType
Parameters: elementDecl the ElementDecl to add
Throws: SchemaException when an ElementDecl already exists with the same name as the given ElementDecl
Parameters: group the Group to add
Throws: SchemaException when a group with the same name as the specified group already exists in the current scope
Parameters: group the ModelGroup to add
Throws: SchemaException when a group with the same name as the specified group already exists in the current scope
Parameters: name the name of the attribute
Returns: the new AttributeDecl
Returns: an enumeration of the Particles contained within this ContentModelGroup
Returns: the wilcard used in this complexType (can be null)
Returns: the AttributeDecl associated with the given name, or null if no AttributeDecl with the given name was found.
getLocalAttributeDecls
.
Returns: an Enumeration of all the AttributeDecl objects declared within this Complextype
Returns: an Enumeration of all the AttributeGroup that are referenced within this ComplexType.
Returns: the base type (also called super type).
Returns: the value of the 'block' attribute for this element
Returns: the content type of this ComplexType
Parameters: name the name of the element.
Returns: the ElementDecl with the given name, or null if no ElementDecl exists in this ContentModelGroup.
Returns: the FinalList for this ComplexType
Returns: an Enumeration of all locally declared AttributeDecl.
Returns: the maximum number of occurances that this ContentModelGroup may appear. A non positive (n < 1) value indicates that the value is unspecified (ie. unbounded).
Returns: the minimum number of occurances that this ContentModelGroup must appear A negative (n < 0) value indicates that the value is unspecified.
Returns: the parent Structure of this ComplexType.
Parameters: index the index of the particle to return
Returns: the CMParticle at the specified index
Returns: the number of particles
Returns: the type of this Schema Structure
Returns: method that returns true if this complexType
contains an {@literal
Returns: true if this ComplexType is "abstract".
Returns: true if this complexType is a 'complexContent'
Returns:
Returns: true if this complexType is a redefinition.
Returns: true if this complexType is a restriction
Returns: true if this complexType is a 'simpleContent'
Returns: true if this is a top level Complextype
Parameters: attrDecl the AttributeDecl to remove.
Parameters: attrGroupRef the AttributeGroupReference to remove.
Parameters: element the ElementDecl to remove.
Returns: true if the element has been successfully removed, false otherwise.
Parameters: group the Group to remove.
Returns: true if the group has been successfully removed, false otherwise.
Parameters: group the ModelGroup Definition to remove.
Returns: true if the group has been successfully removed, false otherwise.
Parameters: wildcard the Wildcard to remove.
Returns: true if the wildcard has been successfully removed, false otherwise.
Parameters: isAbstract a boolean that when true makes this ComplexType abstract.
Throws: SchemaException thrown when a wildcard as already be set
or when the wildCard is not an {@literal
Parameters: base the type that this type is derived from
Parameters: baseType the base type which this ComplexType extends or restricts
Parameters: block the value of the block attribute for this ComplexType definition.
Parameters: block the value of the block attribute for this ComplexType definition.
Parameters: complexContent true if this complexType is a 'complexContent'
Parameters: contentType the ContentType for this complexType
Parameters: finalList the value of the final attribute for this ComplexType definition.
Parameters: finalValue the value of the final attribute for this ComplexType definition.
Parameters: parent the parent Structure for this ComplexType
Parameters: restricted true if this complexType is a restriction
Parameters: simpleContent true if this complexType is a 'simpleContent'
Throws: ValidationException when this ComplexType definition is invalid.