Class ModelElementTypeImpl
- java.lang.Object
-
- org.camunda.bpm.model.xml.impl.type.ModelElementTypeImpl
-
- All Implemented Interfaces:
ModelElementType
public class ModelElementTypeImpl extends java.lang.Object implements ModelElementType
- Author:
- Daniel Meyer
-
-
Constructor Summary
Constructors Constructor Description ModelElementTypeImpl(ModelImpl model, java.lang.String name, java.lang.Class<? extends ModelElementInstance> instanceType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ModelElementInstancecreateModelElementInstance(ModelTypeInstanceContext instanceContext)booleanequals(java.lang.Object obj)java.util.Collection<Attribute<?>>getAllAttributes()Returns a list of all attributes, including the attributes of all base types.java.util.List<ChildElementCollection<?>>getAllChildElementCollections()java.util.List<ModelElementType>getAllChildElementTypes()java.util.Collection<ModelElementType>getAllExtendingTypes()Attribute<?>getAttribute(java.lang.String attributeName)Return the attribute for the attribute namejava.util.List<Attribute<?>>getAttributes()ModelElementTypegetBaseType()ChildElementCollection<?>getChildElementCollection(ModelElementType childElementType)java.util.List<ChildElementCollection<?>>getChildElementCollections()java.util.List<ModelElementType>getChildElementTypes()protected java.util.List<DomElement>getElementsByNameNs(DomDocument document, java.lang.String namespaceURI)java.util.Collection<ModelElementType>getExtendingTypes()java.util.Collection<ModelElementInstance>getInstances(ModelInstance modelInstance)java.lang.Class<? extends ModelElementInstance>getInstanceType()ModelgetModel()java.lang.StringgetTypeName()java.lang.StringgetTypeNamespace()inthashCode()booleanisAbstract()booleanisBaseTypeOf(ModelElementType elementType)Test if a element type is a base type of this type.ModelElementInstancenewInstance(ModelInstanceImpl modelInstance, DomElement domElement)ModelElementInstancenewInstance(ModelInstance modelInstance)voidregisterAttribute(Attribute<?> attribute)voidregisterChildElementCollection(ChildElementCollection<?> childElementCollection)voidregisterChildElementType(ModelElementType childElementType)voidregisterExtendingType(ModelElementType modelType)voidresolveBaseTypes(java.util.List<ModelElementType> baseTypes)Resolve all types which are base types of this typevoidresolveExtendingTypes(java.util.Set<ModelElementType> allExtendingTypes)Resolve all types recursively which are extending this typevoidsetAbstract(boolean isAbstract)voidsetBaseType(ModelElementTypeImpl baseType)voidsetInstanceProvider(ModelElementTypeBuilder.ModelTypeInstanceProvider<?> instanceProvider)voidsetTypeNamespace(java.lang.String typeNamespace)
-
-
-
Constructor Detail
-
ModelElementTypeImpl
public ModelElementTypeImpl(ModelImpl model, java.lang.String name, java.lang.Class<? extends ModelElementInstance> instanceType)
-
-
Method Detail
-
newInstance
public ModelElementInstance newInstance(ModelInstance modelInstance)
- Specified by:
newInstancein interfaceModelElementType
-
newInstance
public ModelElementInstance newInstance(ModelInstanceImpl modelInstance, DomElement domElement)
-
registerAttribute
public void registerAttribute(Attribute<?> attribute)
-
registerChildElementType
public void registerChildElementType(ModelElementType childElementType)
-
registerChildElementCollection
public void registerChildElementCollection(ChildElementCollection<?> childElementCollection)
-
registerExtendingType
public void registerExtendingType(ModelElementType modelType)
-
createModelElementInstance
protected ModelElementInstance createModelElementInstance(ModelTypeInstanceContext instanceContext)
-
getAttributes
public final java.util.List<Attribute<?>> getAttributes()
- Specified by:
getAttributesin interfaceModelElementType
-
getTypeName
public java.lang.String getTypeName()
- Specified by:
getTypeNamein interfaceModelElementType
-
getInstanceType
public java.lang.Class<? extends ModelElementInstance> getInstanceType()
- Specified by:
getInstanceTypein interfaceModelElementType
-
setTypeNamespace
public void setTypeNamespace(java.lang.String typeNamespace)
-
getTypeNamespace
public java.lang.String getTypeNamespace()
- Specified by:
getTypeNamespacein interfaceModelElementType
-
setBaseType
public void setBaseType(ModelElementTypeImpl baseType)
-
setInstanceProvider
public void setInstanceProvider(ModelElementTypeBuilder.ModelTypeInstanceProvider<?> instanceProvider)
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstractin interfaceModelElementType
-
setAbstract
public void setAbstract(boolean isAbstract)
-
getExtendingTypes
public java.util.Collection<ModelElementType> getExtendingTypes()
- Specified by:
getExtendingTypesin interfaceModelElementType
-
getAllExtendingTypes
public java.util.Collection<ModelElementType> getAllExtendingTypes()
- Specified by:
getAllExtendingTypesin interfaceModelElementType
-
resolveExtendingTypes
public void resolveExtendingTypes(java.util.Set<ModelElementType> allExtendingTypes)
Resolve all types recursively which are extending this type- Parameters:
allExtendingTypes- set of calculated extending types
-
resolveBaseTypes
public void resolveBaseTypes(java.util.List<ModelElementType> baseTypes)
Resolve all types which are base types of this type- Parameters:
baseTypes- list of calculated base types
-
getBaseType
public ModelElementType getBaseType()
- Specified by:
getBaseTypein interfaceModelElementType
-
getModel
public Model getModel()
- Specified by:
getModelin interfaceModelElementType
-
getChildElementTypes
public java.util.List<ModelElementType> getChildElementTypes()
- Specified by:
getChildElementTypesin interfaceModelElementType
-
getAllChildElementTypes
public java.util.List<ModelElementType> getAllChildElementTypes()
- Specified by:
getAllChildElementTypesin interfaceModelElementType
-
getChildElementCollections
public java.util.List<ChildElementCollection<?>> getChildElementCollections()
-
getAllChildElementCollections
public java.util.List<ChildElementCollection<?>> getAllChildElementCollections()
-
getInstances
public java.util.Collection<ModelElementInstance> getInstances(ModelInstance modelInstance)
- Specified by:
getInstancesin interfaceModelElementType
-
getElementsByNameNs
protected java.util.List<DomElement> getElementsByNameNs(DomDocument document, java.lang.String namespaceURI)
-
isBaseTypeOf
public boolean isBaseTypeOf(ModelElementType elementType)
Test if a element type is a base type of this type. So this type extends the given element type.- Parameters:
elementType- the element type to test- Returns:
- true if
childElementTypeClassis a base type of this type, else otherwise
-
getAllAttributes
public java.util.Collection<Attribute<?>> getAllAttributes()
Returns a list of all attributes, including the attributes of all base types.- Returns:
- the list of all attributes
-
getAttribute
public Attribute<?> getAttribute(java.lang.String attributeName)
Return the attribute for the attribute name- Specified by:
getAttributein interfaceModelElementType- Parameters:
attributeName- the name of the attribute- Returns:
- the attribute or null if it not exists
-
getChildElementCollection
public ChildElementCollection<?> getChildElementCollection(ModelElementType childElementType)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-