@Override protected void writeAdditionalChildElements(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception { TextAnnotation textAnnotation = (TextAnnotation) element; if (StringUtils.isNotEmpty(textAnnotation.getText())) { xtw.writeStartElement(ELEMENT_TEXT_ANNOTATION_TEXT); xtw.writeCharacters(textAnnotation.getText()); xtw.writeEndElement(); } } }
@Override protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception { TextAnnotation textAnnotation = new TextAnnotation(); BpmnXMLUtil.addXMLLocation(textAnnotation, xtr); textAnnotation.setTextFormat(xtr.getAttributeValue(null, ATTRIBUTE_TEXTFORMAT)); parseChildElements(getXMLElementName(), textAnnotation, childParserMap, model, xtr); return textAnnotation; }
protected BaseElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) { TextAnnotation annotation = new TextAnnotation(); String text = getPropertyValueAsString("text", elementNode); if (StringUtils.isNotEmpty(text)) { annotation.setText(text); } return annotation; } }
@Override public void draw(DefaultProcessDiagramCanvas processDiagramCanvas, BpmnModel bpmnModel, Artifact artifact) { GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(artifact.getId()); TextAnnotation textAnnotation = (TextAnnotation) artifact; processDiagramCanvas.drawTextAnnotation(textAnnotation.getId(), textAnnotation.getText(), graphicInfo); } });
public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception { if (!(parentElement instanceof TextAnnotation)) return; ((TextAnnotation) parentElement).setText(xtr.getElementText()); } }
@Override protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception { TextAnnotation textAnnotation = (TextAnnotation) element; writeDefaultAttribute(ATTRIBUTE_TEXTFORMAT, textAnnotation.getTextFormat(), xtw); }
private void handleTextAnnotation(TextAnnotation artifact) { ensureArtifactIdSet(artifact); textAnnotations.put(artifact.getId(), artifact); }
String elementId = xtr.getAttributeValue(null, ATTRIBUTE_ID); TextAnnotation textAnnotation = (TextAnnotation) new TextAnnotationXMLConverter().convertXMLToElement(xtr, model); textAnnotation.setId(elementId); model.getGlobalArtifacts().add(textAnnotation);
public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception { if (parentElement instanceof TextAnnotation == false) return; ((TextAnnotation) parentElement).setText(xtr.getElementText()); } }
@Override protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception { TextAnnotation textAnnotation = (TextAnnotation) element; writeDefaultAttribute(ATTRIBUTE_TEXTFORMAT, textAnnotation.getTextFormat(), xtw); }
String elementId = xtr.getAttributeValue(null, ATTRIBUTE_ID); TextAnnotation textAnnotation = (TextAnnotation) new TextAnnotationXMLConverter().convertXMLToElement(xtr, model); textAnnotation.setId(elementId); model.getGlobalArtifacts().add(textAnnotation);
@Override protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception { TextAnnotation textAnnotation = new TextAnnotation(); BpmnXMLUtil.addXMLLocation(textAnnotation, xtr); textAnnotation.setTextFormat(xtr.getAttributeValue(null, ATTRIBUTE_TEXTFORMAT)); parseChildElements(getXMLElementName(), textAnnotation, childParserMap, model, xtr); return textAnnotation; }
protected BaseElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) { TextAnnotation annotation = new TextAnnotation(); String text = getPropertyValueAsString("text", elementNode); if (StringUtils.isNotEmpty(text)) { annotation.setText(text); } return annotation; } }
public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception { if (parentElement instanceof TextAnnotation == false) return; ((TextAnnotation) parentElement).setText(xtr.getElementText()); } }
@Override protected void writeAdditionalAttributes(BaseElement element, XMLStreamWriter xtw) throws Exception { TextAnnotation textAnnotation = (TextAnnotation) element; writeDefaultAttribute(ATTRIBUTE_TEXTFORMAT, textAnnotation.getTextFormat(), xtw); }
@Override protected void writeAdditionalChildElements(BaseElement element, XMLStreamWriter xtw) throws Exception { TextAnnotation textAnnotation = (TextAnnotation) element; if (StringUtils.isNotEmpty(textAnnotation.getText())) { xtw.writeStartElement(ELEMENT_TEXT_ANNOTATION_TEXT); xtw.writeCharacters(textAnnotation.getText()); xtw.writeEndElement(); } } }
@Override protected BaseElement convertXMLToElement(XMLStreamReader xtr) throws Exception { TextAnnotation textAnnotation = new TextAnnotation(); BpmnXMLUtil.addXMLLocation(textAnnotation, xtr); textAnnotation.setTextFormat(xtr.getAttributeValue(null, ATTRIBUTE_TEXTFORMAT)); parseChildElements(getXMLElementName(), textAnnotation, xtr); return textAnnotation; }
@Override protected void writeAdditionalChildElements(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception { TextAnnotation textAnnotation = (TextAnnotation) element; if (StringUtils.isNotEmpty(textAnnotation.getText())) { xtw.writeStartElement(ELEMENT_TEXT_ANNOTATION_TEXT); xtw.writeCharacters(textAnnotation.getText()); xtw.writeEndElement(); } } }