org.jbind.xml.schema.cmp
Class AttrDecl

java.lang.Object
  extended byorg.jbind.xml.schema.cmp.Component
      extended byorg.jbind.xml.schema.cmp.AttrDesc
          extended byorg.jbind.xml.schema.cmp.AttrRefOrDecl
              extended byorg.jbind.xml.schema.cmp.AttrDecl
All Implemented Interfaces:
IAttrDecl, IAttrDesc, IAttrRefOrDecl, IComponent, IDataDesc, IDataRefOrDecl, IDefaultTextContentProvider, IHasBindingAttributes, IHasLocation, ISourceInfo

public class AttrDecl
extends AttrRefOrDecl
implements IAttrDecl


Field Summary
 
Fields inherited from class org.jbind.xml.schema.cmp.AttrRefOrDecl
myDefault, myFixed
 
Constructor Summary
AttrDecl(ISourceInfo aSourceInfo, AttributeOccurence anOccurence, java.lang.String aNamespace, java.lang.String aName)
           
 
Method Summary
 void accept(IComponentVisitor aVisitor)
          Accepts a visitor.
 void addValueConstraints(java.lang.String aDefault, java.lang.String aFixed, IConstraintViolations aViolations)
           
 IAnyType getType()
          Gets the data type.
 boolean hasDefaultType()
          Indicates if the attribute declaration has an explicitly assigned type or if it got the "anySimpleType" by default.
 boolean isReference()
          Checks if this component is defined as a reference to another component.
 void setHasDefaultType()
           
 void setType(IAnyType aType)
           
 
Methods inherited from class org.jbind.xml.schema.cmp.AttrRefOrDecl
getDefault, getFixed, getOccurence, validate
 
Methods inherited from class org.jbind.xml.schema.cmp.AttrDesc
checkValueConstraints, createData, createEmptyData, createUncheckedData, getDefaultTextContent, getSymbolspace, isActive, isActive
 
Methods inherited from class org.jbind.xml.schema.cmp.Component
addSubComponent, getAnnotation, getBindingAttribute, getBindings, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getGlobalRef, getLocalBindingAttribute, getLocalStringBindingAttribute, getLocation, getName, getNamespace, getParentComponent, getPrefixToNamespaceMapping, getStringBindingAttribute, isAnonymous, isTopLevelComponent, setBindings, setParentComponent, visitSubComponents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.core.content.IAttrRefOrDecl
getOccurence
 
Methods inherited from interface org.jbind.xml.core.content.IDataDesc
checkValueConstraints, createData, createEmptyData, createUncheckedData, getDefault, getFixed, isActive, isActive
 
Methods inherited from interface org.jbind.xml.core.bridge.IDefaultTextContentProvider
getDefaultTextContent
 
Methods inherited from interface org.jbind.xml.core.cmp.IComponent
addSubComponent, getBindings, getGlobalRef, getName, getNamespace, getParentComponent, getSymbolspace, isAnonymous, isTopLevelComponent, setBindings, setParentComponent, validate
 
Methods inherited from interface org.jbind.xml.core.cmp.ISourceInfo
getAnnotation, getPrefixToNamespaceMapping
 
Methods inherited from interface org.jbind.xml.base.IHasLocation
getLocation
 
Methods inherited from interface org.jbind.xml.base.IHasBindingAttributes
getBindingAttribute, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalStringBindingAttribute, getStringBindingAttribute
 

Constructor Detail

AttrDecl

public AttrDecl(ISourceInfo aSourceInfo,
                AttributeOccurence anOccurence,
                java.lang.String aNamespace,
                java.lang.String aName)
Method Detail

accept

public void accept(IComponentVisitor aVisitor)
            throws XmlException
Description copied from interface: IComponent
Accepts a visitor. The implementation calls the corresponding visitXXXStart and vistXXXEnd methods of the visitor (e.g. visitComplexTypeStart and visitComplexTypeEnd).

Specified by:
accept in interface IComponent
Parameters:
aVisitor - (required).
Throws:
XmlException

setHasDefaultType

public void setHasDefaultType()

hasDefaultType

public boolean hasDefaultType()
Description copied from interface: IAttrRefOrDecl
Indicates if the attribute declaration has an explicitly assigned type or if it got the "anySimpleType" by default.

Specified by:
hasDefaultType in interface IAttrRefOrDecl
Returns:
Returns true iff the declaration got the default type.

getType

public IAnyType getType()
Description copied from interface: IDataDesc
Gets the data type.

Specified by:
getType in interface IDataDesc
Returns:
(required).

setType

public void setType(IAnyType aType)

isReference

public boolean isReference()
Description copied from interface: IComponent
Checks if this component is defined as a reference to another component.

Specified by:
isReference in interface IComponent
Returns:
Returns true iff this component is a reference to another component.

addValueConstraints

public void addValueConstraints(java.lang.String aDefault,
                                java.lang.String aFixed,
                                IConstraintViolations aViolations)
Specified by:
addValueConstraints in interface IDataRefOrDecl