Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java @ 7984:cf674b03901a facet-metadata
Bedheight facet now returns double[][]. Removed obsolete processor code.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 01 Jul 2014 13:27:53 +0200 |
parents | 8d5ca5175038 |
children | a709e6334c4a |
comparison
equal
deleted
inserted
replaced
7983:62befca02480 | 7984:cf674b03901a |
---|---|
22 import org.dive4elements.artifacts.CallMeta; | 22 import org.dive4elements.artifacts.CallMeta; |
23 import org.dive4elements.artifacts.common.utils.XMLUtils; | 23 import org.dive4elements.artifacts.common.utils.XMLUtils; |
24 import org.dive4elements.river.artifacts.model.FacetTypes; | 24 import org.dive4elements.river.artifacts.model.FacetTypes; |
25 import org.dive4elements.river.artifacts.model.minfo.BedHeightFacet; | 25 import org.dive4elements.river.artifacts.model.minfo.BedHeightFacet; |
26 import org.dive4elements.river.artifacts.model.minfo.BedHeightFactory; | 26 import org.dive4elements.river.artifacts.model.minfo.BedHeightFactory; |
27 import org.dive4elements.river.artifacts.model.minfo.BedHeightSoundingWidthFacet; | |
27 import org.dive4elements.river.artifacts.states.StaticState; | 28 import org.dive4elements.river.artifacts.states.StaticState; |
28 | 29 |
29 import org.dive4elements.river.artifacts.resources.Resources; | 30 import org.dive4elements.river.artifacts.resources.Resources; |
30 | 31 |
31 public class BedHeightsArtifact | 32 public class BedHeightsArtifact |
100 String facetType = BEDHEIGHT; | 101 String facetType = BEDHEIGHT; |
101 if (type.equals("soundings")) { | 102 if (type.equals("soundings")) { |
102 type = "singlevalues"; | 103 type = "singlevalues"; |
103 facetType = BEDHEIGHT_SOUNDING_WIDTH; | 104 facetType = BEDHEIGHT_SOUNDING_WIDTH; |
104 } | 105 } |
105 // e.g. 'single' | 106 addStringData("height_id", parts[2]); |
107 addStringData("time", parts[3]); | |
108 addStringData("type", type); | |
106 String btype = type; | 109 String btype = type; |
107 int hId = Integer.parseInt(parts[2]); | 110 int hId = Integer.parseInt(parts[2]); |
108 if (name.equals("bedheight")) { | 111 |
109 addStringData("type", type); | |
110 addStringData("height_id", parts[2]); | |
111 addStringData("time", parts[3]); | |
112 } | |
113 if (type.equals("singlevalues")) { | 112 if (type.equals("singlevalues")) { |
114 btype = "single"; | 113 btype = "single"; |
115 } | 114 } |
116 | 115 |
117 String bedHName = BedHeightFactory.getHeightName(btype, hId); | 116 String bedHName = BedHeightFactory.getHeightName(btype, hId); |
118 | 117 |
118 Facet facet = null; | |
119 if (facetType.equals(BEDHEIGHT_SOUNDING_WIDTH)) { | 119 if (facetType.equals(BEDHEIGHT_SOUNDING_WIDTH)) { |
120 bedHName = Resources.getMsg( | 120 bedHName = Resources.getMsg( |
121 callMeta, | 121 callMeta, |
122 "facet.bedheight.sounding_width", | 122 "facet.bedheight.sounding_width", |
123 "facet.bedheight.sounding_widt", | 123 "facet.bedheight.sounding_widt", |
124 new Object[] { bedHName }); | 124 new Object[] { bedHName }); |
125 facet = new BedHeightSoundingWidthFacet(facetType, bedHName); | |
126 } | |
127 else { | |
128 facet = new BedHeightFacet( | |
129 facetType, bedHName, type); | |
125 } | 130 } |
126 | 131 |
127 Facet facet = new BedHeightFacet( | |
128 facetType, bedHName, type); | |
129 | 132 |
130 ArrayList<Facet> facets = new ArrayList<Facet>(1); | 133 ArrayList<Facet> facets = new ArrayList<Facet>(1); |
131 facets.add(facet); | 134 facets.add(facet); |
132 | 135 |
133 addFacets(STATIC_STATE_NAME, facets); | 136 addFacets(STATIC_STATE_NAME, facets); |