public interface ModelInstance
Modifier and Type | Method and Description |
---|---|
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> |
getModelElementById(String id)
Find a unique element of the model by id.
|
<T extends ModelElementInstance> |
getModelElementsByType(Class<T> referencingClass)
Find all elements of a type.
|
Collection<ModelElementInstance> |
getModelElementsByType(ModelElementType referencingType)
Find all elements of a type.
|
<T extends ModelElementInstance> |
newInstance(Class<T> type)
Creates a new instance of type class.
|
<T extends ModelElementInstance> |
newInstance(ModelElementType type)
Creates a new instance of type.
|
void |
setDocumentElement(ModelElementInstance documentElement)
Updates the document element.
|
DomDocument getDocument()
DomDocument
.ModelElementInstance getDocumentElement()
ModelElement
corresponding to the document
element of this model or null if no document element exists.void setDocumentElement(ModelElementInstance documentElement)
documentElement
- the new document element to set<T extends ModelElementInstance> T newInstance(Class<T> type)
T
- instance typetype
- the class of the type to create<T extends ModelElementInstance> T newInstance(ModelElementType type)
T
- instance typetype
- the type to createModel getModel()
<T extends ModelElementInstance> T getModelElementById(String id)
id
- the id of the elementCollection<ModelElementInstance> getModelElementsByType(ModelElementType referencingType)
referencingType
- the type of the elements<T extends ModelElementInstance> Collection<T> getModelElementsByType(Class<T> referencingClass)
referencingClass
- the type class of the elementsCopyright © 2018. All rights reserved.