org.jbind.xml.schema.cmp
Class ElemDecl
java.lang.Object
org.jbind.xml.schema.cmp.Component
org.jbind.xml.schema.cmp.Content
org.jbind.xml.schema.cmp.ElemDesc
org.jbind.xml.schema.cmp.ElemRefOrDecl
org.jbind.xml.schema.cmp.ElemDecl
- All Implemented Interfaces:
- IComponent, IContentDesc, IDataDesc, IDataRefOrDecl, IDefaultTextContentProvider, IElemDecl, IElemDesc, IElemRefOrDecl, IHasBindingAttributes, IHasLocation, IHasRange, ISourceInfo
- public class ElemDecl
- extends ElemRefOrDecl
- implements IElemDecl
Constructor Summary |
ElemDecl(ISourceInfo aSourceInfo,
java.lang.String aNamespace,
java.lang.String aName,
IRange aRange,
java.util.Set aFinalTypes,
java.util.Set aBlockTypes,
boolean anIsAbstract,
boolean anIsNillable)
|
Methods inherited from class org.jbind.xml.schema.cmp.ElemRefOrDecl |
add, checkIdentityConstraints, collectElemDescs, createUseState, doAddToParentWithNewRange, getDefault, getDefaultTextContent, getFixed, getRange, getSymbolspace, iterIdentityConstraints, replaceSubstitutions, validate |
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.cmp.IComponent |
addSubComponent, getBindings, getGlobalRef, getName, getNamespace, getParentComponent, getSymbolspace, isAnonymous, isTopLevelComponent, setBindings, setParentComponent, validate |
ElemDecl
public ElemDecl(ISourceInfo aSourceInfo,
java.lang.String aNamespace,
java.lang.String aName,
IRange aRange,
java.util.Set aFinalTypes,
java.util.Set aBlockTypes,
boolean anIsAbstract,
boolean anIsNillable)
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
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).
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)
getSubstitutionGroup
public IElemDecl getSubstitutionGroup()
- Specified by:
getSubstitutionGroup
in interface IElemRefOrDecl
setSubstitutionGroup
public void setSubstitutionGroup(IElemDecl aContent)
- Specified by:
setSubstitutionGroup
in interface IElemDecl
isNillable
public boolean isNillable()
- Specified by:
isNillable
in interface IElemDesc
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interface IElemDesc
addSubstitute
public void addSubstitute(IElemDecl aDecl)
- Description copied from interface:
IElemDecl
- Adds a declaration that can substitute this declaration. If the added
declaration has a minOccurs or a maxOccurs that is different from 1 then
a new
IElemRef
is created with its minOccurs and maxOccurs
equal to one.
- Specified by:
addSubstitute
in interface IElemDecl
- Parameters:
aDecl
- (required). The substituting declaration.
getSubstitute
public IElemRefOrDecl getSubstitute(java.lang.String aNamespace,
java.lang.String aName)
- Description copied from interface:
IElemRefOrDecl
- Gets an element declaration that can be substituted for this element declaration.
- Specified by:
getSubstitute
in interface IElemRefOrDecl
- Parameters:
aNamespace
- (required). The namespace of the substituting declaration.aName
- (required). The name of the substituting declaration.
- Returns:
- (optional).
iterSubstitutes
public java.util.Iterator iterSubstitutes()
- Description copied from interface:
IElemRefOrDecl
- Iterates the possible substitutes for this declaration.
- Specified by:
iterSubstitutes
in interface IElemRefOrDecl
- Returns:
- (required). An iterator of
IElemRefOrDecl
.
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.
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.
addValueConstraints
public void addValueConstraints(java.lang.String aDefault,
java.lang.String aFixed,
IConstraintViolations aViolations)
- Specified by:
addValueConstraints
in interface IDataRefOrDecl
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.