org.camunda.bpm.model.xml
Interface ModelInstance

All Known Implementing Classes:
ModelInstanceImpl

public interface ModelInstance

An instance of a model

Author:
Daniel Meyer

Method Summary
 DomDocument getDocument()
          Returns the wrapped DomDocument.
 ModelElementInstance getDocumentElement()
          Returns the ModelElement corresponding to the document element of this model or null if no document element exists.
 Model getModel()
          Returns the underlying model.
<T extends ModelElementInstance>
T
getModelElementById(String id)
          Find a unique element of the model by id.
<T extends ModelElementInstance>
Collection<T>
getModelElementsByType(Class<T> referencingClass)
          Find all elements of a type.
 Collection<ModelElementInstance> getModelElementsByType(ModelElementType referencingType)
          Find all elements of a type.
<T extends ModelElementInstance>
T
newInstance(Class<T> type)
          Creates a new instance of type class.
<T extends ModelElementInstance>
T
newInstance(ModelElementType type)
          Creates a new instance of type.
 void setDocumentElement(ModelElementInstance documentElement)
          Updates the document element.
 

Method Detail

getDocument

DomDocument getDocument()
Returns the wrapped DomDocument.

Returns:
the DOM document

getDocumentElement

ModelElementInstance getDocumentElement()
Returns the ModelElement corresponding to the document element of this model or null if no document element exists.

Returns:
the document element or null

setDocumentElement

void setDocumentElement(ModelElementInstance documentElement)
Updates the document element.

Parameters:
documentElement - the new document element to set

newInstance

<T extends ModelElementInstance> T newInstance(Class<T> type)
Creates a new instance of type class.

Type Parameters:
T - instance type
Parameters:
type - the class of the type to create
Returns:
the new created instance

newInstance

<T extends ModelElementInstance> T newInstance(ModelElementType type)
Creates a new instance of type.

Type Parameters:
T - instance type
Parameters:
type - the type to create
Returns:
the new created instance

getModel

Model getModel()
Returns the underlying model.

Returns:
the model

getModelElementById

<T extends ModelElementInstance> T getModelElementById(String id)
Find a unique element of the model by id.

Parameters:
id - the id of the element
Returns:
the element with the id or null

getModelElementsByType

Collection<ModelElementInstance> getModelElementsByType(ModelElementType referencingType)
Find all elements of a type.

Parameters:
referencingType - the type of the elements
Returns:
the collection of elements of the type

getModelElementsByType

<T extends ModelElementInstance> Collection<T> getModelElementsByType(Class<T> referencingClass)
Find all elements of a type.

Parameters:
referencingClass - the type class of the elements
Returns:
the collection of elements of the type


Copyright © 2015 camunda services GmbH. All rights reserved.