minX=bpmnShape.getBounds().getX();
}
}
BaseElement bpmnElement=getBaseElement(bpmnShape.getBpmnElement());
if(bpmnElement==null){
continue;
}
if (bpmnElement instanceof StartEvent) {
String startEventSVG = startEventToSVG(bpmnShape);
svg.addChildren(startEventSVG);
}
if (bpmnElement instanceof EndEvent) {
String endEventSVG = endEventToSVG(bpmnShape);
svg.addChildren(endEventSVG);
}
if (bpmnElement instanceof IntermediateCatchEventBehavior) {
String intermediateTimerEventSVG = intermediateTimerEventToSVG(bpmnShape);
svg.addChildren(intermediateTimerEventSVG);
}
if (bpmnElement instanceof Task) {
String taskSVG = taskToSVG(bpmnShape);
svg.addChildren(taskSVG);
}
if (bpmnElement instanceof CallActivity) {
String taskSVG = callActivityToSVG(bpmnShape);
svg.addChildren(taskSVG);
}
if (bpmnElement instanceof Gateway) {
String gatewaySVG = gatewayToSVG(bpmnShape);
svg.addChildren(gatewaySVG);
}
if(bpmnElement instanceof Lane)
{
String laneSVG = laneToSVG(bpmnShape);
svg.addChildren(laneSVG);
}
if(bpmnElement instanceof Participant)
{
String laneSVG = participantToSVG(bpmnShape);
svg.addChildren(laneSVG);
}
if(bpmnElement instanceof SubProcess)
{
String subProcessSVG = subProcessToSVG(bpmnShape);
svg.addChildren(subProcessSVG);
}
if(bpmnElement instanceof Group)
{
String subProcessSVG = groupToSVG(bpmnShape,bpmnElement);
svg.addChildren(subProcessSVG);
}
if(bpmnElement instanceof DataObject)
{
String dataObjectSVG= dataObjectToSVG(bpmnShape,bpmnElement);
svg.addChildren(dataObjectSVG);
}
//DataStoreReference //DataInput //DataOutput //Message
if(bpmnElement instanceof DataStoreReference)
{
String dataStoreReferenceSVG= dataStoreReferenceToSVG(bpmnShape,bpmnElement);
svg.addChildren(dataStoreReferenceSVG);
}
if(bpmnElement instanceof DataInput)
{
String dataInputSVG= dataInputToSVG(bpmnShape,bpmnElement);
svg.addChildren(dataInputSVG);
}
if(bpmnElement instanceof DataOutput)
{
String dataOutputSVG= dataOutputToSVG(bpmnShape,bpmnElement);
svg.addChildren(dataOutputSVG);
}
if(bpmnElement instanceof Message)
{
String messageSVG= messageToSVG(bpmnShape,bpmnElement);
svg.addChildren(messageSVG);
}
if(bpmnElement instanceof TextAnnotation)
{
String messageSVG= textAnnotationToSVG(bpmnShape,bpmnElement);
svg.addChildren(messageSVG);
}
if(bpmnElement instanceof BoundaryEvent)
{
String messageSVG= boundaryEventToSVG(bpmnShape,bpmnElement);
svg.addChildren(messageSVG);
}
}
if (diagramElement instanceof BPMNEdge) {
BPMNEdge bpmnEdge = (BPMNEdge) diagramElement;
List<Point> pointList = bpmnEdge.getWaypoint();
for (Point point : pointList) {
if(point.getX()>maxX)
{
maxX=point.getX();
}
if(point.getY()>maxY)
{
maxY=point.getY();
}
}
BaseElement bpmnElement=getBaseElement(bpmnEdge.getBpmnElement());
if (bpmnElement instanceof SequenceFlow) {
String sequenceFlowSVG = sequenceFlowToSVG(bpmnEdge);
svg.addEdge(sequenceFlowSVG);
}
if (bpmnElement instanceof Association) {