Public Member Functions | Protected Member Functions

org.exolab.castor.xml.schema.ComplexType Class Reference

Inheritance diagram for org.exolab.castor.xml.schema.ComplexType:
org.exolab.castor.xml.schema.XMLType org.exolab.castor.xml.schema.ContentModelGroup org.exolab.castor.xml.schema.Referable org.exolab.castor.xml.schema.Annotated org.exolab.castor.xml.schema.Structure

List of all members.

Public Member Functions

 ComplexType (Schema schema)
 ComplexType (Schema schema, String name)
void addAttributeDecl (AttributeDecl attrDecl) throws SchemaException
void removeAttributeDecl (AttributeDecl attrDecl)
void addAttributeGroupReference (AttributeGroupReference attrGroupRef)
void removeAttributeGroupReference (AttributeGroupReference attrGroupRef)
AttributeDecl createAttributeDecl (String name)
Wildcard getAnyAttribute ()
AttributeDecl getAttributeDecl (String name)
Enumeration getAttributeDecls ()
Enumeration getLocalAttributeDecls ()
Enumeration getAttributeGroupReferences ()
XMLType getBaseType ()
BlockList getBlock ()
ContentType getContentType ()
FinalList getFinal ()
Structure getParent ()
String getReferenceId ()
boolean hasAny ()
boolean isAbstract ()
boolean isRedefined ()
boolean isTopLevel ()
boolean isComplexContent ()
boolean isSimpleContent ()
boolean isRestricted ()
void setAbstract (boolean isAbstract)
void setAnyAttribute (Wildcard wildcard) throws SchemaException
boolean removeWildcard (Wildcard wildcard)
void addWildcard (Wildcard wildcard) throws SchemaException
void setBase (String base)
void setBaseType (XMLType baseType)
void setBlock (BlockList block)
void setBlock (String block)
void setComplexContent (boolean complexContent)
void setContentType (ContentType contentType)
void setFinal (FinalList finalList)
void setFinal (String finalValue)
void setRedefined ()
void setSimpleContent (boolean simpleContent)
void setRestriction (boolean restricted)
void useResolver (Resolver resolver)
void addElementDecl (ElementDecl elementDecl) throws SchemaException
boolean removeElementDecl (ElementDecl element)
void addGroup (Group group) throws SchemaException
boolean removeGroup (Group group)
void addGroup (ModelGroup group) throws SchemaException
boolean removeGroup (ModelGroup group)
Enumeration enumerate ()
ElementDecl getElementDecl (String name)
int getMaxOccurs ()
int getMinOccurs ()
Particle getParticle (int index)
int getParticleCount ()
short getStructureType ()
void validate () throws ValidationException

Protected Member Functions

void setParent (Structure parent)

Detailed Description

The XML Schema ComplexType class

Author:
Keith Visco
Version:
Revision:
1.6
Date:
2004/10/01 13:25:21

Constructor & Destructor Documentation

org.exolab.castor.xml.schema.ComplexType.ComplexType ( Schema  schema  ) 

Creates a new Complextype, with no name

Parameters:
schema the owning Schema document
org.exolab.castor.xml.schema.ComplexType.ComplexType ( Schema  schema,
String  name 
)

Creates a new Complextype with the given name

Parameters:
schema the owning Schema
name of the Complextype

References org.exolab.castor.xml.schema.XMLType.NULL_ARGUMENT, org.exolab.castor.xml.schema.XMLType.setName(), and org.exolab.castor.xml.schema.XMLType.setSchema().


Member Function Documentation

void org.exolab.castor.xml.schema.ComplexType.addElementDecl ( ElementDecl  elementDecl  )  throws SchemaException

Adds the given ElementDecl to this ContentModelGroup

Parameters:
elementDecl the ElementDecl to add
Exceptions:
SchemaException when an ElementDecl already exists with the same name as the given ElementDecl

References org.exolab.castor.xml.schema.ContentModelGroup.addElementDecl().

Referenced by org.exolab.castor.xml.schema.reader.ComplexTypeUnmarshaller.endElement().

void org.exolab.castor.xml.schema.ComplexType.addGroup ( ModelGroup  group  )  throws SchemaException

Adds the given ModelGroup Definition to this ContentModelGroup

Parameters:
group the ModelGroup to add
Exceptions:
SchemaException when a group with the same name as the specified group already exists in the current scope

References org.exolab.castor.xml.schema.ContentModelGroup.addGroup().

void org.exolab.castor.xml.schema.ComplexType.addWildcard ( Wildcard  wildcard  )  throws SchemaException
AttributeDecl org.exolab.castor.xml.schema.ComplexType.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

Parameters:
name the name of the attribute
Returns:
the new AttributeDecl

References org.exolab.castor.xml.schema.XMLType.getSchema().

Enumeration org.exolab.castor.xml.schema.ComplexType.enumerate (  ) 

Returns an enumeration of all the Particles of this ContentModelGroup

Returns:
an enumeration of the Particles contained within this ContentModelGroup

References org.exolab.castor.xml.schema.ContentModelGroup.enumerate().

Wildcard org.exolab.castor.xml.schema.ComplexType.getAnyAttribute (  ) 

Returns the wilcard used in this complexType (can be null)

Returns:
the wilcard used in this complexType (can be null)
AttributeDecl org.exolab.castor.xml.schema.ComplexType.getAttributeDecl ( String  name  ) 

Returns the AttributeDecl associated with the given name

Returns:
the AttributeDecl associated with the given name, or null if no AttributeDecl with the given name was found.

References org.exolab.castor.xml.schema.AttributeGroupDecl.getAttribute().

Enumeration org.exolab.castor.xml.schema.ComplexType.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.

Returns:
an Enumeration of all the AttributeDecl objects declared within this Complextype

References org.exolab.castor.xml.schema.AttributeGroupDecl.getAttributes().

Enumeration org.exolab.castor.xml.schema.ComplexType.getAttributeGroupReferences (  ) 

Returns an Enumeration of all the AttributeGroup that are referenced within this ComplexType.

Returns:
an Enumeration of all the AttributeGroup that are referenced within this ComplexType.

References org.exolab.castor.xml.schema.AttributeGroupDecl.getLocalAttributeGroupReferences().

BlockList org.exolab.castor.xml.schema.ComplexType.getBlock (  ) 

Returns the value of the 'block' attribute for this element

Returns:
the value of the 'block' attribute for this element
ContentType org.exolab.castor.xml.schema.ComplexType.getContentType (  ) 
ElementDecl org.exolab.castor.xml.schema.ComplexType.getElementDecl ( String  name  ) 

Returns the element declaration with the given name, or null if no element declaration with that name exists in this ContentModelGroup.

Parameters:
name the name of the element.
Returns:
the ElementDecl with the given name, or null if no ElementDecl exists in this ContentModelGroup.

References org.exolab.castor.xml.schema.ContentModelGroup.getElementDecl().

Referenced by com.cosylab.cdb.jdal.XSDElementTypeResolver.internalGetElementTypes().

FinalList org.exolab.castor.xml.schema.ComplexType.getFinal (  ) 

Returns the list of values for the final property for this ComplexType, or null if no final values have been set.

Returns:
the FinalList for this ComplexType
Enumeration org.exolab.castor.xml.schema.ComplexType.getLocalAttributeDecls (  ) 

Returns an Enumeration of *all* locally defined AttributeDecl declared within this ComplexType. The Enumeration will not contain any AttributeDecl from AttributeGroup references.

Returns:
an Enumeration of all locally declared AttributeDecl.

References org.exolab.castor.xml.schema.AttributeGroupDecl.getLocalAttributes().

int org.exolab.castor.xml.schema.ComplexType.getMaxOccurs (  ) 

Returns the maximum number of occurances that this ContentModelGroup may appear

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).

References org.exolab.castor.xml.schema.ContentModelGroup.getMaxOccurs(), org.exolab.castor.xml.schema.Particle.getMaxOccurs(), org.exolab.castor.xml.schema.ContentModelGroup.getParticle(), and org.exolab.castor.xml.schema.ContentModelGroup.getParticleCount().

int org.exolab.castor.xml.schema.ComplexType.getMinOccurs (  ) 

Returns the minimum number of occurances that this ContentModelGroup must appear

Returns:
the minimum number of occurances that this ContentModelGroup must appear A negative (n < 0) value indicates that the value is unspecified.

References org.exolab.castor.xml.schema.ContentModelGroup.getMinOccurs(), org.exolab.castor.xml.schema.Particle.getMinOccurs(), org.exolab.castor.xml.schema.ContentModelGroup.getParticle(), and org.exolab.castor.xml.schema.ContentModelGroup.getParticleCount().

Structure org.exolab.castor.xml.schema.ComplexType.getParent (  ) 

Returns the parent of this ComplexType, this value may be null if no parent has been set.

Returns:
the parent Structure of this ComplexType.

Referenced by org.exolab.castor.builder.binding.XMLBindingComponent.getTargetNamespace().

Particle org.exolab.castor.xml.schema.ComplexType.getParticle ( int  index  ) 

Returns the Particle at the specified index

Parameters:
index the index of the particle to return
Returns:
the CMParticle at the specified index

References org.exolab.castor.xml.schema.ContentModelGroup.getParticle().

Referenced by org.exolab.castor.builder.SourceFactory.createSourceCode(), and org.exolab.castor.xml.schema.util.XMLInstance2SchemaHandler.endElement().

int org.exolab.castor.xml.schema.ComplexType.getParticleCount (  ) 
String org.exolab.castor.xml.schema.ComplexType.getReferenceId (  ) 
short org.exolab.castor.xml.schema.ComplexType.getStructureType (  ) 

Returns the type of this Schema Structure

Returns:
the type of this Schema Structure

Referenced by org.exolab.castor.xml.schema.ComplexType.hasAny().

boolean org.exolab.castor.xml.schema.ComplexType.hasAny (  ) 

A helper method that returns true if this complexType contains an <any> element.

Returns:
method that returns true if this complexType contains an <any> element.

References org.exolab.castor.xml.schema.Structure.ELEMENT, org.exolab.castor.xml.schema.ContentModelGroup.enumerate(), and org.exolab.castor.xml.schema.ComplexType.getStructureType().

boolean org.exolab.castor.xml.schema.ComplexType.isAbstract (  ) 

Returns true if this ComplexType has been marked as Abstract.

Returns:
true if this ComplexType is "abstract".
boolean org.exolab.castor.xml.schema.ComplexType.isComplexContent (  ) 

Returns true if this complexType is a 'complexContent'

Returns:
true if this complexType is a 'complexContent'

Referenced by org.exolab.castor.xml.schema.reader.ExtensionUnmarshaller.ExtensionUnmarshaller().

boolean org.exolab.castor.xml.schema.ComplexType.isRedefined (  ) 

Returns true if this complexType is a redefinition.

Returns:
true if this complexType is a redefinition.

Referenced by org.exolab.castor.xml.schema.Schema.addComplexType().

boolean org.exolab.castor.xml.schema.ComplexType.isRestricted (  ) 

Returns true if this complexType is a restriction

Returns:
true if this complexType is a restriction
boolean org.exolab.castor.xml.schema.ComplexType.isTopLevel (  ) 
void org.exolab.castor.xml.schema.ComplexType.removeAttributeDecl ( AttributeDecl  attrDecl  ) 

Removes the given AttributeDecl from this ComplexType

Parameters:
attrDecl the AttributeDecl to remove.

References org.exolab.castor.xml.schema.AttributeGroupDecl.removeAttribute().

void org.exolab.castor.xml.schema.ComplexType.removeAttributeGroupReference ( AttributeGroupReference  attrGroupRef  ) 

Removes the given AttributeGroupReference from this ComplexType

Parameters:
attrGroupRef the AttributeGroupReference to remove.

References org.exolab.castor.xml.schema.AttributeGroupDecl.removeReference().

boolean org.exolab.castor.xml.schema.ComplexType.removeElementDecl ( ElementDecl  element  ) 

Removes the given ElementDecl from this ContentModelGroup.

Parameters:
elementDecl the ElementDecl to remove.
Returns:
true if the element has been successfully removed, false otherwise.

References org.exolab.castor.xml.schema.ContentModelGroup.removeElementDecl().

boolean org.exolab.castor.xml.schema.ComplexType.removeGroup ( Group  group  ) 

Removes the given Group from this ContentModelGroup.

Parameters:
group the Group to remove.
Returns:
true if the group has been successfully removed, false otherwise.

References org.exolab.castor.xml.schema.ContentModelGroup.removeGroup(), and org.exolab.castor.xml.schema.Group.setParent().

boolean org.exolab.castor.xml.schema.ComplexType.removeGroup ( ModelGroup  group  ) 

Removes the given ModelGroup Definition from this ContentModelGroup.

Parameters:
group the ModelGroup Definition to remove.
Returns:
true if the group has been successfully removed, false otherwise.

References org.exolab.castor.xml.schema.ContentModelGroup.removeGroup(), and org.exolab.castor.xml.schema.Group.setParent().

boolean org.exolab.castor.xml.schema.ComplexType.removeWildcard ( Wildcard  wildcard  ) 

Removes the given Wildcard from this Group.

Parameters:
wilcard the Wildcard to remove.
Returns:
true if the wildcard has been successfully removed, false otherwise.
void org.exolab.castor.xml.schema.ComplexType.setAbstract ( boolean  isAbstract  ) 

Sets whether or not this ComplexType should be abstract.

Parameters:
isAbstract a boolean that when true makes this ComplexType abstract.

Referenced by org.exolab.castor.xml.schema.reader.ComplexTypeUnmarshaller.ComplexTypeUnmarshaller().

void org.exolab.castor.xml.schema.ComplexType.setBlock ( String  block  ) 

Sets the value of the 'block' attribute for this ComplexType.

Parameters:
block the value of the block attribute for this ComplexType definition.

References org.exolab.castor.xml.schema.ComplexType.setBlock().

void org.exolab.castor.xml.schema.ComplexType.setBlock ( BlockList  block  ) 

Sets the value of the 'block' attribute for this ComplexType.

Parameters:
block the value of the block attribute for this ComplexType definition.

References org.exolab.castor.xml.schema.BlockList.hasSubstitution().

Referenced by org.exolab.castor.xml.schema.reader.ComplexTypeUnmarshaller.ComplexTypeUnmarshaller(), and org.exolab.castor.xml.schema.ComplexType.setBlock().

void org.exolab.castor.xml.schema.ComplexType.setComplexContent ( boolean  complexContent  ) 

Sets whether or not this complexType is a 'complexContent'

Parameters:
complexContent true if this complexType is a 'complexContent'

Referenced by org.exolab.castor.xml.schema.reader.ComplexTypeUnmarshaller.startElement().

void org.exolab.castor.xml.schema.ComplexType.setFinal ( String  finalValue  ) 

Sets the value of the 'final' attribute for this ComplexType definition.

Parameters:
finalValue the value of the final attribute for this ComplexType definition.
void org.exolab.castor.xml.schema.ComplexType.setFinal ( FinalList  finalList  ) 

Sets the value of the 'final' attribute for this ComplexType definition.

Parameters:
finalList the value of the final attribute for this ComplexType definition.

Referenced by org.exolab.castor.xml.schema.reader.ComplexTypeUnmarshaller.ComplexTypeUnmarshaller().

void org.exolab.castor.xml.schema.ComplexType.setParent ( Structure  parent  )  [protected]

Sets the parent for this ComplexType

Parameters:
parent the parent Structure for this ComplexType

References org.exolab.castor.xml.schema.Structure.getStructureType().

Referenced by org.exolab.castor.xml.schema.Schema.removeComplexType().

void org.exolab.castor.xml.schema.ComplexType.setRedefined (  ) 
void org.exolab.castor.xml.schema.ComplexType.setRestriction ( boolean  restricted  ) 
void org.exolab.castor.xml.schema.ComplexType.setSimpleContent ( boolean  simpleContent  ) 

Sets whether or not this complexType is a 'simpleContent'

Parameters:
complexContent true if this complexType is a 'simpleContent'

Referenced by org.exolab.castor.xml.schema.reader.ComplexTypeUnmarshaller.startElement().

void org.exolab.castor.xml.schema.ComplexType.useResolver ( Resolver  resolver  ) 

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties