use of org.camunda.bpm.model.xml.instance.DomDocument in project camunda-xml-model by camunda.
the class ModelElementTypeImpl method newInstance.
public ModelElementInstance newInstance(ModelInstance modelInstance) {
ModelInstanceImpl modelInstanceImpl = (ModelInstanceImpl) modelInstance;
DomDocument document = modelInstanceImpl.getDocument();
DomElement domElement = document.createElement(typeNamespace, typeName);
return newInstance(modelInstanceImpl, domElement);
}
use of org.camunda.bpm.model.xml.instance.DomDocument in project camunda-xml-model by camunda.
the class ModelElementTypeImpl method getInstances.
public Collection<ModelElementInstance> getInstances(ModelInstance modelInstance) {
ModelInstanceImpl modelInstanceImpl = (ModelInstanceImpl) modelInstance;
DomDocument document = modelInstanceImpl.getDocument();
List<DomElement> elements = getElementsByNameNs(document, typeNamespace);
List<ModelElementInstance> resultList = new ArrayList<ModelElementInstance>();
for (DomElement element : elements) {
resultList.add(ModelUtil.getModelElement(element, modelInstanceImpl, this));
}
return resultList;
}
Aggregations