Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/access/StaticSQRelationAccess.java @ 7357:9d3e44ab25f2
Refactoring: Move functionality of BedHeightAccess into BedHeightFacet for now.
Idea is that Artifact and Access are lightweight. Access access the 'data'
('parameterization') attached to artifact, not the data delivered by means of
artifact and its parameterization.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 16 Oct 2013 10:42:45 +0200 |
parents | af13ceeba52a |
children | e4606eae8ea5 |
rev | line source |
---|---|
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
2 * Software engineering by Intevation GmbH |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
3 * |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5867
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5867
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
7 */ |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
8 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5501
diff
changeset
|
9 package org.dive4elements.river.artifacts.access; |
5501
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
10 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 import org.apache.log4j.Logger; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
12 |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
13 import org.dive4elements.river.artifacts.D4EArtifact; |
5501
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
14 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
15 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
16 public class StaticSQRelationAccess |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
17 extends RiverAccess |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
18 { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
19 /** The logger that is used in this state. */ |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
20 private static final Logger logger = |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
21 Logger.getLogger(StaticSQRelationAccess.class); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 private String measurementStation; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
25 public StaticSQRelationAccess(D4EArtifact artifact) { |
5501
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 super(artifact); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
29 /** Get measurement station */ |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
30 public String getMeasurementStation() { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
31 if (measurementStation == null) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 measurementStation = getString("station"); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
34 if (logger.isDebugEnabled()) { |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
35 logger.debug("measurement station: '" + measurementStation + "'"); |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
37 return measurementStation; |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 } |
9a14eac637ec
New Artifact and static state for sq relation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 } |