org.jbind.xml.schema.cmp
Class ElemWildcard

java.lang.Object
  extended byorg.jbind.xml.schema.cmp.Component
      extended byorg.jbind.xml.schema.cmp.Content
          extended byorg.jbind.xml.schema.cmp.ElemDesc
              extended byorg.jbind.xml.schema.cmp.ElemWildcard
All Implemented Interfaces:
IComponent, IContentDesc, IDataDesc, IDefaultTextContentProvider, IElemDesc, IElemWildcard, IHasBindingAttributes, IHasLocation, IHasRange, IPartWildcard, ISourceInfo

public class ElemWildcard
extends ElemDesc
implements IElemWildcard


Constructor Summary
ElemWildcard(ISourceInfo aSourceInfo, IRange aRange, IWildcard aWildcard)
           
 
Method Summary
 void accept(IComponentVisitor aVisitor)
          Accepts a visitor.
 void checkIdentityConstraints(IAnyTypeData aData, IKeyStore anElementKeys, IConstraintViolations aViolations)
           
 void collectElemDescs(java.util.Map anElementDecls, java.util.List anElemWildcards, IConstraintViolations aViolations)
          Recursively collects the element descriptions that are contained in this content object.
 IUseState createUseState(IUseState aParent)
           
protected  void doAddToParentWithNewRange(IRange aRange, IElemGroupDesc aParent)
           
 ISimpleData getDefault()
          Gets the default value.
 java.lang.String getDefaultTextContent()
           
 java.lang.String getDesc()
          Gets a description that is output if the content was not matched when an instance is read in.
 ISimpleData getFixed()
          Gets the fixed value.
 IRange getRange(IRef aRef)
          Gets the range of possible occurences of the specified element in this use (and all of its nested subuses).
 ISymbolspace getSymbolspace()
          Gets the symbol space.
 IAnyType getType()
          Gets the data type.
 IWildcard getWildcard()
           
 boolean isAbstract()
           
 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.
 boolean isNillable()
           
 boolean isReference()
          Checks if this component is defined as a reference to another component.
 void replaceSubstitutions(IElemGroupDesc aParent)
          Recursively adds this content use to the parent group use.
 void validate(IConstraintViolations aViolations)
          Validates the component.
 
Methods inherited from class org.jbind.xml.schema.cmp.ElemDesc
addToParent, checkValueConstraints, createData, createEmptyData, createUncheckedData, createUseStateProxy
 
Methods inherited from class org.jbind.xml.schema.cmp.Content
getMaxOccurs, getMinOccurs, getRange, isEmptiable, isUnbounded
 
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.IContentDesc
addToParent, createUseStateProxy, getMaxOccurs, getMinOccurs, isEmptiable, isUnbounded
 
Methods inherited from interface org.jbind.xml.core.cmp.IComponent
addSubComponent, getBindings, getGlobalRef, getName, getNamespace, getParentComponent, isAnonymous, isTopLevelComponent, setBindings, setParentComponent
 
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
 
Methods inherited from interface org.jbind.xml.base.IHasRange
getRange
 
Methods inherited from interface org.jbind.xml.core.content.IDataDesc
checkValueConstraints, createData, createEmptyData, createUncheckedData
 

Constructor Detail

ElemWildcard

public ElemWildcard(ISourceInfo aSourceInfo,
                    IRange aRange,
                    IWildcard aWildcard)
Method Detail

getWildcard

public IWildcard getWildcard()
Specified by:
getWildcard in interface IElemWildcard

createUseState

public IUseState createUseState(IUseState aParent)
Specified by:
createUseState in interface IContentDesc

getDesc

public java.lang.String getDesc()
Description copied from interface: IContentDesc
Gets a description that is output if the content was not matched when an instance is read in.

Specified by:
getDesc in interface IContentDesc
Returns:
(required).

getRange

public IRange getRange(IRef aRef)
Description copied from interface: IContentDesc
Gets the range of possible occurences of the specified element in this use (and all of its nested subuses).

Specified by:
getRange in interface IContentDesc
Returns:
(required).

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

getType

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

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

getDefault

public ISimpleData getDefault()
Description copied from interface: IDataDesc
Gets the default value. If a fixed value is specified then it is also returned as the default value.

Specified by:
getDefault in interface IDataDesc
Returns:
(optional).

getFixed

public ISimpleData getFixed()
Description copied from interface: IDataDesc
Gets the fixed value. If a fixed value is specified then it is also returned as the default value.

Specified by:
getFixed in interface IDataDesc
Returns:
(optional).

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.

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

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.

validate

public void validate(IConstraintViolations aViolations)
Description copied from interface: IComponent
Validates the component. This method is called as the last step of the component construction.

Specified by:
validate in interface IComponent
Parameters:
aViolations - (required).

collectElemDescs

public void collectElemDescs(java.util.Map anElementDecls,
                             java.util.List anElemWildcards,
                             IConstraintViolations aViolations)
Description copied from interface: IContentDesc
Recursively collects the element descriptions that are contained in this content object. Element declarations with the same name and namespace must have the same type as well as the same fixed/default values.

Specified by:
collectElemDescs in interface IContentDesc
Parameters:
anElementDecls - (required). Maps IRefs to IElemRefOrDecl.
anElemWildcards - (required). Collects the element wildcards.
aViolations - (required).

replaceSubstitutions

public void replaceSubstitutions(IElemGroupDesc aParent)
Description copied from interface: IContentDesc
Recursively adds this content use to the parent group use. Elements that can be substituted are replaced by corresponding choice groups.

Specified by:
replaceSubstitutions in interface IContentDesc
Parameters:
aParent - (required). The group use to which content uses are added.

doAddToParentWithNewRange

protected void doAddToParentWithNewRange(IRange aRange,
                                         IElemGroupDesc aParent)
Specified by:
doAddToParentWithNewRange in class ElemDesc

checkIdentityConstraints

public void checkIdentityConstraints(IAnyTypeData aData,
                                     IKeyStore anElementKeys,
                                     IConstraintViolations aViolations)
Specified by:
checkIdentityConstraints in interface IElemDesc

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface IElemDesc

isNillable

public boolean isNillable()
Specified by:
isNillable in interface IElemDesc