org.ws4d.java.schema
Class AttributeGroup

java.lang.Object
  extended by org.ws4d.java.schema.NamedObject
      extended by org.ws4d.java.schema.AttributeGroup
All Implemented Interfaces:
SchemaConstants, Any

public class AttributeGroup
extends NamedObject

Class for attributes groups.


Field Summary
 
Fields inherited from interface org.ws4d.java.schema.Any
ATTRIBUTE_NAME, ATTRIBUTE_TYPE, ATTRIBUTE_VALUE_FALSE, ATTRIBUTE_VALUE_TRUE, TAG_ANY, TAG_ANYATTRIBUTE
 
Fields inherited from interface org.ws4d.java.constants.SchemaConstants
ATTRIBUTE_ABSTRACT, ATTRIBUTE_DEFAULT, ATTRIBUTE_FIXED, ATTRIBUTE_USE, ATTRIBUTE_XSINIL, ATTRIBUTE_XSITYPE, DOCUMENTATION_LANG, ELEMENT_ALL, ELEMENT_CHOICE, ELEMENT_DEFAULT, ELEMENT_FIXED, ELEMENT_MAXOCCURS, ELEMENT_MINOCCURS, ELEMENT_NILLABLE, ELEMENT_PARENT, ELEMENT_RESTRICTIONS, ELEMENT_SEQUENCE, ELEMENT_SUBSTITUTIONS, ELEMENT_UNIONS, FACET_ENUMERATION, FACET_FRACTIONDIGITS, FACET_LENGTH, FACET_MAXEXCLUSIVE, FACET_MAXINCLUSIVE, FACET_MAXLENGTH, FACET_MINEXCLUSIVE, FACET_MININCLUSIVE, FACET_MINLENGTH, FACET_PATTERN, FACET_TOTALDIGITS, FACET_WHITESPACE, LIST_ITEMTYPE, MAXOCCURS_UNBOUNDED, SCHEMA_ANNOTATION, SCHEMA_ANY, SCHEMA_ANYATTRIBUTE, SCHEMA_APP_INFO, SCHEMA_ATTRIBUTE, SCHEMA_ATTRIBUTEFORMDEFAULT, SCHEMA_ATTRIBUTEGROUP, SCHEMA_BASE, SCHEMA_COMPLEXCONTENT, SCHEMA_COMPLEXTYPE, SCHEMA_DOCUMENTATION, SCHEMA_ELEMENT, SCHEMA_ELEMENTFORMDEFAULT, SCHEMA_EXTENSION, SCHEMA_FACETS, SCHEMA_FORM, SCHEMA_GROUP, SCHEMA_IMPORT, SCHEMA_INCLUDE, SCHEMA_ITEMLIST, SCHEMA_ITEMTYPE, SCHEMA_LIST, SCHEMA_LOCATION, SCHEMA_MEMBERTYPES, SCHEMA_NAME, SCHEMA_NAMESPACE, SCHEMA_NONAMESPACESCHEMALOCATION, SCHEMA_NOTATION, SCHEMA_PUBLIC, SCHEMA_QUALIFIED, SCHEMA_REDEFINE, SCHEMA_REF, SCHEMA_RESTRICTION, SCHEMA_SCHEMA, SCHEMA_SIMPLECONTENT, SCHEMA_SIMPLETYPE, SCHEMA_STYPES, SCHEMA_SUBSTITUTIONGROUP, SCHEMA_SYSTEM, SCHEMA_TARGETNAMESPACE, SCHEMA_TYPE, SCHEMA_UNION, SCHEMA_UNQUALIFIED, SCHEMA_VALUE, SCHEMA_VALUEVECTOR, USE_OPTIONAL, USE_PROHIBITED, USE_REQUIRED, XMLSCHEMA_NAMESPACE, XMLSCHEMA_PREFIX, XSD_ALLMODEL, XSD_ANYATTRIBUTE, XSD_ANYELEMENT, XSD_ATTRIBUTE, XSD_ATTRIBUTEGROUP, XSD_CHOICEMODEL, XSD_COMPLEXTYPE, XSD_ELEMENT, XSD_EXTENDEDCOMPLEXCONTENT, XSD_EXTENDEDSIMPLECONTENT, XSD_GROUP, XSD_NOTATION, XSD_RESTRICTEDCOMPLEXCONTENT, XSD_RESTRICTEDSIMPLECONTENT, XSD_RESTRICTEDSIMPLETYPE, XSD_SCHEMA, XSD_SEQUENCEMODEL, XSD_SIMPLETYPE, XSI_NAMESPACE
 
Method Summary
 void addAttribute(Attribute a)
           
 void addAttributeGroup(AttributeGroup g)
          Adds an attribute group to this type.
 Iterator allAttributes()
          Returns the attributes for this type, even from attribute groups.
 void allowAnyAttribute()
          This will add the possibility to add any attribute from other schema to this attribute group.
 Iterator attributeGroups()
          Returns the attribute groups for this type.
 Iterator attributes()
           
 void denyAnyAttribute()
          This will remove the possibility to add any attribute from other schema to this attribute group.
 Attribute getAttribute(QName name)
           
 int getAttributeCount()
           
 AttributeGroup getAttributeGroup(QName name)
          Returns an attribute group by qualified name.
 int getAttributeGroupCount()
          Returns the number of attribute groups for this type.
 QName getName()
          Returns the qualified name.
 org.ws4d.java.schema.Reference getReference()
           
 int getSchemaIdentifier()
           
static int getTotalAttributeGroupCount()
           
 boolean hasAnyAttribute()
          Returns whether this attribute group can contain attributes not defined by the schema.
 boolean isReference()
          Returns true if the element is a reference for another schema object, false otherwise.
 void setName(QName name)
          Sets the qualified name.
 
Methods inherited from class org.ws4d.java.schema.NamedObject
checkNamespace, equals, getParentSchema, hashCode, isAbstract, setAbstract, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getTotalAttributeGroupCount

public static int getTotalAttributeGroupCount()

getSchemaIdentifier

public int getSchemaIdentifier()

hasAnyAttribute

public boolean hasAnyAttribute()
Returns whether this attribute group can contain attributes not defined by the schema.

Returns:
true if any attribute can be added to this attribute group, false otherwise.

allowAnyAttribute

public void allowAnyAttribute()
This will add the possibility to add any attribute from other schema to this attribute group.


denyAnyAttribute

public void denyAnyAttribute()
This will remove the possibility to add any attribute from other schema to this attribute group.


addAttribute

public void addAttribute(Attribute a)

getAttribute

public Attribute getAttribute(QName name)

getAttributeCount

public int getAttributeCount()

attributes

public Iterator attributes()

addAttributeGroup

public void addAttributeGroup(AttributeGroup g)
Adds an attribute group to this type.

Parameters:
g - the attribute group to add.

getAttributeGroup

public AttributeGroup getAttributeGroup(QName name)
Returns an attribute group by qualified name.

Parameters:
name - the qualified name for the attribute group.
Returns:
the attribute group.

getAttributeGroupCount

public int getAttributeGroupCount()
Returns the number of attribute groups for this type.

Returns:
the number of attribute groups for this type.

attributeGroups

public Iterator attributeGroups()
Returns the attribute groups for this type.

Returns:
the attribute groups.

allAttributes

public Iterator allAttributes()
Returns the attributes for this type, even from attribute groups.

Returns:
the attributes.

getName

public QName getName()
Description copied from class: NamedObject
Returns the qualified name.

Overrides:
getName in class NamedObject
Returns:
the qualified name.

setName

public void setName(QName name)
Description copied from class: NamedObject
Sets the qualified name.

Overrides:
setName in class NamedObject
Parameters:
name - the qname to set.

isReference

public boolean isReference()
Returns true if the element is a reference for another schema object, false otherwise.

Returns:
true if the element is a reference for another schema object, false otherwise.

getReference

public org.ws4d.java.schema.Reference getReference()