Skip to content
Snippets Groups Projects
Commit 32a649f6 authored by Sebastian Ebert's avatar Sebastian Ebert
Browse files

removed unused export, updated test-nets

parent dec39d12
Branches
No related tags found
No related merge requests found
......@@ -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();
......
......@@ -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>
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment