diff --git a/src/main/java/de/tudresden/inf/st/pnml/splitter/postprocessing/GlobalToLocalNetsPostProcessor.java b/src/main/java/de/tudresden/inf/st/pnml/splitter/postprocessing/GlobalToLocalNetsPostProcessor.java index 6b1d753ad409e35ff623e910e856955773ddb1be..b78d9af64ef2845adeb1dec281f0fcfe11bafc07 100644 --- a/src/main/java/de/tudresden/inf/st/pnml/splitter/postprocessing/GlobalToLocalNetsPostProcessor.java +++ b/src/main/java/de/tudresden/inf/st/pnml/splitter/postprocessing/GlobalToLocalNetsPostProcessor.java @@ -290,7 +290,7 @@ public class GlobalToLocalNetsPostProcessor implements PostProcessor<PetriNet> { private void updateToolSpecificsWithPlaceInfos(PetriNet petriNet) { - ToolInfo ti = buildToolSpecifics(petriNet); + ToolInfo ti = buildToolSpecifics(); JastAddList<ToolInfo> tiList = new JastAddList<>(); tiList.add(ti); petriNet.setToolspecificList(tiList); @@ -370,10 +370,7 @@ public class GlobalToLocalNetsPostProcessor implements PostProcessor<PetriNet> { } } - private ToolInfo buildToolSpecifics(PetriNet petriNet) { - - // get old infos - CommunicatorInformation ci = ToolSpecificsParser.getCommunicatorInformationFromToolSpecifics(petriNet.getToolspecifics()); + private ToolInfo buildToolSpecifics() { // build place infos try { @@ -395,25 +392,6 @@ public class GlobalToLocalNetsPostProcessor implements PostProcessor<PetriNet> { buildPlaceInfoListServerPart(doc, ports, serviceServerReqPlaces, PnmlConstants.CHANNEL_PLACE_TYPE_SERVER_REQ_KEY); buildPlaceInfoListServerPart(doc, ports, serviceServerResPlaces, PnmlConstants.CHANNEL_PLACE_TYPE_SERVER_RES_KEY); - if(ci.getCommunicatorMapping().keySet().size() > 0) { - Element coms = doc.createElement(PnmlConstants.COMMUNICATORS); - - for (String s : ci.getCommunicatorMapping().keySet()) { - for (String type : ci.getCommunicatorMapping().get(s)) { - Element com = doc.createElement(PnmlConstants.COMMUNICATOR); - Element cType = doc.createElement(PnmlConstants.COMMUNICATOR_TYPE); - cType.setTextContent(type); - com.appendChild(cType); - Element cSubnet = doc.createElement(PnmlConstants.COMMUNICATOR_SUBNET); - cSubnet.setTextContent(s); - com.appendChild(cSubnet); - coms.appendChild(com); - } - } - - rootElement.appendChild(coms); - } - rootElement.appendChild(ports); TransformerFactory tf = TransformerFactory.newInstance(); diff --git a/src/main/nets/TestNet1.pnml b/src/main/nets/TestNet1.pnml index fdb0c17ac7727bc00c78683f82b7779ac369e3cf..b0fb35353c367884575d09aa4f9dd7e6a889922b 100644 --- a/src/main/nets/TestNet1.pnml +++ b/src/main/nets/TestNet1.pnml @@ -7,6 +7,9 @@ </name> <page id="top"> <page id="sourcePage"> + <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> + <type>nodePage</type> + </toolspecific> <place id="pub1"> <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> <node>n1</node> @@ -14,13 +17,7 @@ </toolspecific> <name> <text>pub1</text> - <graphics> - <offset x="0" y="0" /> - </graphics> </name> - <graphics> - <position x="0" y="0" /> - </graphics> </place> </page> <transition id="sampleTopic"> @@ -42,29 +39,20 @@ </toolspecific> <name> <text>sampleTopic</text> - <graphics> - <offset x="0" y="0" /> - </graphics> </name> - <graphics> - <position x="0" y="0" /> - </graphics> </transition> <page id="targetPage"> + <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> + <type>nodePage</type> + </toolspecific> <place id="sub1"> <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> <node>n3</node> <subnet>s3</subnet> </toolspecific> <name> - <text>outRefPlace</text> - <graphics> - <offset x="0" y="0" /> - </graphics> + <text>sub1</text> </name> - <graphics> - <position x="0" y="0" /> - </graphics> </place> </page> </page> diff --git a/src/main/nets/TestNet2.pnml b/src/main/nets/TestNet2.pnml index dfe8d89f1393722eefe82aac0edf4a2016e11e9c..2d82eff057f709202e332a2d9267c5b6461e626d 100644 --- a/src/main/nets/TestNet2.pnml +++ b/src/main/nets/TestNet2.pnml @@ -5,20 +5,11 @@ <name> <text>ServiceNet</text> </name> - <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> - <communicators> - <communicator> - <cType>serviceClient</cType> - <cSubnet>s1</cSubnet> - </communicator> - <communicator> - <cType>serviceServer</cType> - <cSubnet>s2</cSubnet> - </communicator> - </communicators> - </toolspecific> <page id="top"> <page id="sourcePage"> + <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> + <type>nodePage</type> + </toolspecific> <place id="req1"> <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> <node>n1</node> @@ -26,13 +17,7 @@ </toolspecific> <name> <text>req1</text> - <graphics> - <offset x="0" y="0" /> - </graphics> </name> - <graphics> - <position x="0" y="0" /> - </graphics> </place> <place id="res1"> <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> @@ -41,13 +26,7 @@ </toolspecific> <name> <text>res1</text> - <graphics> - <offset x="0" y="0" /> - </graphics> </name> - <graphics> - <position x="0" y="0" /> - </graphics> </place> </page> <transition id="serviceTransition"> @@ -67,15 +46,14 @@ </toolspecific> <name> <text>serviceTransition</text> - <graphics> - <offset x="0" y="0" /> - </graphics> </name> - <graphics> - <position x="0" y="0" /> - </graphics> </transition> <page id="targetPage"> + <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> + <type>serverPrototype</type> + <serviceName>sampleService</serviceName> + </toolspecific> + <place id="serverIn"> <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> <node>n2</node> @@ -83,13 +61,7 @@ </toolspecific> <name> <text>serverIn</text> - <graphics> - <offset x="0" y="0" /> - </graphics> </name> - <graphics> - <position x="0" y="0" /> - </graphics> </place> <place id="serverOut"> <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1"> @@ -98,13 +70,7 @@ </toolspecific> <name> <text>serverOut</text> - <graphics> - <offset x="0" y="0" /> - </graphics> </name> - <graphics> - <position x="0" y="0" /> - </graphics> </place> </page> </page>