org.jbind.xml.core.cmp
Interface IComponent

All Superinterfaces:
IHasBindingAttributes, IHasLocation, ISourceInfo
All Known Subinterfaces:
IAllDecl, IAllDesc, IAllRef, IAnySimpleType, IAnyType, IAtomicType, IAttrDecl, IAttrDesc, IAttrGroupDecl, IAttrGroupDesc, IAttrGroupRef, IAttrRef, IAttrRefOrDecl, IAttrWildcard, IChoiceDecl, IChoiceDesc, IChoiceRef, IComplexCCType, IComplexSCType, IComplexType, IContentDesc, IDataRefOrDecl, IElemDecl, IElemDesc, IElementIdentityConstraint, IElementInstanceConstraint, IElementKeyConstraint, IElementKeyRefConstraint, IElementUniqueConstraint, IElemGroupDecl, IElemGroupDesc, IElemGroupRef, IElemRef, IElemRefOrDecl, IElemWildcard, IIdentityConstraintComponent, IListType, INotation, IRestrictedSimpleType, ISequenceDecl, ISequenceDesc, ISequenceRef, ISimpleType, ITypeIdentityConstraint, ITypeInstanceConstraint, ITypeKeyConstraint, ITypeKeyRefConstraint, ITypeUniqueConstraint, IUnionType
All Known Implementing Classes:
AbstractListType, AbstractType, AllDecl, AttrDecl, AttrDesc, AttrGroupDecl, AttrGroupRef, AttrRef, AttrRefOrDecl, AttrWildcard, BuiltInAtomicType, BuiltInSimpleType, ChoiceDecl, ComplexType, ComplexTypeCC, ComplexTypeSC, Component, Content, ElemDecl, ElemDesc, ElementIdentityConstraint, ElementKeyConstraint, ElementKeyRefConstraint, ElementUniqueConstraint, ElemGroupDesc, ElemRef, ElemRefOrDecl, ElemWildcard, IdentityConstraintComponent, Notation, RestrictedAtomicType, RestrictedListType, RestrictedSimpleType, RestrictedUnionType, SequenceDecl, SimpleType, TypeInstanceConstraint, TypeKeyConstraint, TypeKeyRefConstraint, TypeUniqueConstraint, UnionType

public interface IComponent
extends ISourceInfo


Method Summary
 void accept(IComponentVisitor aVisitor)
          Accepts a visitor.
 void addSubComponent(IComponent aComponent)
           
 IBinding[] getBindings()
           
 IRef getGlobalRef()
          Gets the reference that identifies the component.
 java.lang.String getName()
          Gets the name.
 java.lang.String getNamespace()
          Gets the namespace.
 IComponent getParentComponent()
           
 ISymbolspace getSymbolspace()
          Gets the symbol space.
 boolean isAnonymous()
          Checks if the component is anonymous.
 boolean isReference()
          Checks if this component is defined as a reference to another component.
 boolean isTopLevelComponent()
          Checks if the component is a top level component.
 void setBindings(IBinding[] aBindings)
           
 void setParentComponent(IComponent aComponent)
           
 void validate(IConstraintViolations aViolations)
          Validates the component.
 
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
 

Method Detail

getName

public java.lang.String getName()
Gets the name.

Returns:
(optional). A component that is not anonymous has a name.

getSymbolspace

public ISymbolspace getSymbolspace()
Gets the symbol space. A component that is not anonymous has a symbol space.

Returns:
(optional).

getNamespace

public java.lang.String getNamespace()
Gets the namespace. A component that is not anonymous has a namespace.


getGlobalRef

public IRef getGlobalRef()
Gets the reference that identifies the component. This method may only be called if the component is not anonymous.

Returns:
A global reference. (required)

isAnonymous

public boolean isAnonymous()
Checks if the component is anonymous.

Returns:
Returns true iff the component is anonymous.

isTopLevelComponent

public boolean isTopLevelComponent()
Checks if the component is a top level component. Top level components are direct children of a schema element or of a redefine element.

Specified by:
isTopLevelComponent in interface ISourceInfo
Returns:
Returns true iff this component is a top level component.

validate

public void validate(IConstraintViolations aViolations)
Validates the component. This method is called as the last step of the component construction.

Parameters:
aViolations - (required).

accept

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

Parameters:
aVisitor - (required).
Throws:
XmlException

isReference

public boolean isReference()
Checks if this component is defined as a reference to another component.

Returns:
Returns true iff this component is a reference to another component.

getBindings

public IBinding[] getBindings()

setBindings

public void setBindings(IBinding[] aBindings)

getParentComponent

public IComponent getParentComponent()

setParentComponent

public void setParentComponent(IComponent aComponent)

addSubComponent

public void addSubComponent(IComponent aComponent)