org.exolab.castor.xml.schema
Class AttributeGroupDecl
- java.io.Serializable
public final class AttributeGroupDecl
An XML Schema Attribute Group Definition
$Revision: 1.2 $ $Date: 2003/03/03 09:57:19 $
ANNOTATION , ANYTYPE , APPINFO , ATTRIBUTE , ATTRIBUTE_GROUP , COMPLEX_CONTENT , COMPLEX_TYPE , DOCUMENTATION , ELEMENT , FACET , GROUP , IDENTITY_FIELD , IDENTITY_SELECTOR , KEY , KEYREF , LIST , MODELGROUP , MODELGROUP_REF , REDEFINE , SCHEMA , SIMPLE_CONTENT , SIMPLE_TYPE , UNION , UNIQUE , UNKNOWN , WILDCARD |
AttributeGroupDecl
public AttributeGroupDecl(Schema schema)
Creates a new AttributeGroup definition
schema
- the Schema that this AttributeGroup
belongs to.
addAttribute
public void addAttribute(AttributeDecl attrDecl)
Adds the given attribute definition to this AttributeGroup
attrDecl
- the AttributeDecl to add
addReference
public void addReference(AttributeGroupReference attrGroup)
Adds the given AttributeGroupReference to this AttributeGroup
attrGroup
- the AttributeGroupReference to add
getAnyAttribute
public Wildcard getAnyAttribute()
Returns the wilcard used in this complexType (can be null)
- getAnyAttribute in interface AttributeGroup
- the wilcard used in this complexType (can be null)
getAttribute
public AttributeDecl getAttribute(String name)
Returns the AttributeDecl associated with the given name
- getAttribute in interface AttributeGroup
- 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.
- getAttributes in interface AttributeGroup
- 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
- the name of this AttributeGroup, or null, if
no name was defined.
getSchema
public Schema getSchema()
Returns the Schema that this AttributeGroupDecl belongs to.
- the Schema that this AttributeGroupDecl belongs to
getStructureType
public short getStructureType()
Returns the type of this Schema Structure
- getStructureType in interface AttributeGroup
- 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
- isEmpty in interface AttributeGroup
- true if this AttributeGroup does not contain any
AttributeDecls or any non-empty AttributeGroups
removeAttribute
public boolean removeAttribute(AttributeDecl attr)
Removes the given AttributeDecl from this AttributeGroup.
attr
- the attribute to remove.
removeReference
public boolean removeReference(AttributeGroupReference attrGroupReference)
Removes the given AttributeGroupReference from this AttributeGroup.
setAnyAttribute
public void setAnyAttribute(Wildcard wildcard)
throws SchemaException
Sets the wildcard (anyAttribute) of this attribute Group
SchemaException
- thrown when a wildcard as already be set
or when the wildCard is not an .
setName
public void setName(String name)
Sets the name of this AttributeGroup
name
- the name of this AttributeGroup
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com