svn-gvsig-desktop / branches / gvSIG_WMSv2 / extensions / extWMS / src / com / iver / cit / gvsig / gui / wizard / LayerInfo.java @ 3377
History | View | Annotate | Download (2.47 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package com.iver.cit.gvsig.gui.wizard; |
42 |
|
43 |
import java.util.ArrayList; |
44 |
|
45 |
|
46 |
// Nodo[] nodos;
|
47 |
public class LayerInfo { |
48 |
public String text; |
49 |
public String name; |
50 |
public boolean queryable; |
51 |
private ArrayList srs = new ArrayList(); |
52 |
|
53 |
public ArrayList hijos = new ArrayList(); |
54 |
public LayerInfo padre;
|
55 |
|
56 |
/**
|
57 |
* DOCUMENT ME!
|
58 |
*
|
59 |
* @param srs DOCUMENT ME!
|
60 |
*/
|
61 |
public void addSRS(String srs) { |
62 |
String[] srsArray = srs.split(" "); |
63 |
for (int i = 0; i < srsArray.length; i++){ |
64 |
this.srs.add(srsArray[i]);
|
65 |
} |
66 |
} |
67 |
|
68 |
/**
|
69 |
* DOCUMENT ME!
|
70 |
*
|
71 |
* @return DOCUMENT ME!
|
72 |
*/
|
73 |
public ArrayList getSRSs() { |
74 |
ArrayList ret = new ArrayList(); |
75 |
ret.addAll(srs); |
76 |
|
77 |
if (padre != null) { |
78 |
ret.addAll(padre.getSRSs()); |
79 |
} |
80 |
|
81 |
return ret;
|
82 |
} |
83 |
|
84 |
/**
|
85 |
* DOCUMENT ME!
|
86 |
*
|
87 |
* @return DOCUMENT ME!
|
88 |
*/
|
89 |
public String toString() { |
90 |
return text;
|
91 |
} |
92 |
|
93 |
/* (non-Javadoc)
|
94 |
* @see java.lang.Object#equals(java.lang.Object)
|
95 |
*/
|
96 |
public boolean equals(Object obj) { |
97 |
try{
|
98 |
LayerInfo objeto = (LayerInfo) obj; |
99 |
return this.name.equals(objeto.name); |
100 |
}catch(ClassCastException e){ |
101 |
e.printStackTrace(); |
102 |
return false; |
103 |
}catch (NullPointerException e) { |
104 |
return false; |
105 |
} |
106 |
} |
107 |
} |