tim@597: package de.intevation.gnv.artifacts.services.requestobjects;
sascha@779:
tim@597: /**
tim@826: * The default Implementation of Layer
.
ingo@792: *
sascha@780: * @author Tim Englich
tim@597: *
tim@597: */
tim@597: public class DefaultLayer implements Layer {
tim@597:
tim@826: /**
tim@826: * The id of the Layer
tim@826: */
tim@597: private String id = null;
sascha@778:
tim@826: /**
tim@826: * The name of the Layer
tim@826: */
tim@597: private String name = null;
sascha@778:
tim@826: /**
tim@826: * Flag which defines if the Layer is a GroupLayer
tim@826: */
tim@597: private boolean groupLayer = false;
sascha@778:
tim@826: /**
tim@826: * The ID of the Parentlayer or null if the Layer is a Rootlayer
tim@826: */
tim@597: private String parentId = null;
ingo@792:
tim@597: /**
tim@597: * Constructor
ingo@792: * @param id The id of this layer.
ingo@792: * @param name The name of this layer.
ingo@792: * @param groupLayer A boolean property to define this layer as group layer.
ingo@792: * @param parentId The id of the parent layer.
tim@597: */
tim@597: public DefaultLayer(String id,String name,
tim@597: boolean groupLayer,String parentId) {
tim@597: this.id = id;
tim@597: this.name = name;
tim@597: this.groupLayer = groupLayer;
tim@597: this.parentId = parentId;
tim@597: }
tim@597:
tim@597: public String getID() {
tim@597: return this.id;
tim@597: }
tim@597:
tim@597: public String getName() {
tim@597: return this.name;
tim@597: }
tim@597:
tim@597: public boolean isGroupLayer() {
tim@597: return this.groupLayer;
tim@597: }
tim@597:
tim@597: public String parentID() {
tim@597: return this.parentId;
tim@597: }
sascha@778:
ingo@792: /**
ingo@792: * This methods returns this layer as string.
sascha@803: *
ingo@792: * @return this layer as string.
ingo@792: */
tim@597: @Override
tim@597: public String toString() {
tim@597: return "ID: "+ this.id + " Name: "+this.name+
tim@597: " IsGroupLayer: "+this.groupLayer+
tim@597: " ParentID: "+this.parentId;
tim@597: }
tim@597:
tim@597: }
sascha@836: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :