Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java @ 1127:6b9877a9f6c1
Added infrastructure to start WSPLGEN calculations - the FloodMapState already start such calculations.
flys-artifacts/trunk@2639 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 02 Sep 2011 13:12:05 +0000 |
parents | 28a595b32980 |
children | 727c53fd0dc7 |
comparison
equal
deleted
inserted
replaced
1126:da4d8631fc46 | 1127:6b9877a9f6c1 |
---|---|
45 import de.intevation.flys.artifacts.model.WSPLGENJob; | 45 import de.intevation.flys.artifacts.model.WSPLGENJob; |
46 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; | 46 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; |
47 import de.intevation.flys.exports.WstWriter; | 47 import de.intevation.flys.exports.WstWriter; |
48 import de.intevation.flys.utils.FLYSUtils; | 48 import de.intevation.flys.utils.FLYSUtils; |
49 import de.intevation.flys.utils.GeometryUtils; | 49 import de.intevation.flys.utils.GeometryUtils; |
50 import de.intevation.flys.wsplgen.Scheduler; | |
50 | 51 |
51 | 52 |
52 public class FloodMapState | 53 public class FloodMapState |
53 extends DefaultState | 54 extends DefaultState |
54 implements FacetTypes | 55 implements FacetTypes |
107 | 108 |
108 logger.error("No WSPLGEN processing has been started!"); | 109 logger.error("No WSPLGEN processing has been started!"); |
109 | 110 |
110 return null; | 111 return null; |
111 } | 112 } |
113 | |
114 Scheduler scheduler = Scheduler.getInstance(); | |
115 scheduler.addJob(job); | |
112 | 116 |
113 facets.add(new WSPLGENFacet(0, FLOODMAP_WSPLGEN, "WSPLGEN")); | 117 facets.add(new WSPLGENFacet(0, FLOODMAP_WSPLGEN, "WSPLGEN")); |
114 | 118 |
115 //context.afterCall(CallContext.BACKGROUND); | 119 //context.afterCall(CallContext.BACKGROUND); |
116 | 120 |
182 File artifactDir, | 186 File artifactDir, |
183 CallContext context | 187 CallContext context |
184 ) { | 188 ) { |
185 logger.debug("FloodMapState.prepareWSPLGENJob"); | 189 logger.debug("FloodMapState.prepareWSPLGENJob"); |
186 | 190 |
187 WSPLGENJob job = new WSPLGENJob(); | 191 WSPLGENJob job = new WSPLGENJob(artifact, artifactDir, context); |
188 File paraFile = new File(artifactDir, WSPLGEN_PARAMETER_FILE); | 192 File paraFile = new File(artifactDir, WSPLGEN_PARAMETER_FILE); |
189 | 193 |
190 setOut(artifact, job); | 194 setOut(artifact, job); |
191 setRange(artifact, job); | 195 setRange(artifact, job); |
192 setDelta(artifact, job); | 196 setDelta(artifact, job); |