/*
 *    GeoTools - OpenSource mapping toolkit
 *    http://geotools.org
 *    (C) 2004-2006, Geotools Project Managment Committee (PMC)
 *    
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation; either
 *    version 2.1 of the License, or (at your option) any later version.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geotools.data.wms;

import java.util.Set;


/**
 * A simple bean that represents a layer name paired with a style name for use
 * in requests.
 *
 * @author Richard Gould, Refractions Research Inc.
 * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/plugin/wms/src/main/java/org/geotools/data/wms/SimpleLayer.java $
 */
public class SimpleLayer {
    /** Name of layer */
    private String name;

    /**
     * Name of style (limited to Set provided by validStyles).
     * 
     * <p>
     * null is used to indicate the "default" style.
     * </p>
     */
    private String style;

    /** Set of type <code>String</code> naming valid styles for this layer */
    private Set validStyles;

    /**
     * SimpleLayer creation.
     *
     * @param name Name of layer
     * @param style Name of style, null indicates default.
     */
    public SimpleLayer(String name, String style) {
        super();
        this.name = name;
        this.style = style;
    }

    /**
     * SimpleLayer creation.
     *
     * @param name
     * @param validStyles
     */
    public SimpleLayer(String name, Set validStyles) {
        super();
        this.name = name;
        this.validStyles = validStyles;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    /**
     * Returns a Set of type <code>String</code> containing the names of all
     * the styles that are valid for this layer.
     *
     */
    public Set getValidStyles() {
        return validStyles;
    }
}
