List of usage examples for org.dom4j Document getRootElement
Element getRootElement();
From source file:com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgDataStoreComponent.java
License:Apache License
public String createComponent(SvgBaseTo svgTo) { String result = null;//from w ww .j a v a2 s . co m try { SvgDataStoreTo stevent = (SvgDataStoreTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(stevent.getX())); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(stevent.getY())); str = FlowSvgUtil.replaceAll(str, id, stevent.getId()); str = FlowSvgUtil.replaceAll(str, text, stevent.getLabel()); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }
From source file:com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgEndComponent.java
License:Apache License
public String createComponent(SvgBaseTo svgTo) { String result = null;// w ww. j ava 2 s .c o m try { SvgEndTo endTo = (SvgEndTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(endTo.getX())); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(endTo.getY())); str = FlowSvgUtil.replaceAll(str, id, endTo.getId()); str = FlowSvgUtil.replaceAll(str, text, endTo.getLabel()); // str = FlowSvgUtil.replaceAll(str, cricle, StringUtil.getString((endTo.getHeight()-5)/2)); str = FlowSvgUtil.replaceAll(str, text_local, StringUtil.getString(endTo.getHeight() / 2 + 14)); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }
From source file:com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgEndErrorEventComponent.java
License:Apache License
public String createComponent(SvgBaseTo svgTo) { String result = null;// w w w . j av a2 s . c om try { SvgEndErrorEventTo stevent = (SvgEndErrorEventTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(stevent.getX())); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(stevent.getY())); str = FlowSvgUtil.replaceAll(str, id, stevent.getId()); str = FlowSvgUtil.replaceAll(str, text, stevent.getLabel()); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }
From source file:com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgExclusiveGatewayComponent.java
License:Apache License
public String createComponent(SvgBaseTo svgTo) { String result = null;/*from ww w. java 2 s . co m*/ try { SvgExclusiveGatewayTo sGateTo = (SvgExclusiveGatewayTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(sGateTo.getX() + 2)); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(sGateTo.getY() + 2)); str = FlowSvgUtil.replaceAll(str, id, sGateTo.getId()); str = FlowSvgUtil.replaceAll(str, text, sGateTo.getLabel()); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }
From source file:com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgGroupComponent.java
License:Apache License
public String createComponent(SvgBaseTo svgTo) { String result = null;/*w w w . j a va2s. c om*/ try { SvgGroupTo group = (SvgGroupTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(group.getX())); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(group.getY())); str = FlowSvgUtil.replaceAll(str, id, group.getId()); str = FlowSvgUtil.replaceAll(str, text, group.getLabel()); str = FlowSvgUtil.replaceAll(str, width, StringUtil.getString(group.getWidth())); str = FlowSvgUtil.replaceAll(str, hight, StringUtil.getString(group.getHeight())); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }
From source file:com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgInclusiveGatewayComponent.java
License:Apache License
public String createComponent(SvgBaseTo svgTo) { String result = null;// w w w . ja va 2 s . c om try { SvgInclusiveGatewayTo iGateTo = (SvgInclusiveGatewayTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(iGateTo.getX() + 2)); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(iGateTo.getY() + 2)); str = FlowSvgUtil.replaceAll(str, id, iGateTo.getId()); str = FlowSvgUtil.replaceAll(str, text, iGateTo.getLabel()); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }
From source file:com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgIntermediateErrorCancelComponent.java
License:Apache License
public String createComponent(SvgBaseTo svgTo) { String result = null;//from w ww . j a v a 2 s . c o m try { SvgIntermediateErrorEventCancelTo stevent = (SvgIntermediateErrorEventCancelTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(stevent.getX())); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(stevent.getY())); str = FlowSvgUtil.replaceAll(str, id, stevent.getId()); str = FlowSvgUtil.replaceAll(str, text, stevent.getLabel()); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }
From source file:com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgIntermediateErrorEventComponent.java
License:Apache License
public String createComponent(SvgBaseTo svgTo) { String result = null;//from w w w . ja v a 2s .c o m try { SvgIntermediateErrorEventTo stevent = (SvgIntermediateErrorEventTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(stevent.getX())); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(stevent.getY())); str = FlowSvgUtil.replaceAll(str, id, stevent.getId()); str = FlowSvgUtil.replaceAll(str, text, stevent.getLabel()); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }
From source file:com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgIntermediateEventComponent.java
License:Apache License
public String createComponent(SvgBaseTo svgTo) { String result = null;//from ww w .j a v a2s .c o m try { SvgIntermediateEventTo stevent = (SvgIntermediateEventTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(stevent.getX())); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(stevent.getY())); str = FlowSvgUtil.replaceAll(str, id, stevent.getId()); str = FlowSvgUtil.replaceAll(str, text, stevent.getLabel()); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }
From source file:com.founder.fix.fixflow.core.impl.flowgraphics.svg.component.SvgIntermediateTimeEventCancelComponent.java
License:Apache License
public String createComponent(SvgBaseTo svgTo) { String result = null;//from ww w. j av a 2s .c o m try { SvgIntermediateTimeEventCancelTo stevent = (SvgIntermediateTimeEventCancelTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(stevent.getX())); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(stevent.getY())); str = FlowSvgUtil.replaceAll(str, id, stevent.getId()); str = FlowSvgUtil.replaceAll(str, text, stevent.getLabel()); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }