Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java @ 1080:fa01c3602f66
Added MainValue-Fetching-Capabilities to MainValuesArtifact.
flys-artifacts/trunk@2577 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 25 Aug 2011 10:45:12 +0000 |
parents | ef756e166154 |
children | 07878836ee0d |
comparison
equal
deleted
inserted
replaced
1079:ef756e166154 | 1080:fa01c3602f66 |
---|---|
62 CallMeta callMeta, | 62 CallMeta callMeta, |
63 Document data) | 63 Document data) |
64 { | 64 { |
65 logger.debug("MainValuesArtifact.setup"); | 65 logger.debug("MainValuesArtifact.setup"); |
66 super.setup(identifier, factory, context, callMeta, data); | 66 super.setup(identifier, factory, context, callMeta, data); |
67 // TODO in initialize(*), access master/winfo artifact, | |
68 // get locations and river. | |
69 } | |
70 | |
71 | |
72 @Override | |
73 protected void initialize(Artifact artifact, Object context, CallMeta meta) { | |
74 logger.debug("MainValuesArtifact.initialize"); | |
75 WINFOArtifact winfo = (WINFOArtifact) artifact; | |
76 River river = winfo.getRiver(); | |
77 double location = winfo.getLocations()[0]; // Ort der Abflusskurve | |
78 | |
79 logger.error("Location: " + location); | |
80 Gauge gauge = river.determineGaugeByPosition(location); | |
67 } | 81 } |
68 | 82 |
69 | 83 |
70 /** | 84 /** |
71 * Get a list containing the one and only State. | 85 * Get a list containing the one and only State. |
133 } | 147 } |
134 return state; | 148 return state; |
135 } | 149 } |
136 | 150 |
137 | 151 |
138 state.getOutputs().add(mainValuesOutput); | 152 public List getMainValues() { |
139 return state; | 153 River river = RiverFactory.getRiver("Saar"); |
154 logger.warn("Go to river " + river); | |
155 double location = 5.0f; | |
156 Gauge gauge = river.determineGaugeByPosition(location); | |
157 return gauge.getMainValues(); | |
140 } | 158 } |
141 | 159 |
142 | 160 |
143 /* FACET IMPLEMENTATION */ | 161 /* FACET IMPLEMENTATION */ |
144 // TODO evaluate whether DefaultFacet can do. | 162 // TODO evaluate whether DefaultFacet can do. |