annotate 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
rev   line source
1022
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 959
diff changeset
1 /*
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 959
diff changeset
2 * Copyright (c) 2010 by Intevation GmbH
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 959
diff changeset
3 *
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 959
diff changeset
4 * This program is free software under the LGPL (>=v2.1)
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 959
diff changeset
5 * Read the file LGPL.txt coming with the software for details
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 959
diff changeset
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 959
diff changeset
7 */
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 959
diff changeset
8
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 package de.intevation.gnv.artifactdatabase.objects.map;
683
d49e8695786c Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 681
diff changeset
10
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 /**
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
12 * The default implementation of <code>Layer</code>.
699
af22fa5567a6 Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 690
diff changeset
13 *
684
57fa8019fbdc Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 683
diff changeset
14 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15 */
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16 public class DefaultLayer implements Layer {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 402
diff changeset
18
959
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
19 /**
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
20 * The id of this layer.
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
21 */
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22 private String id = null;
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 402
diff changeset
23
959
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
24 /**
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
25 * The name of this layer.
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
26 */
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
27 private String name = null;
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 402
diff changeset
28
959
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
29 /**
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
30 * Flag which defines if this layer is an grouplayer.
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
31 */
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 private boolean groupLayer = false;
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 402
diff changeset
33
959
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
34 /**
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
35 * The id of the parent layer or null if this layer is an rootlayer.
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
36 */
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 private String parentId = null;
699
af22fa5567a6 Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 690
diff changeset
38
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39 /**
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
40 * Constructor
959
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
41 *
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
42 * @param id the id of this layer
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
43 * @param name the name of this layer
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
44 * @param groupLayer flag which defines if this layer is an grouplayer
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
45 * @param parentId the id of the parent layer or null if this layer is an
0846c9c4abdd Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 700
diff changeset
46 * rootlayer
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 */
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48 public DefaultLayer(String id,String name,
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 boolean groupLayer,String parentId) {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 this.id = id;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
51 this.name = name;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
52 this.groupLayer = groupLayer;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53 this.parentId = parentId;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
54 }
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
56
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57 public String getID() {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
58 return this.id;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
59 }
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
60
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
61
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
62 public String getName() {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
63 return this.name;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
64 }
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
65
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
66
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
67 public boolean isGroupLayer() {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
68 return this.groupLayer;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
69 }
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
70
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
71
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
72 public String parentID() {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
73 return this.parentId;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
74 }
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 402
diff changeset
75
402
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
76 @Override
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
77 public String toString() {
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
78 return "ID: "+ this.id + " Name: "+this.name+
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
79 " IsGroupLayer: "+this.groupLayer+
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
80 " ParentID: "+this.parentId;
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
81 }
b88e881e8e94 Added the first Implementation (not complete and not ready to use) for the Interface from the MapViewer to the GNV
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
82 }
700
89ade245ca7a Using unix line endings only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 699
diff changeset
83 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org