~tapaal-workflow/tapaal/swlWorkFlow

« back to all changes in this revision

Viewing changes to src/dk/aau/cs/io/TimedArcPetriNetNetworkWriter.java

  • Committer: launchpad-janitor
  • Author(s): Jakob Taankvist
  • Date: 2012-08-22 09:10:26 UTC
  • mfrom: (730.1.1 constantsInWeightsBug)
  • Revision ID: tapaal@cs.aau.dk-20120822091026-vmdwu3tz93hui3qi
Fixes a bug that when saving a net with weights the file got corrupted by TAPAAL Contributors review by Jiri Srba approved by Jiri Srba, Kenneth Yrke Jørgensen

Show diffs side-by-side

added added

removed removed

Lines of Context:
348
348
                        if (inputArc instanceof TimedInputArcComponent) {
349
349
                                arcElement.setAttribute("type", getInputArcTypeAsString((TimedInputArcComponent)inputArc));
350
350
                                arcElement.setAttribute("inscription", getGuardAsString((TimedInputArcComponent)inputArc));     
351
 
                                if(((TimedInputArcComponent)inputArc).getWeight().value() > 1){
352
 
                                        arcElement.setAttribute("weight", ((TimedInputArcComponent)inputArc).getWeight().toString(true)+"");
353
 
                                }
 
351
                                arcElement.setAttribute("weight", ((TimedInputArcComponent)inputArc).getWeight().nameForSaving(true)+"");
354
352
                        } else {
355
353
                                arcElement.setAttribute("type", "normal");
356
354
                                arcElement.setAttribute("inscription", "1");
357
 
                                if(((TimedOutputArcComponent)inputArc).getWeight().value() > 1){
358
 
                                        arcElement.setAttribute("weight", ((TimedOutputArcComponent)inputArc).getWeight().toString(true)+"");
359
 
                                }
 
355
                                arcElement.setAttribute("weight", ((TimedOutputArcComponent)inputArc).getWeight().nameForSaving(true)+"");
360
356
                        }
361
357
                } 
362
358
                return arcElement;