use of org.eclipse.bpmn2.BaseElement in project kie-wb-common by kiegroup.
the class DIZorderComparator method isChildParent.
private boolean isChildParent(BaseElement parent, BaseElement child) {
LaneSet childLaneSet = ((Lane) parent).getChildLaneSet();
if (childLaneSet == null) {
return false;
}
List<Lane> lanes = childLaneSet.getLanes();
for (Lane lane : lanes) {
if (isParent(lane, child)) {
return true;
}
}
return false;
}
use of org.eclipse.bpmn2.BaseElement in project kie-wb-common by kiegroup.
the class Bpmn2JsonMarshaller method findDiagramElement.
private DiagramElement findDiagramElement(BPMNPlane plane, BaseElement baseElement) {
DiagramElement result = _diagramElements.get(baseElement.getId());
if (result != null) {
return result;
}
for (DiagramElement element : plane.getPlaneElement()) {
if ((element instanceof BPMNEdge && ((BPMNEdge) element).getBpmnElement() == baseElement) || (element instanceof BPMNShape && ((BPMNShape) element).getBpmnElement() == baseElement)) {
_diagramElements.put(baseElement.getId(), element);
return element;
}
}
_logger.debug("Could not find BPMNDI information for " + baseElement);
return null;
}
use of org.eclipse.bpmn2.BaseElement in project kie-wb-common by kiegroup.
the class StringElement method setStringValue.
void setStringValue(BaseElement element, String value) {
if (element != null) {
MetaDataType eleMetadata = DroolsFactory.eINSTANCE.createMetaDataType();
eleMetadata.setName(name);
eleMetadata.setMetaValue(asCData(value));
if (element.getExtensionValues() == null || element.getExtensionValues().isEmpty()) {
ExtensionAttributeValue extensionElement = Bpmn2Factory.eINSTANCE.createExtensionAttributeValue();
element.getExtensionValues().add(extensionElement);
}
FeatureMap.Entry eleExtensionElementEntry = new EStructuralFeatureImpl.SimpleFeatureMapEntry((EStructuralFeature.Internal) DroolsPackage.Literals.DOCUMENT_ROOT__META_DATA, eleMetadata);
element.getExtensionValues().get(0).getValue().add(eleExtensionElementEntry);
}
}
Aggregations