view gnv-artifacts/src/main/java/de/intevation/gnv/wms/LayerInfo.java @ 1145:dfe1ac687c7f tip

added tags
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:16:15 +0200
parents f953c9a559d8
children
line wrap: on
line source
/*
 * Copyright (c) 2010 by Intevation GmbH
 *
 * This program is free software under the LGPL (>=v2.1)
 * Read the file LGPL.txt coming with the software for details
 * or visit http://www.gnu.org/licenses/ if it does not exist.
 */

package de.intevation.gnv.wms;

/**
 * This class is used to store some meta information about a layer (e.g. a WMS
 * layers).
 *
 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
 */
public class LayerInfo {

    /**
     * Constant field <code>LAYER</code>
     */
    public static final String LAYER        = "layer";

    /**
     * Constant field <code>LAYER_MODEL</code>
     */
    public static final String LAYER_MODEL  = "model";

    /**
     * Constant field <code>LAYER_NAME</code>
     */
    public static final String LAYER_NAME   = "name";

    /**
     * Constant field <code>LAYER_TYPE</code>
     */
    public static final String LAYER_TYPE   = "type";

    /**
     * Constant field <code>LAYER_DATA</code>
     */
    public static final String LAYER_DATA   = "data";

    /**
     * Constant field <code>LAYER_STATUS</code>
     */
    public static final String LAYER_STATUS = "status";

    /**
     * Constant field <code>LAYER_TITLE</code>
     */
    public static final String LAYER_TITLE  = "title";

    /**
     * Field storing the layer name.
     */
    private String name;

    /**
     * Field storing the layer title.
     */
    private String title;

    /**
     * Field storing the layer type.
     */
    private String type;

    /**
     * Field storing the layer data.
     */
    private String data;

    /**
     * Field storing the layer status.
     */
    private String status;

    /**
     * Field storing the layer model.
     */
    private String model;


    /**
     * Constructs an empty object. All parameters should be set via setter
     * methods.
     */
    public LayerInfo() {
    }


    /**
     * Set {@link #data} to data.
     *
     * @param data
     */
    public void setData(String data) {
        this.data = data;
    }

    /**
     * Get {@link #data}
     *
     * @return data
     */
    public String getData() {
        return data;
    }

    /**
     * Set {@link #name} to name.
     *
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Get {@link #name}
     *
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * Set {@link #title} to title.
     *
     * @param title
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * Get {@link #title}
     *
     * @return title
     */
    public String getTitle() {
        return title;
    }

    /**
     * Set {@link #model} to model.
     *
     * @param model
     */
    public void setModel(String model) {
        this.model = model;
    }

    /**
     * Get {@link #model}
     *
     * @return model
     */
    public String getModel() {
        return model;
    }

    /**
     * Set {@link #type} to type.
     *
     * @param type
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * Get {@link #type}
     *
     * @return type
     */
    public String getType() {
        return type;
    }

    /**
     * Set {@link #status} to status.
     *
     * @param status
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * Get {@link #status}
     *
     * @return status
     */
    public String getStatus() {
        return status;
    }

    /**
     * A <code>LayerInfo</code> object is emtpy if name, data, type and status
     * are null.
     *
     * @return True, if this object is empty - otherwise false.
     */
    public boolean isEmpty() {
        if (name == null && data == null && type == null && status == null)
            return true;

        return false;
    }

    /**
     * A <code>LayerInfo</code> object is broken if name, data or type are null.
     *
     * @return True, if this object is broken - otherwise false.
     */
    public boolean isBroken() {
        if (name == null || data == null || type == null)
            return true;

        return false;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org