org.jbind.xml.schema.cmp
Class AnyType

java.lang.Object
  extended byorg.jbind.xml.schema.cmp.Component
      extended byorg.jbind.xml.schema.cmp.AbstractType
          extended byorg.jbind.xml.schema.cmp.AnyType
All Implemented Interfaces:
IAnyType, IComponent, IHasBindingAttributes, IHasLocation, ISourceInfo

public class AnyType
extends AbstractType
implements IHasLocation


Constructor Summary
AnyType(ISourceInfo aSourceInfo, IDataCreator aDataCreator)
           
 
Method Summary
 void accept(IComponentVisitor aVisitor)
          Accepts a visitor.
 void checkEnclosedConstraints(ICheckContext aContext)
          Checks the enclosed constraints.
 IAnyType getInstanceType()
          Gets the type that instances of this type have.
 ILocation getLocation()
           
 ISimpleType getSimpleContentType()
          Gets the type of the simple content.
 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 isComplex()
          Checks if the type is a complex type.
 boolean isExtension()
          Checks if the type was derived by extension from its direct base type.
 boolean isSimple()
          Checks if the type is a simple type.
protected  boolean isUnion()
           
 
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, 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, isAnonymous, isTopLevelComponent, setBindings, setParentComponent
 
Methods inherited from interface org.jbind.xml.core.cmp.ISourceInfo
getAnnotation, getPrefixToNamespaceMapping
 
Methods inherited from interface org.jbind.xml.base.IHasBindingAttributes
getBindingAttribute, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalStringBindingAttribute, getStringBindingAttribute
 

Constructor Detail

AnyType

public AnyType(ISourceInfo aSourceInfo,
               IDataCreator aDataCreator)
Method Detail

isSimple

public boolean isSimple()
Description copied from interface: IAnyType
Checks if the type is a simple type. Complex types with simple content also return true.

Specified by:
isSimple in interface IAnyType
Returns:
Returns true iff the type is a simple type.

isComplex

public boolean isComplex()
Description copied from interface: IAnyType
Checks if the type is a complex type. Complex type with simple content also return true.

Specified by:
isComplex in interface IAnyType
Returns:
Returns true iff the type is a complex type.

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.

getSimpleContentType

public ISimpleType getSimpleContentType()
Description copied from interface: IAnyType
Gets the type of the simple content. If this type is a simple type then this type itself is returned. If this type is a complex type with simple content then the simple base type of this type is returned. If this type is a complex type with complex content then null is returned.

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

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).

getLocation

public ILocation getLocation()
Specified by:
getLocation in interface IHasLocation
Overrides:
getLocation in class Component

getSimpleStorageType

public 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).

getInstanceType

public final 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.

isUnion

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