Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENReportFacet.java @ 1149:64b465699a24
Added an Output target for WSPLGEN reports that will be available when an WSPLGEN calculation is finished.
flys-artifacts/trunk@2680 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 08 Sep 2011 14:42:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1148:302461d5d071 | 1149:64b465699a24 |
---|---|
1 package de.intevation.flys.artifacts.model; | |
2 | |
3 import org.apache.log4j.Logger; | |
4 | |
5 import de.intevation.artifacts.Artifact; | |
6 import de.intevation.artifacts.CallContext; | |
7 | |
8 import de.intevation.artifactdatabase.state.Facet; | |
9 | |
10 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; | |
11 | |
12 | |
13 /** | |
14 * This facet is used to provide WSPLGEN reports <b>only</b>. | |
15 */ | |
16 public class WSPLGENReportFacet extends ReportFacet { | |
17 | |
18 private static Logger logger = Logger.getLogger(WSPLGENReportFacet.class); | |
19 | |
20 | |
21 protected CalculationResult result; | |
22 | |
23 | |
24 public WSPLGENReportFacet() { | |
25 } | |
26 | |
27 | |
28 public WSPLGENReportFacet( | |
29 ComputeType type, | |
30 String hash, | |
31 String stateId, | |
32 CalculationResult result | |
33 ) { | |
34 super(type, hash, stateId); | |
35 this.result = result; | |
36 } | |
37 | |
38 | |
39 @Override | |
40 public Object getData(Artifact artifact, CallContext context) { | |
41 return result.getReport(); | |
42 } | |
43 | |
44 | |
45 @Override | |
46 public Facet deepCopy() { | |
47 WSPLGENReportFacet copy = new WSPLGENReportFacet(); | |
48 copy.set(this); | |
49 copy.type = type; | |
50 copy.hash = hash; | |
51 copy.stateId = stateId; | |
52 copy.result = result; | |
53 return copy; | |
54 } | |
55 } | |
56 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |