org.camunda.bpm.model.xml.impl
Class ModelImpl

java.lang.Object
  extended by org.camunda.bpm.model.xml.impl.ModelImpl
All Implemented Interfaces:
Model

public class ModelImpl
extends Object
implements Model

A model contains all defined types and the relationship between them.

Author:
Daniel Meyer

Constructor Summary
ModelImpl(String modelName)
          Create a new Model with a model name.
 
Method Summary
 boolean equals(Object obj)
           
 String getModelName()
          Returns the model name, which is the identifier of this model.
 ModelElementType getType(Class<? extends ModelElementInstance> instanceClass)
          Gets the defined ModelElementType of a ModelElementInstance.
 ModelElementType getTypeForName(String typeName)
          Gets the defined ModelElementType for a type by its name.
 ModelElementType getTypeForName(String namespaceUri, String typeName)
          Gets the defined ModelElementType for a type by its name and namespace URI.
 Collection<ModelElementType> getTypes()
          Gets the collection of all ModelElementType defined in the model.
 int hashCode()
           
 void registerType(ModelElementType modelElementType, Class<? extends ModelElementInstance> instanceType)
          Registers a ModelElementType in this Model.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelImpl

public ModelImpl(String modelName)
Create a new Model with a model name.

Parameters:
modelName - the model name to identify the model
Method Detail

getTypes

public Collection<ModelElementType> getTypes()
Description copied from interface: Model
Gets the collection of all ModelElementType defined in the model.

Specified by:
getTypes in interface Model
Returns:
the list of all defined element types of this model

getType

public ModelElementType getType(Class<? extends ModelElementInstance> instanceClass)
Description copied from interface: Model
Gets the defined ModelElementType of a ModelElementInstance.

Specified by:
getType in interface Model
Parameters:
instanceClass - the instance class to find the type for
Returns:
the corresponding element type or null if no type is defined for the instance

getTypeForName

public ModelElementType getTypeForName(String typeName)
Description copied from interface: Model
Gets the defined ModelElementType for a type by its name.

Specified by:
getTypeForName in interface Model
Parameters:
typeName - the name of the type
Returns:
the element type or null if no type is defined for the name

getTypeForName

public ModelElementType getTypeForName(String namespaceUri,
                                       String typeName)
Description copied from interface: Model
Gets the defined ModelElementType for a type by its name and namespace URI.

Specified by:
getTypeForName in interface Model
Parameters:
namespaceUri - the namespace URI for the type
typeName - the name of the type
Returns:
the element type or null if no type is defined for the name and namespace URI

registerType

public void registerType(ModelElementType modelElementType,
                         Class<? extends ModelElementInstance> instanceType)
Registers a ModelElementType in this Model.

Parameters:
modelElementType - the element type to register
instanceType - the instance class of the type to register

getModelName

public String getModelName()
Description copied from interface: Model
Returns the model name, which is the identifier of this model.

Specified by:
getModelName in interface Model
Returns:
the model name

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2014 camunda services GmbH. All rights reserved.