Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/BedDifferencesAccess.java @ 3889:940cd2ef149f
Area transparency fix
flys-artifacts/trunk@5542 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Thu, 20 Sep 2012 20:35:44 +0000 |
parents | a1c79d84e3cd |
children | 95d699c769fb |
line wrap: on
line source
package de.intevation.flys.artifacts.access; import de.intevation.artifacts.CallContext; import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.model.minfo.BedHeight; import de.intevation.flys.utils.FLYSUtils; import de.intevation.flys.utils.StringUtil; public class BedDifferencesAccess extends RiverAccess { private String yearEpoch; private String[] diffs; private CallContext context; public BedDifferencesAccess(FLYSArtifact artifact, CallContext context) { super(artifact); this.context = context; } public String getYearEpoch() { return yearEpoch; } public FLYSArtifact[][] getDifferenceArtifacts() { FLYSArtifact[][] artifacts = new FLYSArtifact[diffs.length][2]; for (int i = 0; i < diffs.length; i++) { String[] diff = diffs[i].split("#"); String diff1 = StringUtil.unbracket(diff[0]); String diff2 = StringUtil.unbracket(diff[1]); String[] diff1parts = diff1.split(";"); String[] diff2parts = diff2.split(";"); artifacts[i][0] = FLYSUtils.getArtifact(diff1parts[0], context); artifacts[i][1] = FLYSUtils.getArtifact(diff2parts[1], context); } return artifacts; } public static int getHeightId(FLYSArtifact artifact) { Access a = new Access(artifact); return a.getInteger("height_id"); } }