org.jbind.xml.schema.cmp
Class ComplexType

java.lang.Object
  extended byorg.jbind.xml.schema.cmp.Component
      extended byorg.jbind.xml.schema.cmp.AbstractType
          extended byorg.jbind.xml.schema.cmp.ComplexType
All Implemented Interfaces:
IAnyType, IComplexType, IComponent, IDefaultAttrCreator, IHasBindingAttributes, IHasLocation, ISourceInfo
Direct Known Subclasses:
ComplexTypeCC, ComplexTypeSC

public abstract class ComplexType
extends AbstractType
implements IComplexType


Constructor Summary
ComplexType(ISourceInfo aSourceInfo, java.lang.String aNamespace, java.lang.String aName, java.lang.String aRole, java.util.Set aFinalTypes, java.util.Set aBlockTypes, boolean anIsAbstract, boolean anIsExtension)
           
 
Method Summary
 void accept(IComponentVisitor aVisitor)
          Accepts a visitor.
 IXPathMethod addXPathMethod(IXPathMethod anXPathMethod)
           
 void addXPathMethods(java.util.Map aMap)
           
 void checkEnclosedConstraints(ICheckContext aContext)
          Checks the enclosed constraints.
 IAttributeImpl createDefaultAttr(IElementImpl anElement, IRef aRef)
          Creates an attribute implementation for a default attribute.
 IAnyType getInstanceType()
          Gets the type that instances of this type have.
 java.lang.Class getSimpleStorageType()
          Gets the simple storage type.
 java.util.Map getXPathMethods()
          Gets the map of XPath methods that are available for this type.
 boolean isExtension()
          Checks if the type was derived by extension from its direct base type.
protected  boolean isUnion()
           
 java.util.Iterator iterDefaultAttrRefs()
          Iterates the references of the attributes with default values.
 
Methods inherited from class org.jbind.xml.schema.cmp.AbstractType
addDirectSubtype, addFinalType, canBeOverloadedBy, checkConstraints, createData, createEmptyData, createUncheckedData, doCreateEmptyData, getAttrDesc, getAttributesModel, getBaseType, getConstraints, getContentModel, getDataCreator, getDirectSubtypes, getElemDesc, getRoleName, getSubtypes, getSymbolspace, isAbstract, isActive, isActive, isBaseType, isExtension, isInstanceType, isReference, isRestriction, setAttributesModel, setBaseType, setConstraints, setContentModel, setDataCreator, 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.type.IAnyType
addDirectSubtype, canBeOverloadedBy, checkConstraints, createData, createEmptyData, createUncheckedData, getAttrDesc, getAttributesModel, getBaseType, getConstraints, getContentModel, getDataCreator, getDirectSubtypes, getElemDesc, getRoleName, getSimpleContentType, getSubtypes, isAbstract, isActive, isActive, isBaseType, isComplex, isExtension, isInstanceType, isRestriction, isSimple, setBaseType, setConstraints, setDataCreator
 
Methods inherited from interface org.jbind.xml.core.cmp.IComponent
addSubComponent, getBindings, getGlobalRef, getName, getNamespace, getParentComponent, getSymbolspace, 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

ComplexType

public ComplexType(ISourceInfo aSourceInfo,
                   java.lang.String aNamespace,
                   java.lang.String aName,
                   java.lang.String aRole,
                   java.util.Set aFinalTypes,
                   java.util.Set aBlockTypes,
                   boolean anIsAbstract,
                   boolean anIsExtension)
Method Detail

isExtension

public boolean isExtension()
Description copied from interface: IAnyType
Checks if the type was derived by extension from its direct base type.

Specified by:
isExtension in interface IAnyType
Returns:
Returns true iff the type was derived by extension from its base type.

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

checkEnclosedConstraints

public void checkEnclosedConstraints(ICheckContext aContext)
Description copied from interface: IAnyType
Checks the enclosed constraints. Depending on the type this method performs the following checks:

Specified by:
checkEnclosedConstraints in interface IAnyType
Parameters:
aContext - (required).

isUnion

protected boolean isUnion()
Specified by:
isUnion in class AbstractType

getSimpleStorageType

public final java.lang.Class getSimpleStorageType()
Description copied from interface: IAnyType
Gets the simple storage type. The simple storage type is the Java type that is used to store the simple values of this type. A simple storage type can either be a primitive type (like int, boolean, float, ...) or a (simple) reference type (like String). Only non-complex types, i.e. atomic types, list types, union types, and restrictions of them have a simple storage type. In particular, complex types with simple content also return null.

Specified by:
getSimpleStorageType in interface IAnyType
Returns:
(optional).

createDefaultAttr

public IAttributeImpl createDefaultAttr(IElementImpl anElement,
                                        IRef aRef)
Description copied from interface: IDefaultAttrCreator
Creates an attribute implementation for a default attribute. The data object of the default attribute is also created.

Specified by:
createDefaultAttr in interface IDefaultAttrCreator
Parameters:
anElement - (required). The element that has the default attribute.
aRef - (required).
Returns:
(optional).

iterDefaultAttrRefs

public java.util.Iterator iterDefaultAttrRefs()
Description copied from interface: IDefaultAttrCreator
Iterates the references of the attributes with default values.

Specified by:
iterDefaultAttrRefs in interface IDefaultAttrCreator
Returns:
(required). An iterator of IRef.

getInstanceType

public IAnyType getInstanceType()
Description copied from interface: IAnyType
Gets the type that instances of this type have. In general a type is also its instance type. In case of union types the instance type is the most specific common base type of all member types of the union.

Specified by:
getInstanceType in interface IAnyType
Returns:
(required).

getXPathMethods

public java.util.Map getXPathMethods()
Description copied from interface: IAnyType
Gets the map of XPath methods that are available for this type.

Specified by:
getXPathMethods in interface IAnyType
Returns:
(required). A map that maps strings to #IXPathMethods.

addXPathMethods

public void addXPathMethods(java.util.Map aMap)

addXPathMethod

public IXPathMethod addXPathMethod(IXPathMethod anXPathMethod)