|
||||||||||
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 org.jbind.xml.schema.cmp.SimpleType org.jbind.xml.schema.cmp.UnionType
Constructor Summary | |
UnionType(ISourceInfo aSourceInfo,
java.lang.String aNamespace,
java.lang.String aName,
java.lang.String aRole,
java.util.Set aFinalTypes)
|
Method Summary | |
void |
accept(IComponentVisitor aVisitor)
Accepts a visitor. |
void |
addMemberType(ISimpleType aSimpleType,
IConstraintViolations aViolations)
|
boolean |
canBeOverloadedBy(IAnyType aType)
Checks if this type can be overloaded by the specified type. |
void |
checkEnclosedConstraints(ICheckContext aContext)
Checks the enclosed constraints. |
ISimpleType |
createRestriction(ISourceInfo aSourceInfo,
java.lang.String aNamespace,
java.lang.String aName,
java.lang.String aRole,
java.util.Set aFinalTypes,
IConstraintViolations aViolations)
Creates a simple type that is a restriction of this type. |
protected IAnyTypeData |
doCreateEmptyData(IDataImpl anImpl)
Creates a data object for the specified implementation. |
IAnyType |
getInstanceType()
Gets the type that instances of this type have. |
java.lang.Class |
getSimpleStorageType()
Gets the simple storage type. |
boolean |
isApplicable(ConstraintType aConstraintType)
Checks if the specified constraint type is applicable to the type. |
boolean |
isInstanceType(IAnyType aType)
Checks if this type is an instance type of the specified type. |
protected boolean |
isUnion()
|
java.util.Iterator |
iterMemberTypes()
|
void |
validate(IConstraintViolations aViolations)
Validates the component. |
Methods inherited from class org.jbind.xml.schema.cmp.SimpleType |
getSimpleContentType, getXPathMethods, isComplex, isExtension, isSimple |
Methods inherited from class org.jbind.xml.schema.cmp.AbstractType |
addDirectSubtype, addFinalType, checkConstraints, createData, createEmptyData, createUncheckedData, getAttrDesc, getAttributesModel, getBaseType, getConstraints, getContentModel, getDataCreator, getDirectSubtypes, getElemDesc, getRoleName, getSubtypes, getSymbolspace, isAbstract, isActive, isActive, isBaseType, isExtension, isReference, isRestriction, setAttributesModel, setBaseType, setConstraints, setContentModel, setDataCreator |
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, checkConstraints, createData, createEmptyData, createUncheckedData, getAttrDesc, getAttributesModel, getBaseType, getConstraints, getContentModel, getDataCreator, getDirectSubtypes, getElemDesc, getRoleName, getSimpleContentType, getSubtypes, getXPathMethods, isAbstract, isActive, isActive, isBaseType, isComplex, isExtension, isExtension, 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 |
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 UnionType(ISourceInfo aSourceInfo, java.lang.String aNamespace, java.lang.String aName, java.lang.String aRole, java.util.Set aFinalTypes)
Method Detail |
public final boolean isApplicable(ConstraintType aConstraintType)
ISimpleType
isApplicable
in interface ISimpleType
aConstraintType
- (required).
true
iff the constraint type is applicable on
the type.public void addMemberType(ISimpleType aSimpleType, IConstraintViolations aViolations)
public java.util.Iterator iterMemberTypes()
iterMemberTypes
in interface IUnionType
public void validate(IConstraintViolations aViolations)
IComponent
validate
in interface IComponent
validate
in class AbstractType
protected IAnyTypeData doCreateEmptyData(IDataImpl anImpl) throws XmlException
If an overloading type is specified then it is validated that the overloading type is contained in the member types. The overloading type is then used to create an unchecked data object.
If no overloading type is specified then a member type is looked for that can create a checked data object without constraint violations. If such a type is found then the created data object is returned. Otherwise it is tried to find a type that can create an unchecked data object. If such a type is found then the created data object is returned.
doCreateEmptyData
in class AbstractType
anImpl
- (required).
XmlException
- Description of the Exceptionpublic boolean canBeOverloadedBy(IAnyType aType)
IAnyType
canBeOverloadedBy
in interface IAnyType
canBeOverloadedBy
in class AbstractType
public boolean isInstanceType(IAnyType aType)
IAnyType
isInstanceType
in interface IAnyType
isInstanceType
in class AbstractType
public IAnyType getInstanceType()
IAnyType
getInstanceType
in interface IAnyType
public void checkEnclosedConstraints(ICheckContext aContext)
IAnyType
checkEnclosedConstraints
in interface IAnyType
aContext
- (required).public void accept(IComponentVisitor aVisitor) throws XmlException
IComponent
visitComplexTypeStart
and visitComplexTypeEnd
).
accept
in interface IComponent
aVisitor
- (required).
XmlException
public ISimpleType createRestriction(ISourceInfo aSourceInfo, java.lang.String aNamespace, java.lang.String aName, java.lang.String aRole, java.util.Set aFinalTypes, IConstraintViolations aViolations)
ISimpleType
createRestriction
in interface ISimpleType
public java.lang.Class getSimpleStorageType()
IAnyType
null
.
getSimpleStorageType
in interface IAnyType
protected boolean isUnion()
isUnion
in class AbstractType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |