public final class AttributeGroupDecl extends AttributeGroup
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| Constructor and Description |
|---|
AttributeGroupDecl(Schema schema)
Creates a new AttributeGroup definition
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(AttributeDecl attrDecl)
Adds the given attribute definition to this AttributeGroup
|
void |
addReference(AttributeGroupReference attrGroup)
Adds the given AttributeGroupReference to this AttributeGroup
|
Wildcard |
getAnyAttribute()
Returns the wilcard used in this complexType (can be null)
|
AttributeDecl |
getAttribute(String name)
Returns the AttributeDecl associated with the given name
|
Enumeration<AttributeDecl> |
getAttributes()
Returns an Enumeration of all the attributes of this attribute group.
|
Enumeration<AttributeGroupReference> |
getLocalAttributeGroupReferences()
Returns the AttributeGroupReference of THIS attribute group.
|
Enumeration<AttributeDecl> |
getLocalAttributes()
Returns the attributes of THIS attribute group.
|
String |
getName()
Returns the name of this AttributeGroup
|
Schema |
getSchema()
Returns the Schema that this AttributeGroupDecl belongs to.
|
short |
getStructureType()
Returns the type of this Schema Structure
|
boolean |
isEmpty()
Returns true if this AttributeGroup does not contain any AttributeDecls or any non-empty
AttributeGroups
|
boolean |
isRedefined()
Returns true if this attributeGroupDecl is a redefinition.
|
boolean |
removeAttribute(AttributeDecl attr)
Removes the given AttributeDecl from this AttributeGroup.
|
boolean |
removeReference(AttributeGroupReference attrGroupReference)
Removes the given AttributeGroupReference from this AttributeGroup.
|
void |
setAnyAttribute(Wildcard wildcard)
Sets the wildcard (anyAttribute) of this attribute Group
|
void |
setName(String name)
Sets the name of this AttributeGroup
|
void |
setRedefined()
Sets this Group has redefined.
|
void |
validate()
Checks the validity of this Attribute declaration
|
getId, setIdaddAnnotation, getAnnotations, removeAnnotationpublic AttributeGroupDecl(Schema schema)
schema - the Schema that this AttributeGroup belongs to.public void addAttribute(AttributeDecl attrDecl)
attrDecl - the AttributeDecl to addpublic void addReference(AttributeGroupReference attrGroup)
attrGroup - the AttributeGroupReference to addpublic Enumeration<AttributeDecl> getLocalAttributes()
public Enumeration<AttributeGroupReference> getLocalAttributeGroupReferences()
public Wildcard getAnyAttribute()
getAnyAttribute in class AttributeGrouppublic AttributeDecl getAttribute(String name)
getAttribute in class AttributeGrouppublic Enumeration<AttributeDecl> getAttributes()
getAttributes in class AttributeGrouppublic String getName()
public Schema getSchema()
public boolean isEmpty()
isEmpty in class AttributeGrouppublic boolean isRedefined()
public boolean removeAttribute(AttributeDecl attr)
attr - the attribute to remove.public boolean removeReference(AttributeGroupReference attrGroupReference)
attrGroupReference - the AttributeGroupReference to remove.public void setAnyAttribute(Wildcard wildcard) throws SchemaException
SchemaException - thrown when a wildcard as already be set or when the wildCard is not
an <anyAttribute>.public void setName(String name)
name - the name of this AttributeGrouppublic void setRedefined()
public short getStructureType()
getStructureType in class AttributeGrouppublic void validate()
throws ValidationException
validate in class AttributeGroupValidationException - when this Attribute declaration is invalidCopyright © 2016. All rights reserved.