addAttributeDecl
public void addAttributeDecl(AttributeDecl attrDecl)
throws SchemaException
Adds the given AttributeDecl to this ComplexType
attrDecl
- the AttributeDecl to add to this ComplexType
SchemaException
- when an AttributeDecl already
exists with the same name as the given AttributeDecl
addAttributeGroupReference
public void addAttributeGroupReference(AttributeGroupReference attrGroupRef)
Adds the given AttributeGroupReference to this ComplexType
attrGroupRef
- the AttributeGroupReference to add to this
ComplexType
createAttributeDecl
public AttributeDecl createAttributeDecl(String name)
Creates an AttributeDecl with the given name. The attribute
declaration will still need to be added to this Complextype,
or another archetype in the same schema, by making a call
to #addAttributeDecl
name
- the name of the attribute
enumerate
public Enumeration enumerate()
Returns an enumeration of all the Particles of this
ContentModelGroup
- enumerate in interface ContentModelGroup
- an enumeration of the Particles contained
within this ContentModelGroup
getAnyAttribute
public Wildcard getAnyAttribute()
Returns the wilcard used in this complexType (can be null)
- the wilcard used in this complexType (can be null)
getAttributeDecl
public AttributeDecl getAttributeDecl(String name)
Returns the AttributeDecl associated with the given name
- the AttributeDecl associated with the given name, or
null if no AttributeDecl with the given name was found.
getAttributeDecls
public Enumeration getAttributeDecls()
Returns an Enumeration of *all* the AttributeDecl objects
declared within this ComplexType. The Enumeration
will contain all AttributeDecl from AttributeGroup
references as well. To return only locally declared
attributes make a call to
getLocalAttributeDecls
.
- an Enumeration of all the AttributeDecl objects
declared within this Complextype
getAttributeGroupReferences
public Enumeration getAttributeGroupReferences()
Returns an Enumeration of all the AttributeGroup that are referenced
within this ComplexType.
- an Enumeration of all the AttributeGroup that are referenced
within this ComplexType.
getBaseType
public XMLType getBaseType()
Returns the base type that this type inherits from.
- getBaseType in interface XMLType
- the base type (also called super type).
getBlock
public BlockList getBlock()
Returns the value of the 'block' attribute for this element
- the value of the 'block' attribute for this element
getContentType
public ContentType getContentType()
Returns the content type of this ComplexType.
The Content Type holds the information about the content of the complexType.
For instance, if this complexType is a simpleContent then the simpleType information
will be hold in the content type.
- the content type of this ComplexType
getElementDecl
public 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.
- getElementDecl in interface ContentModelGroup
name
- the name of the element.
- the ElementDecl with the given name, or null if no
ElementDecl exists in this ContentModelGroup.
getFinal
public FinalList getFinal()
Returns the list of values for the final property for this
ComplexType, or null if no final values have been set.
- the FinalList for this ComplexType
getLocalAttributeDecls
public Enumeration getLocalAttributeDecls()
Returns an Enumeration of *all* locally defined AttributeDecl
declared within this ComplexType. The Enumeration
will not contain any AttributeDecl from AttributeGroup
references.
- an Enumeration of all locally declared AttributeDecl.
getMaxOccurs
public int getMaxOccurs()
Returns the maximum number of occurances that this ContentModelGroup
may appear
- getMaxOccurs in interface ContentModelGroup
- the maximum number of occurances that this ContentModelGroup
may appear.
A non positive (n <321) value indicates that the
value is unspecified (ie. unbounded).
getMinOccurs
public int getMinOccurs()
Returns the minimum number of occurances that this ContentModelGroup
must appear
- getMinOccurs in interface ContentModelGroup
- the minimum number of occurances that this ContentModelGroup
must appear
A negative (n <320) value indicates that the value is unspecified.
getParent
public Structure getParent()
Returns the parent of this ComplexType, this value may be null if
no parent has been set.
- the parent Structure of this ComplexType.
getParticleCount
public int getParticleCount()
Returns the number of particles contained within
this ContentModelGroup
- getParticleCount in interface ContentModelGroup
getReferenceId
public String getReferenceId()
Returns the Id used to Refer to this Object
- getReferenceId in interface Referable
- the Id used to Refer to this Object
getStructureType
public short getStructureType()
Returns the type of this Schema Structure
- getStructureType in interface Structure
- the type of this Schema Structure
hasAny
public boolean hasAny()
A helper method that returns true if this complexType
contains an
element.
- method that returns true if this complexType
contains an element.
isAbstract
public boolean isAbstract()
Returns true if this ComplexType has been marked as Abstract.
- true if this ComplexType is "abstract".
isComplexContent
public boolean isComplexContent()
Returns true if this complexType is a 'complexContent'
isRestricted
public boolean isRestricted()
Returns true if this complexType is a restriction
isSimpleContent
public boolean isSimpleContent()
Returns true if this complexType is a 'simpleContent'
isTopLevel
public boolean isTopLevel()
Returns true if this is a top level Complextype
- true if this is a top level Complextype
removeAttributeDecl
public void removeAttributeDecl(AttributeDecl attrDecl)
Removes the given AttributeDecl from this ComplexType
attrDecl
- the AttributeDecl to remove.
removeAttributeGroupReference
public void removeAttributeGroupReference(AttributeGroupReference attrGroupRef)
Removes the given AttributeGroupReference from this ComplexType
attrGroupRef
- the AttributeGroupReference to remove.
removeElementDecl
public boolean removeElementDecl(ElementDecl element)
Removes the given ElementDecl from this ContentModelGroup.
- removeElementDecl in interface ContentModelGroup
- true if the element has been successfully removed, false otherwise.
removeGroup
public boolean removeGroup(Group group)
Removes the given Group from this ContentModelGroup.
- removeGroup in interface ContentModelGroup
group
- the Group to remove.
- true if the group has been successfully removed, false otherwise.
removeGroup
public boolean removeGroup(ModelGroup group)
Removes the given ModelGroup Definition from this ContentModelGroup.
- removeGroup in interface ContentModelGroup
group
- the ModelGroup Definition to remove.
- true if the group has been successfully removed, false otherwise.
removeWildcard
public boolean removeWildcard(Wildcard wildcard)
Removes the given Wildcard from this Group.
- removeWildcard in interface ContentModelGroup
- true if the wildcard has been successfully removed, false otherwise.
setAbstract
public void setAbstract(boolean isAbstract)
Sets whether or not this ComplexType should be abstract.
isAbstract
- a boolean that when true makes this ComplexType
abstract.
setAnyAttribute
public void setAnyAttribute(Wildcard wildcard)
throws SchemaException
Sets the wildcard (anyAttribute) of the complexType
SchemaException
- thrown when a wildcard as already be set
or when the wildCard is not an .
setBase
public void setBase(String base)
Sets the base type that this type is derived from
base
- the type that this type is derived from
setBaseType
public void setBaseType(XMLType baseType)
Sets the base type for this ComplexType
- setBaseType in interface XMLType
baseType
- the base type which this ComplexType
extends or restricts
setBlock
public void setBlock(String block)
Sets the value of the 'block' attribute for this ComplexType.
block
- the value of the block attribute for this
ComplexType definition.
setBlock
public void setBlock(BlockList block)
Sets the value of the 'block' attribute for this ComplexType.
block
- the value of the block attribute for this
ComplexType definition.
setComplexContent
public void setComplexContent(boolean complexContent)
Sets whether or not this complexType is a 'complexContent'
complexContent
- true if this complexType is a 'complexContent'
setContentType
public void setContentType(ContentType contentType)
Sets the content type of this complexType.
The Content Type holds the information about the content of the complexType.
For instance, if this complexType is a simpleContent then the simpleType information
will be hold in the content type.
contentType
- the ContentType for this complexType
setFinal
public void setFinal(String finalValue)
Sets the value of the 'final' attribute for this ComplexType
definition.
finalValue
- the value of the final attribute for this
ComplexType definition.
setFinal
public void setFinal(FinalList finalList)
Sets the value of the 'final' attribute for this ComplexType
definition.
finalList
- the value of the final attribute for this
ComplexType definition.
setParent
protected void setParent(Structure parent)
Sets the parent for this ComplexType
- setParent in interface XMLType
parent
- the parent Structure for this ComplexType
setRestriction
public void setRestriction(boolean restricted)
Sets whether or not this complexType is a restriction
setSimpleContent
public void setSimpleContent(boolean simpleContent)
Sets whether or not this complexType is a 'simpleContent'
useResolver
public void useResolver(Resolver resolver)