ingo@1022: /*
ingo@1022: * Copyright (c) 2010 by Intevation GmbH
ingo@1022: *
ingo@1022: * This program is free software under the LGPL (>=v2.1)
ingo@1022: * Read the file LGPL.txt coming with the software for details
ingo@1022: * or visit http://www.gnu.org/licenses/ if it does not exist.
ingo@1022: */
ingo@1022:
tim@402: package de.intevation.gnv.artifactdatabase.objects.map;
sascha@683:
tim@402: /**
ingo@690: * The default implementation of Layer
.
sascha@699: *
sascha@684: * @author Tim Englich
tim@402: */
tim@402: public class DefaultLayer implements Layer {
tim@402:
sascha@681:
tim@959: /**
tim@959: * The id of this layer.
tim@959: */
tim@402: private String id = null;
sascha@681:
tim@959: /**
tim@959: * The name of this layer.
tim@959: */
tim@402: private String name = null;
sascha@681:
tim@959: /**
tim@959: * Flag which defines if this layer is an grouplayer.
tim@959: */
tim@402: private boolean groupLayer = false;
sascha@681:
tim@959: /**
tim@959: * The id of the parent layer or null if this layer is an rootlayer.
tim@959: */
tim@402: private String parentId = null;
sascha@699:
tim@402: /**
tim@402: * Constructor
tim@959: *
tim@959: * @param id the id of this layer
tim@959: * @param name the name of this layer
tim@959: * @param groupLayer flag which defines if this layer is an grouplayer
tim@959: * @param parentId the id of the parent layer or null if this layer is an
tim@959: * rootlayer
tim@402: */
tim@402: public DefaultLayer(String id,String name,
tim@402: boolean groupLayer,String parentId) {
tim@402: this.id = id;
tim@402: this.name = name;
tim@402: this.groupLayer = groupLayer;
tim@402: this.parentId = parentId;
tim@402: }
tim@402:
tim@402:
tim@402: public String getID() {
tim@402: return this.id;
tim@402: }
tim@402:
ingo@690:
tim@402: public String getName() {
tim@402: return this.name;
tim@402: }
tim@402:
ingo@690:
tim@402: public boolean isGroupLayer() {
tim@402: return this.groupLayer;
tim@402: }
tim@402:
ingo@690:
tim@402: public String parentID() {
tim@402: return this.parentId;
tim@402: }
sascha@681:
tim@402: @Override
tim@402: public String toString() {
tim@402: return "ID: "+ this.id + " Name: "+this.name+
tim@402: " IsGroupLayer: "+this.groupLayer+
tim@402: " ParentID: "+this.parentId;
tim@402: }
tim@402: }
sascha@700: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :