com.sun.xml.xsom.impl
Class AttributesHolder

java.lang.Object
  extended by com.sun.xml.xsom.impl.ComponentImpl
      extended by com.sun.xml.xsom.impl.AttributesHolder
All Implemented Interfaces:
XSComponent, XSDeclaration
Direct Known Subclasses:
AttGroupDeclImpl, ComplexTypeImpl

public abstract class AttributesHolder
extends ComponentImpl


Field Summary
protected  Set<Ref.AttGroup> attGroups
          Ref.AttGroups that are directly refered from this.
protected  Map<UName,AttributeUseImpl> attributes
          Local attribute use.
protected  Set<UName> prohibitedAtts
          prohibited attributes.
 
Fields inherited from class com.sun.xml.xsom.impl.ComponentImpl
ownerDocument
 
Constructor Summary
protected AttributesHolder(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous)
           
 
Method Summary
 void addAttGroup(Ref.AttGroup a)
           
 void addAttributeUse(UName name, AttributeUseImpl a)
           
 void addProhibitedAttribute(UName name)
           
 Set<XSAttGroupDecl> getAttGroups()
           
 Collection<XSAttributeUse> getAttributeUses()
          Returns the attribute uses by looking at attribute groups and etc.
 XSAttributeUse getDeclaredAttributeUse(String nsURI, String localName)
           
 Collection<AttributeUseImpl> getDeclaredAttributeUses()
           
 String getName()
          Gets the (local) name of the declaration.
 String getTargetNamespace()
          Target namespace to which this component belongs.
 boolean isAnonymous()
          Deprecated.  
 boolean isGlobal()
          Returns true if this declaration is a global declaration.
 boolean isLocal()
          Returns true if this declaration is a local declaration.
 Iterator<XSAttGroupDecl> iterateAttGroups()
           
 Iterator<XSAttributeUse> iterateAttributeUses()
           
 Iterator<AttributeUseImpl> iterateDeclaredAttributeUses()
           
abstract  void setWildcard(WildcardImpl wc)
          set the local wildcard.
 
Methods inherited from class com.sun.xml.xsom.impl.ComponentImpl
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.xml.xsom.XSComponent
apply, getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, visit
 

Field Detail

attributes

protected final Map<UName,AttributeUseImpl> attributes
Local attribute use. Use linked hash map to guarantee the iteration order, and make it close to what was in the schema document.


prohibitedAtts

protected final Set<UName> prohibitedAtts
prohibited attributes.


attGroups

protected final Set<Ref.AttGroup> attGroups
Ref.AttGroups that are directly refered from this.

Constructor Detail

AttributesHolder

protected AttributesHolder(SchemaDocumentImpl _parent,
                           AnnotationImpl _annon,
                           Locator loc,
                           ForeignAttributesImpl _fa,
                           String _name,
                           boolean _anonymous)
Method Detail

setWildcard

public abstract void setWildcard(WildcardImpl wc)
set the local wildcard.


addAttributeUse

public void addAttributeUse(UName name,
                            AttributeUseImpl a)

addProhibitedAttribute

public void addProhibitedAttribute(UName name)

getAttributeUses

public Collection<XSAttributeUse> getAttributeUses()
Returns the attribute uses by looking at attribute groups and etc. Searching for the base type is done in ComplexTypeImpl.


iterateAttributeUses

public Iterator<XSAttributeUse> iterateAttributeUses()

getDeclaredAttributeUse

public XSAttributeUse getDeclaredAttributeUse(String nsURI,
                                              String localName)

iterateDeclaredAttributeUses

public Iterator<AttributeUseImpl> iterateDeclaredAttributeUses()

getDeclaredAttributeUses

public Collection<AttributeUseImpl> getDeclaredAttributeUses()

addAttGroup

public void addAttGroup(Ref.AttGroup a)

iterateAttGroups

public Iterator<XSAttGroupDecl> iterateAttGroups()

getAttGroups

public Set<XSAttGroupDecl> getAttGroups()

getName

public String getName()
Description copied from interface: XSDeclaration
Gets the (local) name of the declaration.

Specified by:
getName in interface XSDeclaration
Returns:
null if this component is anonymous.

getTargetNamespace

public String getTargetNamespace()
Description copied from interface: XSDeclaration
Target namespace to which this component belongs. "" is used to represent the default no namespace.

Specified by:
getTargetNamespace in interface XSDeclaration

isAnonymous

public boolean isAnonymous()
Deprecated. 

Specified by:
isAnonymous in interface XSDeclaration

isGlobal

public final boolean isGlobal()
Description copied from interface: XSDeclaration
Returns true if this declaration is a global declaration. Global declarations are those declaration that can be enumerated through the schema object.

Specified by:
isGlobal in interface XSDeclaration

isLocal

public final boolean isLocal()
Description copied from interface: XSDeclaration
Returns true if this declaration is a local declaration. Equivalent of !isGlobal()

Specified by:
isLocal in interface XSDeclaration


Copyright © 2012 Oracle. All Rights Reserved.