view flys-client/src/main/java/de/intevation/flys/client/shared/model/WMSLayer.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 ea2aae01e7c4
children
line wrap: on
line source
package de.intevation.flys.client.shared.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


public class WMSLayer implements Serializable {

    protected String server;
    protected String name;
    protected String title;

    protected List<String>   srs;
    protected List<WMSLayer> layers;


    public WMSLayer() {
        layers = new ArrayList<WMSLayer>();
    }


    /**
     * @param server
     * @param title
     * @param name
     * @param layers
     */
    public WMSLayer(
        String         server,
        String         title,
        String         name,
        List<String>   srs,
        List<WMSLayer> layers
    ) {
        this.server = server;
        this.title  = title;
        this.name   = name;
        this.srs    = srs;
        this.layers = layers;
    }


    public String getServer() {
        return server;
    }


    public String getName() {
        return name;
    }


    public String getTitle() {
        return title;
    }


    public List<String> getSrs() {
        return srs;
    }


    public List<WMSLayer> getLayers() {
        return layers;
    }


    public boolean supportsSrs(String srs) {
        if (this.srs == null || this.srs.size() == 0) {
            return true;
        }

        if (!srs.startsWith("EPSG:")) {
            srs = "EPSG:" + srs;
        }

        return this.srs.contains(srs);
    }


    @Override
    public String toString() {
        return "WMS Layer: " + title + " (" + name + ") " + server;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org