org.jbind.xml.schema.cmp
Class AttrDesc

java.lang.Object
  extended byorg.jbind.xml.schema.cmp.Component
      extended byorg.jbind.xml.schema.cmp.AttrDesc
All Implemented Interfaces:
IAttrDesc, IComponent, IDataDesc, IDefaultTextContentProvider, IHasBindingAttributes, IHasLocation, ISourceInfo
Direct Known Subclasses:
AttrRefOrDecl, AttrWildcard

public abstract class AttrDesc
extends Component
implements IAttrDesc


Constructor Summary
AttrDesc(ISourceInfo aSourceInfo, java.lang.String aNamespace, java.lang.String aName)
           
 
Method Summary
 void checkValueConstraints(IAnyTypeData aData)
           
 IAnyTypeData createData(IDataImpl anImpl, IAnyType anOverloadingType)
          Creates a data object.
 IAnyTypeData createEmptyData(IDataImpl anImpl, IAnyType anOverloadingType)
           
 IAnyTypeData createUncheckedData(IDataImpl anImpl, IAnyType anOverloadingType)
           
 java.lang.String getDefaultTextContent()
           
 ISymbolspace getSymbolspace()
          Gets the symbol space.
 boolean isActive(BlockType aBlockType)
          Checks if the specified block type is active for the declaration.
 boolean isActive(FinalType aFinalType)
          Checks if the specified final type is active for the declaration.
 
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.IDataDesc
getDefault, getFixed, getType
 
Methods inherited from interface org.jbind.xml.core.cmp.IComponent
accept, addSubComponent, getBindings, getGlobalRef, getName, getNamespace, getParentComponent, isAnonymous, isReference, 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

AttrDesc

public AttrDesc(ISourceInfo aSourceInfo,
                java.lang.String aNamespace,
                java.lang.String aName)
Method Detail

isActive

public boolean isActive(BlockType aBlockType)
Description copied from interface: IDataDesc
Checks if the specified block type is active for the declaration.

Specified by:
isActive in interface IDataDesc
Parameters:
aBlockType - (required).
Returns:
Returns true iff the specified block type is active.

isActive

public boolean isActive(FinalType aFinalType)
Description copied from interface: IDataDesc
Checks if the specified final type is active for the declaration. Controls whether the declaration can be the head of a substitution group.

Specified by:
isActive in interface IDataDesc
Returns:
Returns true iff the specified block type is active.

getSymbolspace

public ISymbolspace getSymbolspace()
Description copied from interface: IComponent
Gets the symbol space. A component that is not anonymous has a symbol space.

Specified by:
getSymbolspace in interface IComponent
Returns:
(optional).

getDefaultTextContent

public java.lang.String getDefaultTextContent()
Specified by:
getDefaultTextContent in interface IDefaultTextContentProvider

createData

public final IAnyTypeData createData(IDataImpl anImpl,
                                     IAnyType anOverloadingType)
                              throws XmlException
Description copied from interface: IDataDesc
Creates a data object. Delegates the creation of the data object to either the type of the declaration or to the overloading type.

If an overloading type is specified then it is checked if it is a valid overloading.

If the data implementation has no textual content and the declaration has a default value then the default value is used. If the declaration has a fixed value then the created data object is checked for the fixed value. In addition the created data object is marked as being fixed.

Specified by:
createData in interface IDataDesc
Parameters:
anImpl - (required).
anOverloadingType - (optional).
Returns:
(required).
Throws:
XmlException - Raised if no (locally) valid data object could have been created.

createEmptyData

public final IAnyTypeData createEmptyData(IDataImpl anImpl,
                                          IAnyType anOverloadingType)
                                   throws XmlException
Specified by:
createEmptyData in interface IDataDesc
Throws:
XmlException

createUncheckedData

public final IAnyTypeData createUncheckedData(IDataImpl anImpl,
                                              IAnyType anOverloadingType)
                                       throws XmlException
Specified by:
createUncheckedData in interface IDataDesc
Throws:
XmlException

checkValueConstraints

public final void checkValueConstraints(IAnyTypeData aData)
                                 throws XmlException
Specified by:
checkValueConstraints in interface IDataDesc
Throws:
XmlException