protected Map<String, DiagramNode> getElementBoundsFromBpmnDi(Document bpmnModel) { Map<String, DiagramNode> listOfBounds = new HashMap<String, DiagramNode>(); // iterate over all DI shapes NodeList shapes = bpmnModel.getElementsByTagNameNS(BpmnParser.BPMN_DI_NS, "BPMNShape"); for (int i = 0; i < shapes.getLength(); i++) { Element shape = (Element) shapes.item(i); String bpmnElementId = shape.getAttribute("bpmnElement"); // get bounds of shape NodeList childNodes = shape.getChildNodes(); for (int j = 0; j < childNodes.getLength(); j++) { Node childNode = childNodes.item(j); if (childNode instanceof Element && BpmnParser.BPMN_DC_NS.equals(childNode.getNamespaceURI()) && "Bounds".equals(childNode.getLocalName())) { DiagramNode bounds = parseBounds((Element) childNode); bounds.setId(bpmnElementId); listOfBounds.put(bpmnElementId, bounds); break; } } } return listOfBounds; }
protected Map<String, DiagramNode> getElementBoundsFromBpmnDi(Document bpmnModel) { Map<String, DiagramNode> listOfBounds = new HashMap<>(); // iterate over all DI shapes NodeList shapes = bpmnModel.getElementsByTagNameNS(BpmnParser.BPMN_DI_NS, "BPMNShape"); for (int i = 0; i < shapes.getLength(); i++) { Element shape = (Element) shapes.item(i); String bpmnElementId = shape.getAttribute("bpmnElement"); // get bounds of shape NodeList childNodes = shape.getChildNodes(); for (int j = 0; j < childNodes.getLength(); j++) { Node childNode = childNodes.item(j); if (childNode instanceof Element && BpmnParser.BPMN_DC_NS.equals(childNode.getNamespaceURI()) && "Bounds".equals(childNode.getLocalName())) { DiagramNode bounds = parseBounds((Element) childNode); bounds.setId(bpmnElementId); listOfBounds.put(bpmnElementId, bounds); break; } } } return listOfBounds; }
protected Map<String, DiagramNode> getElementBoundsFromBpmnDi(Document bpmnModel) { Map<String, DiagramNode> listOfBounds = new HashMap<String, DiagramNode>(); // iterate over all DI shapes NodeList shapes = bpmnModel.getElementsByTagNameNS(BpmnParser.BPMN_DI_NS, "BPMNShape"); for (int i = 0; i < shapes.getLength(); i++) { Element shape = (Element) shapes.item(i); String bpmnElementId = shape.getAttribute("bpmnElement"); // get bounds of shape NodeList childNodes = shape.getChildNodes(); for (int j = 0; j < childNodes.getLength(); j++) { Node childNode = childNodes.item(j); if (childNode instanceof Element && BpmnParser.BPMN_DC_NS.equals(childNode.getNamespaceURI()) && "Bounds".equals(childNode.getLocalName())) { DiagramNode bounds = parseBounds((Element) childNode); bounds.setId(bpmnElementId); listOfBounds.put(bpmnElementId, bounds); break; } } } return listOfBounds; }