Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/shared/model/BBox.java @ 3847:f3b821735e39
Calculate the info url via i18n
Don't fetch the info url from the artifact service and use i18n to calculate the
url by using the official gauge and river number.
flys-client/trunk@5582 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 24 Sep 2012 08:39:22 +0000 |
parents | 910b03de6857 |
children |
line wrap: on
line source
package de.intevation.flys.client.shared.model; import java.io.Serializable; public class BBox implements Serializable { public double lowerX; public double upperX; public double lowerY; public double upperY; public BBox() { } public BBox(double lowerX, double lowerY, double upperX, double upperY) { this.lowerX = lowerX; this.lowerY = lowerY; this.upperX = upperX; this.upperY = upperY; } public double getLowerX() { return lowerX; } public double getLowerY() { return lowerY; } public double getUpperX() { return upperX; } public double getUpperY() { return upperY; } public String toString() { return "(" + lowerX + "," + lowerY + ")" + "(" + upperX + "," + upperY + ")"; } public static BBox getBBoxFromString(String bbox) { String[] coords = bbox != null ? bbox.split(" ") : null; if (coords == null || coords.length < 4) { return null; } try { return new BBox( Double.parseDouble(coords[0]), Double.parseDouble(coords[1]), Double.parseDouble(coords[2]), Double.parseDouble(coords[3])); } catch (NumberFormatException nfe) { // do nothing here } return null; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :