org.exolab.castor.xml.schema

Class AttributeGroupDecl

public final class AttributeGroupDecl extends AttributeGroup

An XML Schema Attribute Group Definition

Version: $Revision: 6230 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $

Author: Keith Visco

Constructor Summary
AttributeGroupDecl(Schema schema)
Creates a new AttributeGroup definition
Method Summary
voidaddAttribute(AttributeDecl attrDecl)
Adds the given attribute definition to this AttributeGroup
voidaddReference(AttributeGroupReference attrGroup)
Adds the given AttributeGroupReference to this AttributeGroup
WildcardgetAnyAttribute()
Returns the wilcard used in this complexType (can be null)
AttributeDeclgetAttribute(String name)
Returns the AttributeDecl associated with the given name
EnumerationgetAttributes()
Returns an Enumeration of all the attributes of this attribute group.
EnumerationgetLocalAttributeGroupReferences()
Returns the AttributeGroupReference of THIS attribute group. (not those of the nested groups)
EnumerationgetLocalAttributes()
Returns the attributes of THIS attribute group. (not those of the nested groups)
StringgetName()
Returns the name of this AttributeGroup
SchemagetSchema()
Returns the Schema that this AttributeGroupDecl belongs to.
shortgetStructureType()
Returns the type of this Schema Structure
booleanisEmpty()
Returns true if this AttributeGroup does not contain any AttributeDecls or any non-empty AttributeGroups
booleanisRedefined()
Returns true if this attributeGroupDecl is a redefinition.
booleanremoveAttribute(AttributeDecl attr)
Removes the given AttributeDecl from this AttributeGroup.
booleanremoveReference(AttributeGroupReference attrGroupReference)
Removes the given AttributeGroupReference from this AttributeGroup.
voidsetAnyAttribute(Wildcard wildcard)
Sets the wildcard (anyAttribute) of this attribute Group
voidsetName(String name)
Sets the name of this AttributeGroup
voidsetRedefined()
Sets this Group has redefined.
voidvalidate()
Checks the validity of this Attribute declaration

Constructor Detail

AttributeGroupDecl

public AttributeGroupDecl(Schema schema)
Creates a new AttributeGroup definition

Parameters: schema the Schema that this AttributeGroup belongs to.

Method Detail

addAttribute

public void addAttribute(AttributeDecl attrDecl)
Adds the given attribute definition to this AttributeGroup

Parameters: attrDecl the AttributeDecl to add

addReference

public void addReference(AttributeGroupReference attrGroup)
Adds the given AttributeGroupReference to this AttributeGroup

Parameters: attrGroup the AttributeGroupReference to add

getAnyAttribute

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

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

getAttribute

public AttributeDecl getAttribute(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.

getAttributes

public Enumeration getAttributes()
Returns an Enumeration of all the attributes of this attribute group. The enumeration includes attributes from all AttributeGroupReferences contained in this AttributeGroup.

Returns: an Enumeration of all the attributes of this attribute group.

getLocalAttributeGroupReferences

public Enumeration getLocalAttributeGroupReferences()
Returns the AttributeGroupReference of THIS attribute group. (not those of the nested groups)

getLocalAttributes

public Enumeration getLocalAttributes()
Returns the attributes of THIS attribute group. (not those of the nested groups)

getName

public String getName()
Returns the name of this AttributeGroup

Returns: the name of this AttributeGroup, or null, if no name was defined.

getSchema

public Schema getSchema()
Returns the Schema that this AttributeGroupDecl belongs to.

Returns: the Schema that this AttributeGroupDecl belongs to

getStructureType

public short getStructureType()
Returns the type of this Schema Structure

Returns: the type of this Schema Structure

isEmpty

public boolean isEmpty()
Returns true if this AttributeGroup does not contain any AttributeDecls or any non-empty AttributeGroups

Returns: true if this AttributeGroup does not contain any AttributeDecls or any non-empty AttributeGroups

isRedefined

public boolean isRedefined()
Returns true if this attributeGroupDecl is a redefinition.

Returns: true if this attributeGroupDecl is a redefinition.

removeAttribute

public boolean removeAttribute(AttributeDecl attr)
Removes the given AttributeDecl from this AttributeGroup.

Parameters: attr the attribute to remove.

removeReference

public boolean removeReference(AttributeGroupReference attrGroupReference)
Removes the given AttributeGroupReference from this AttributeGroup.

Parameters: attrGroupReference the AttributeGroupReference to remove.

setAnyAttribute

public void setAnyAttribute(Wildcard wildcard)
Sets the wildcard (anyAttribute) of this attribute Group

Throws: SchemaException thrown when a wildcard as already be set or when the wildCard is not an {@literal }.

setName

public void setName(String name)
Sets the name of this AttributeGroup

Parameters: name the name of this AttributeGroup

setRedefined

public void setRedefined()
Sets this Group has redefined.

validate

public void validate()
Checks the validity of this Attribute declaration

Throws: ValidationException when this Attribute declaration is invalid

Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com