Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENJob.java @ 1106:e9f66d63bdd0
Write user defined barriers into a shapefile that is placed in the Artifact's directory.
flys-artifacts/trunk@2609 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 30 Aug 2011 11:09:54 +0000 |
parents | 7230e087ef8b |
children | 563e015f0f22 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENJob.java Tue Aug 30 08:09:52 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENJob.java Tue Aug 30 11:09:54 2011 +0000 @@ -5,6 +5,8 @@ import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; public class WSPLGENJob { @@ -17,12 +19,13 @@ protected String pro; protected String wsp; protected String wspTag; - protected String lin; protected String axis; protected String area; protected String gel; protected String outFile; + protected List<String> lin; + protected int out; protected double start; @@ -35,13 +38,14 @@ public WSPLGENJob() { - out = -1; - start = Double.NaN; - end = Double.NaN; - from = Double.NaN; - to = Double.NaN; - diff = Double.NaN; - dist = Double.NaN; + out = -1; + start = Double.NaN; + end = Double.NaN; + from = Double.NaN; + to = Double.NaN; + diff = Double.NaN; + dist = Double.NaN; + lin = new ArrayList<String>(2); } @@ -65,12 +69,12 @@ } - public void setLin(String lin) { - this.lin = lin; + public void addLin(String lin) { + this.lin.add(lin); } - public String getLin() { + public List<String> getLin() { return lin; } @@ -281,10 +285,12 @@ protected void writeLin(PrintWriter writer) throws IllegalArgumentException { - String lin = getLin(); + List<String> lins = getLin(); - if (lin != null && lin.length() > 0) { - writer.println("-LIN=\"" + lin + "\""); + if (lins != null && !lins.isEmpty()) { + for (String lin: lins) { + writer.println("-LIN=\"" + lin + "\""); + } } }