Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionFacet.java @ 3272:31168ac9c7e7
Partial fix for issue694 (heightmarks snap to nearest cross section).
flys-artifacts/trunk@4916 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 10 Jul 2012 15:31:56 +0000 |
parents | 5642a83420f2 |
children |
comparison
equal
deleted
inserted
replaced
3271:4c4ec9e9650a | 3272:31168ac9c7e7 |
---|---|
23 implements FacetTypes { | 23 implements FacetTypes { |
24 | 24 |
25 public static String BLACKBOARD_CS_MASTER_DATA | 25 public static String BLACKBOARD_CS_MASTER_DATA |
26 = "crosssection.masterprofile.data"; | 26 = "crosssection.masterprofile.data"; |
27 | 27 |
28 public static String BLACKBOARD_CS_PREV_KM | |
29 = "crosssection.masterprofile.km.prev"; | |
30 | |
31 public static String BLACKBOARD_CS_NEXT_KM | |
32 = "crosssection.masterprofile.km.next"; | |
33 | |
34 | |
28 private static Logger logger = Logger.getLogger(CrossSectionFacet.class); | 35 private static Logger logger = Logger.getLogger(CrossSectionFacet.class); |
29 | 36 |
30 protected ComputeType type; | 37 protected ComputeType type; |
31 | 38 |
32 | 39 |
41 public List getStaticDataProviderKeys(Artifact art) { | 48 public List getStaticDataProviderKeys(Artifact art) { |
42 CrossSectionArtifact artifact = (CrossSectionArtifact) art; | 49 CrossSectionArtifact artifact = (CrossSectionArtifact) art; |
43 List keys = new ArrayList(); | 50 List keys = new ArrayList(); |
44 if (artifact.isMaster()) { | 51 if (artifact.isMaster()) { |
45 keys.add(BLACKBOARD_CS_MASTER_DATA); | 52 keys.add(BLACKBOARD_CS_MASTER_DATA); |
53 keys.add(BLACKBOARD_CS_PREV_KM); | |
54 keys.add(BLACKBOARD_CS_NEXT_KM); | |
46 } | 55 } |
47 keys.add(artifact.identifier() + getIndex()); | 56 keys.add(artifact.identifier() + getIndex()); |
48 keys.addAll(super.getStaticDataProviderKeys(art)); | 57 keys.addAll(super.getStaticDataProviderKeys(art)); |
49 return keys; | 58 return keys; |
50 } | 59 } |
68 if (key.equals(BLACKBOARD_CS_MASTER_DATA)) { | 77 if (key.equals(BLACKBOARD_CS_MASTER_DATA)) { |
69 return crossSection.searchCrossSectionLine(); | 78 return crossSection.searchCrossSectionLine(); |
70 } | 79 } |
71 else if (key.equals(artifact.identifier() + getIndex())) { | 80 else if (key.equals(artifact.identifier() + getIndex())) { |
72 return getData(artifact, context); | 81 return getData(artifact, context); |
82 } | |
83 else if (key.equals(BLACKBOARD_CS_NEXT_KM)) { | |
84 return crossSection.getNextKm(); | |
85 } | |
86 else if (key.equals(BLACKBOARD_CS_PREV_KM)) { | |
87 return crossSection.getPrevKm(); | |
73 } | 88 } |
74 else { | 89 else { |
75 Object obj = super.provideBlackboardData(artifact, key, param, | 90 Object obj = super.provideBlackboardData(artifact, key, param, |
76 context); | 91 context); |
77 if (obj == null) { | 92 if (obj == null) { |