org.jbind.xml.schema.cmp
Class ElemRef
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.ElemRef
- All Implemented Interfaces:
- IComponent, IContentDesc, IDataDesc, IDataRefOrDecl, IDefaultTextContentProvider, IElemDesc, IElemRef, IElemRefOrDecl, IHasBindingAttributes, IHasLocation, IHasRange, ISourceInfo
- public class ElemRef
- extends ElemRefOrDecl
- implements IElemRef
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, getBindings, getDefaultedLocalStringBindingAttribute, getGlobalRef, 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 |
ElemRef
public ElemRef(ISourceInfo aSourceInfo,
IRange aRange,
IElemRefOrDecl anElemRefOrDecl)
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).
addValueConstraints
public void addValueConstraints(java.lang.String aDefault,
java.lang.String aFixed,
IConstraintViolations aViolations)
- Specified by:
addValueConstraints
in interface IDataRefOrDecl
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).
getType
public IAnyType getType()
- Description copied from interface:
IDataDesc
- Gets the data type.
- Specified by:
getType
in interface IDataDesc
- Returns:
- (required).
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interface IElemDesc
isNillable
public boolean isNillable()
- Specified by:
isNillable
in interface IElemDesc
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.
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
.
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.
getSubstitutionGroup
public IElemDecl getSubstitutionGroup()
- Specified by:
getSubstitutionGroup
in interface IElemRefOrDecl
getBindingAttribute
public IAttribute getBindingAttribute(java.lang.String aName)
- Description copied from interface:
IHasBindingAttributes
- Gets the specified binding attribute. The attribute may be searched in different
contexts (for example a schema component may asked its ancestor component
and its schema for the specified attribute. The the first occurence is returned.
- Specified by:
getBindingAttribute
in interface IHasBindingAttributes
- Overrides:
getBindingAttribute
in class Component
getLocalBindingAttribute
public IAttribute getLocalBindingAttribute(java.lang.String aName)
- Description copied from interface:
IHasBindingAttributes
- Gets a local binding attribute.
- Specified by:
getLocalBindingAttribute
in interface IHasBindingAttributes
- Overrides:
getLocalBindingAttribute
in class Component
getDefaultedLocalBindingAttribute
public IAttribute getDefaultedLocalBindingAttribute(java.lang.String aName)
- Description copied from interface:
IHasBindingAttributes
- Gets a local binding attribute. If the binding attribute is not
specified locally then a default value is looked for.
Default values can be specified on schema elements. If a schema is included
by another schema then the default values of the parent schema are considered too.
- Specified by:
getDefaultedLocalBindingAttribute
in interface IHasBindingAttributes
- Overrides:
getDefaultedLocalBindingAttribute
in class Component