|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbind.xml.schema.cmp.Component
org.jbind.xml.schema.cmp.AbstractType
Represents a type.
| Constructor Summary | |
AbstractType(ISourceInfo aSourceInfo,
java.lang.String aNamespace,
java.lang.String aName,
java.lang.String aRole,
java.util.Set aFinalTypes,
java.util.Set aBlockTypes,
boolean anIsAbstract)
|
|
| Method Summary | |
void |
addDirectSubtype(IAnyType aType)
Adds a type to the collection of direct subtypes. |
protected void |
addFinalType(FinalType aFinalType)
|
boolean |
canBeOverloadedBy(IAnyType aType)
Checks if this type can be overloaded by the specified type. |
void |
checkConstraints(ICheckContext aContext)
Checks the constraints of this type. |
IAnyTypeData |
createData(IDataImpl anImpl)
Creates a data object for the specified data implementation. |
IAnyTypeData |
createEmptyData(IDataImpl anImpl)
Creates an empty data object for the specified implementation. |
IAnyTypeData |
createUncheckedData(IDataImpl anImpl)
Creates a data object for the specified data implementation. |
protected IAnyTypeData |
doCreateEmptyData(IDataImpl anImpl)
|
IAttrDesc |
getAttrDesc(java.lang.String aNamespace,
java.lang.String aName,
IHasLocation aHasLocation)
Gets an attribute description. |
IAttributesModel |
getAttributesModel()
Gets the attributes model. |
IAnyType |
getBaseType()
Gets the base type. |
IConstraints |
getConstraints()
Gets the constraints imposed on this type. |
IContentModel |
getContentModel()
Gets the content model. |
IDataCreator |
getDataCreator()
Gets the data creator. |
java.util.Collection |
getDirectSubtypes()
Gets the types that are direct subtypes of this type. |
IElemDesc |
getElemDesc(java.lang.String aNamespace,
java.lang.String aName)
Gets an element description. |
java.lang.String |
getRoleName()
Gets the role name of the type. |
java.util.Collection |
getSubtypes()
Recursively collects the subtypes of this type. |
ISymbolspace |
getSymbolspace()
Gets the symbol space. |
boolean |
isAbstract()
Checks if the type is abstract. |
boolean |
isActive(BlockType aBlockType)
Checks if the specified block type is active. |
boolean |
isActive(FinalType aFinalType)
Checks if the specified final type is active. |
boolean |
isBaseType(IAnyType aType)
Checks if this type is a base type of the specified type. |
boolean |
isExtension(IAnyType aType)
Checks if this type is an extension of the specified type. |
boolean |
isInstanceType(IAnyType aType)
Checks if this type is an instance type of the specified type. |
boolean |
isReference()
Checks if this component is defined as a reference to another component. |
boolean |
isRestriction(IAnyType aType)
Checks if this type is a restriction of the specified type. |
protected abstract boolean |
isUnion()
|
void |
setAttributesModel(IAttributesModel anAttributesModel)
|
void |
setBaseType(IAnyType aType)
Sets the base type. |
void |
setConstraints(IConstraints aConstraints)
Sets the constraints. |
void |
setContentModel(IContentModel aContentModel)
|
void |
setDataCreator(IDataCreator aCreator)
Sets the data creator. |
void |
validate(IConstraintViolations aViolations)
Validates the component. |
| 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 |
checkEnclosedConstraints, getInstanceType, getSimpleContentType, getSimpleStorageType, getXPathMethods, isComplex, isExtension, isSimple |
| Methods inherited from interface org.jbind.xml.core.cmp.IComponent |
accept, 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.IHasLocation |
getLocation |
| Methods inherited from interface org.jbind.xml.base.IHasBindingAttributes |
getBindingAttribute, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalStringBindingAttribute, getStringBindingAttribute |
| Constructor Detail |
public AbstractType(ISourceInfo aSourceInfo,
java.lang.String aNamespace,
java.lang.String aName,
java.lang.String aRole,
java.util.Set aFinalTypes,
java.util.Set aBlockTypes,
boolean anIsAbstract)
| Method Detail |
public final IDataCreator getDataCreator()
IAnyType
getDataCreator in interface IAnyTypepublic final void setDataCreator(IDataCreator aCreator)
IAnyType
setDataCreator in interface IAnyTypeaCreator - (optional).public java.lang.String getRoleName()
IAnyType
getRoleName in interface IAnyTypepublic void setBaseType(IAnyType aType)
IAnyType
setBaseType in interface IAnyTypeaType - (required).public IAnyType getBaseType()
IAnyType
getBaseType in interface IAnyTypepublic void addDirectSubtype(IAnyType aType)
IAnyType
addDirectSubtype in interface IAnyTypeaType - (required).public java.util.Collection getDirectSubtypes()
IAnyType
getDirectSubtypes in interface IAnyTypeIAnyType.public java.util.Collection getSubtypes()
IAnyType
getSubtypes in interface IAnyTypeIAnyType.public boolean isBaseType(IAnyType aType)
IAnyType
isBaseType in interface IAnyTypeaType - The type to check. (optional)
true iff this type is a base type of the specified
type.public boolean isAbstract()
IAnyType
isAbstract in interface IAnyTypetrue iff the type is abstract.public ISymbolspace getSymbolspace()
IComponent
getSymbolspace in interface IComponentpublic boolean isActive(FinalType aFinalType)
IAnyType
isActive in interface IAnyTypeaFinalType - (required).
true iff the specified final type is active.public boolean isActive(BlockType aBlockType)
IAnyType
isActive in interface IAnyTypeaBlockType - (required).
true iff the specified block type is active.protected void addFinalType(FinalType aFinalType)
public final IAnyTypeData createData(IDataImpl anImpl)
throws XmlException
IAnyType
createData in interface IAnyTypeanImpl - (required).
XmlException - Raised iff the data object could not be created.
public final IAnyTypeData createUncheckedData(IDataImpl anImpl)
throws XmlException
IAnyType
createUncheckedData in interface IAnyTypeanImpl - (required).
XmlException
public final IAnyTypeData createEmptyData(IDataImpl anImpl)
throws XmlException
IAnyType
In general, the data implementation is not used while creating an empty data object.
The created data object receives its implementation later when its
setImpl method is called. The data implementation is passed
to this method because in case of a union type the textual content of the
implementation is used to decide which member type to instantiate.
The created data object has assigned its type.
createEmptyData in interface IAnyTypeanImpl - (required).
XmlException
protected IAnyTypeData doCreateEmptyData(IDataImpl anImpl)
throws XmlException
XmlExceptionprotected abstract boolean isUnion()
public final void checkConstraints(ICheckContext aContext)
IAnyType
checkConstraints in interface IAnyTypeaContext - (required).public boolean canBeOverloadedBy(IAnyType aType)
IAnyType
canBeOverloadedBy in interface IAnyTypeaType - (required). The overloading type
true iff the specified type can overload this
type.public boolean isInstanceType(IAnyType aType)
IAnyType
isInstanceType in interface IAnyTypeaType - (required).public final IContentModel getContentModel()
IAnyType
getContentModel in interface IAnyTypepublic final void setContentModel(IContentModel aContentModel)
public final IAttributesModel getAttributesModel()
IAnyType
getAttributesModel in interface IAnyTypepublic final void setAttributesModel(IAttributesModel anAttributesModel)
public final IConstraints getConstraints()
IAnyType
getConstraints in interface IAnyTypepublic final void setConstraints(IConstraints aConstraints)
IAnyType
setConstraints in interface IAnyTypeaConstraints - (required).public void validate(IConstraintViolations aViolations)
IComponent
validate in interface IComponentaViolations - (required).public final boolean isExtension(IAnyType aType)
IAnyType
isExtension in interface IAnyTypeaType - (required).
true iff this type is an extension of the specified
type.public final boolean isRestriction(IAnyType aType)
IAnyType
isRestriction in interface IAnyTypeaType - (required).
true iff this type is a restriction of the specified
type.
public IAttrDesc getAttrDesc(java.lang.String aNamespace,
java.lang.String aName,
IHasLocation aHasLocation)
throws XmlException
IAnyType
getAttrDesc in interface IAnyTypeaNamespace - (required).aName - (required).aHasLocation - (optional).
XmlException - Raised iff the specified attribute is not allowed for the
type.
public final IElemDesc getElemDesc(java.lang.String aNamespace,
java.lang.String aName)
throws XmlException
IAnyType
getElemDesc in interface IAnyTypeaNamespace - (required).aName - (required).
XmlException - Raised iff the specified element is not contained in
the type.public boolean isReference()
IComponent
isReference in interface IComponenttrue iff this component is a reference to
another component.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||