view gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/map/DefaultLayer.java @ 1022:28a0628b11b0

Added license file and license header. gnv/trunk@1258 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 02 Nov 2010 17:15:08 +0000
parents 0846c9c4abdd
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.artifactdatabase.objects.map;

/**
 * The default implementation of <code>Layer</code>.
 *
 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
 */
public class DefaultLayer implements Layer {


    /**
     * The id of this layer.
     */
    private String id = null;

    /**
     * The name of this layer.
     */
    private String name = null;

    /**
     * Flag which defines if this layer is an grouplayer.
     */
    private boolean groupLayer = false;

    /**
     * The id of the parent layer or null if this layer is an rootlayer.
     */
    private String parentId = null;

    /**
     * Constructor
     * 
     * @param id the id of this layer
     * @param name the name of this layer
     * @param groupLayer flag which defines if this layer is an grouplayer
     * @param parentId the id of the parent layer or null if this layer is an 
     *                 rootlayer
     */
    public DefaultLayer(String id,String name,
                        boolean groupLayer,String parentId) {
        this.id = id;
        this.name = name;
        this.groupLayer = groupLayer;
        this.parentId = parentId;
    }


    public String getID() {
        return this.id;
    }


    public String getName() {
        return this.name;
    }


    public boolean isGroupLayer() {
        return this.groupLayer;
    }


    public String parentID() {
        return this.parentId;
    }

    @Override
    public String toString() {
        return "ID: "+ this.id + " Name: "+this.name+
               " IsGroupLayer: "+this.groupLayer+
               " ParentID: "+this.parentId;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org