Mercurial > dive4elements > river
annotate flys-backend/src/main/java/de/intevation/flys/importer/ImportWstColumnValue.java @ 4447:a5993b69439b
Add processor to be able to generate curves for WKms values
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Wed, 07 Nov 2012 15:52:25 +0100 |
parents | 67fd63e4ef66 |
children |
rev | line source |
---|---|
196
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.importer; |
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 import de.intevation.flys.model.WstColumnValue; |
202
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
4 import de.intevation.flys.model.WstColumn; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
5 import de.intevation.flys.model.River; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
6 |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
7 import java.math.BigDecimal; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
8 |
478
db430bd9e0e0
Implemented a WstColumnValue cache to speed up inserting WST files into database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
202
diff
changeset
|
9 import org.apache.log4j.Logger; |
db430bd9e0e0
Implemented a WstColumnValue cache to speed up inserting WST files into database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
202
diff
changeset
|
10 |
196
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 public class ImportWstColumnValue |
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 { |
478
db430bd9e0e0
Implemented a WstColumnValue cache to speed up inserting WST files into database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
202
diff
changeset
|
13 protected Logger logger = Logger.getLogger(ImportWstColumnValue.class); |
db430bd9e0e0
Implemented a WstColumnValue cache to speed up inserting WST files into database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
202
diff
changeset
|
14 |
202
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
15 protected BigDecimal position; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
16 protected BigDecimal w; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
17 protected ImportWstColumn wstColumn; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
18 |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
19 protected WstColumnValue peer; |
196
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 |
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 public ImportWstColumnValue() { |
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 } |
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 |
202
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
24 public ImportWstColumnValue( |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
25 ImportWstColumn wstColumn, |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
26 BigDecimal position, |
497
67fd63e4ef66
Importer: centralized caching
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
478
diff
changeset
|
27 BigDecimal w |
202
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
28 ) { |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
29 this.wstColumn = wstColumn; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
30 this.position = position; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
31 this.w = w; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
32 } |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
33 |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
34 public BigDecimal getPosition() { |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
35 return position; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
36 } |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
37 |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
38 public void setPosition(BigDecimal position) { |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
39 this.position = position; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
40 } |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
41 |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
42 public BigDecimal getW() { |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
43 return w; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
44 } |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
45 |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
46 public void setW(BigDecimal w) { |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
47 this.w = w; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
48 } |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
49 |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
50 public ImportWstColumn getWstColumn() { |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
51 return wstColumn; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
52 } |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
53 |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
54 public void setWstColumn(ImportWstColumn wstColumn) { |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
55 this.wstColumn = wstColumn; |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
56 } |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
57 |
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
58 public WstColumnValue getPeer(River river) { |
196
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
59 if (peer == null) { |
202
29a408f80a89
Finished import of WSTs.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
196
diff
changeset
|
60 WstColumn c = wstColumn.getPeer(river); |
497
67fd63e4ef66
Importer: centralized caching
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
478
diff
changeset
|
61 peer = ImporterSession.getInstance().getWstColumnValue( |
67fd63e4ef66
Importer: centralized caching
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
478
diff
changeset
|
62 c, position, w); |
196
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
63 } |
478
db430bd9e0e0
Implemented a WstColumnValue cache to speed up inserting WST files into database.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
202
diff
changeset
|
64 |
196
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
65 return peer; |
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
66 } |
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
67 } |
a33c065b95eb
Added importer helper model stubs for WST imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
68 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |