private static String start_def = "{start_def}";
public String createComponent(SvgBaseTo svgTo) {
String result = null;
try {
SvgMessageFlowTo lineTo = (SvgMessageFlowTo)svgTo;
InputStream in = SvgBench.class.getResourceAsStream(comPath);
Document doc = XmlUtil.read(in);
String str = doc.getRootElement().asXML();
str = FlowSvgUtil.replaceAll(str, id, lineTo.getId());
str = FlowSvgUtil.replaceAll(str, text, lineTo.getLabel());
List<SvgPoint> pointList = lineTo.getSvgPointList();
StringBuffer pointPath = new StringBuffer();
String textx = null;
String texty = null;
String startconRef = none;
String startdefRef = none;
int size = pointList.size();
for(int i=0;i<size;i++){
if(i==0){
pointPath.append("M");
}else{
pointPath.append("L");
}
SvgPoint point = pointList.get(i);
float x = point.getX();
float y = point.getY();
x = x-2;
y = y-2;
pointPath.append(x);
pointPath.append(" ");
pointPath.append(y);
}
int textLength = lineTo.getLabel()==null?0:lineTo.getLabel().length();
SvgPoint svgPoint = CaclModel.caclCenterPoint(lineTo);
textx = StringUtil.getString(svgPoint.getX()-textLength*6.9/2);
texty = StringUtil.getString(svgPoint.getY()-20);
// if(size!=0 && size%2==0){