|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 IAnyType
public final void setDataCreator(IDataCreator aCreator)
IAnyType
setDataCreator
in interface IAnyType
aCreator
- (optional).public java.lang.String getRoleName()
IAnyType
getRoleName
in interface IAnyType
public void setBaseType(IAnyType aType)
IAnyType
setBaseType
in interface IAnyType
aType
- (required).public IAnyType getBaseType()
IAnyType
getBaseType
in interface IAnyType
public void addDirectSubtype(IAnyType aType)
IAnyType
addDirectSubtype
in interface IAnyType
aType
- (required).public java.util.Collection getDirectSubtypes()
IAnyType
getDirectSubtypes
in interface IAnyType
IAnyType
.public java.util.Collection getSubtypes()
IAnyType
getSubtypes
in interface IAnyType
IAnyType
.public boolean isBaseType(IAnyType aType)
IAnyType
isBaseType
in interface IAnyType
aType
- The type to check. (optional)
true
iff this type is a base type of the specified
type.public boolean isAbstract()
IAnyType
isAbstract
in interface IAnyType
true
iff the type is abstract.public ISymbolspace getSymbolspace()
IComponent
getSymbolspace
in interface IComponent
public boolean isActive(FinalType aFinalType)
IAnyType
isActive
in interface IAnyType
aFinalType
- (required).
true
iff the specified final type is active.public boolean isActive(BlockType aBlockType)
IAnyType
isActive
in interface IAnyType
aBlockType
- (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 IAnyType
anImpl
- (required).
XmlException
- Raised iff the data object could not be created.public final IAnyTypeData createUncheckedData(IDataImpl anImpl) throws XmlException
IAnyType
createUncheckedData
in interface IAnyType
anImpl
- (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 IAnyType
anImpl
- (required).
XmlException
protected IAnyTypeData doCreateEmptyData(IDataImpl anImpl) throws XmlException
XmlException
protected abstract boolean isUnion()
public final void checkConstraints(ICheckContext aContext)
IAnyType
checkConstraints
in interface IAnyType
aContext
- (required).public boolean canBeOverloadedBy(IAnyType aType)
IAnyType
canBeOverloadedBy
in interface IAnyType
aType
- (required). The overloading type
true
iff the specified type can overload this
type.public boolean isInstanceType(IAnyType aType)
IAnyType
isInstanceType
in interface IAnyType
aType
- (required).public final IContentModel getContentModel()
IAnyType
getContentModel
in interface IAnyType
public final void setContentModel(IContentModel aContentModel)
public final IAttributesModel getAttributesModel()
IAnyType
getAttributesModel
in interface IAnyType
public final void setAttributesModel(IAttributesModel anAttributesModel)
public final IConstraints getConstraints()
IAnyType
getConstraints
in interface IAnyType
public final void setConstraints(IConstraints aConstraints)
IAnyType
setConstraints
in interface IAnyType
aConstraints
- (required).public void validate(IConstraintViolations aViolations)
IComponent
validate
in interface IComponent
aViolations
- (required).public final boolean isExtension(IAnyType aType)
IAnyType
isExtension
in interface IAnyType
aType
- (required).
true
iff this type is an extension of the specified
type.public final boolean isRestriction(IAnyType aType)
IAnyType
isRestriction
in interface IAnyType
aType
- (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 IAnyType
aNamespace
- (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 IAnyType
aNamespace
- (required).aName
- (required).
XmlException
- Raised iff the specified element is not contained in
the type.public boolean isReference()
IComponent
isReference
in interface IComponent
true
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 |