Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extWCS / src / com / iver / cit / gvsig / fmap / layers / WCSLayer.java @ 4573

History | View | Annotate | Download (4.08 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2005 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
/*
42
 * $Id: WCSLayer.java 4573 2006-03-24 07:56:07Z jaume $ 
43
 * $Log$
44
 * Revision 1.5  2006-03-24 07:55:53  jaume
45
 * *** empty log message ***
46
 *
47
 * Revision 1.4  2006/03/14 18:17:59  jaume
48
 * *** empty log message ***
49
 *
50
 * Revision 1.3  2006/03/14 17:36:44  jaume
51
 * *** empty log message ***
52
 *
53
 * Revision 1.2  2006/03/14 10:52:21  jaume
54
 * *** empty log message ***
55
 *
56
 * Revision 1.1  2006/03/10 10:25:03  jaume
57
 * *** empty log message ***
58
 * 
59
 */
60
package com.iver.cit.gvsig.fmap.layers;
61

    
62
import java.awt.geom.Point2D;
63
import java.awt.geom.Rectangle2D;
64
import java.util.ArrayList;
65
import java.util.Hashtable;
66

    
67
public class WCSLayer {
68
        
69
        private String name;
70
        private ArrayList srs;
71
        private String title;
72
        private String nativeSRS;
73
        private ArrayList formats;
74
        private Point2D maxRes;
75
        private ArrayList timePositions;
76
        private String description;
77
        private ArrayList interpolationMethods;
78
        private ArrayList pList;
79
        private Hashtable extents;
80

    
81
        public void setName(String name) {
82
                this.name = name;
83
        }
84

    
85
        public void addAllSrs(ArrayList srs) {
86
                if (this.srs == null)
87
                        this.srs = new ArrayList();
88
                this.srs.addAll(srs);
89
        }
90

    
91
        public void setTitle(String title) {
92
                this.title = title;
93
        }
94

    
95
        public void setNativeSRS(String nativeSRS) {
96
                this.nativeSRS = nativeSRS;
97
        }
98

    
99
        public String getName() {
100
                return name;
101
        }
102

    
103
        public void setFormats(ArrayList formats) {
104
                this.formats = formats;
105
        }
106

    
107
        public ArrayList getFormats() {
108
                return formats;
109
        }
110

    
111
        public ArrayList getSRSs() {
112
                if (!srs.contains(nativeSRS)) {
113
                        ArrayList l = new ArrayList(srs);
114
                        l.add(nativeSRS);
115
                        return l;
116
                }
117
                return srs;
118
        }
119

    
120
        public String getTitle() {
121
                return title;
122
        }
123

    
124
        public Rectangle2D getExtent(String srs) {
125
                if ( extents != null ) {
126
                        return (Rectangle2D) extents.get(srs);
127
                }
128
                return null;
129
        }
130
        
131
        public void addExtent(String srs, Rectangle2D extent) {
132
                if ( extents == null ) extents = new Hashtable();
133
                extents.put(srs, extent);
134
        }
135

    
136
        public Point2D getMaxRes() {
137
                return maxRes;
138
        }
139
        
140

    
141
        public void setMaxRes(Point2D maxRes) {
142
                this.maxRes = maxRes;
143
        }
144
        
145
        public String toString(){
146
            String str;
147
            if (getName()==null)
148
                    str = getTitle();
149
            else
150
                    str = "["+getName()+"] "+getTitle();
151
        return str;
152
    }
153

    
154
        public void setTimePositions(ArrayList timePositions) {
155
                this.timePositions = timePositions;
156
        }
157
    
158
        public ArrayList getTimePositions() {
159
                return this.timePositions;
160
        }
161

    
162
        public String getDescription() {
163
                return this.description;
164
        }
165
        
166
        public void setDescription(String descr) {
167
                this.description = descr;
168
        }
169

    
170
        public String getLonLatEnvelope() {
171
                return "yet unimplemented";
172
        }
173

    
174
        public void setInterpolationMethods(ArrayList interpolationMethods) {
175
                this.interpolationMethods = interpolationMethods;
176
        }
177
        
178
        public ArrayList getInterpolationMethods() {
179
                return interpolationMethods;
180
        }
181

    
182
        public void addParameter(FMapWCSParameter p) {
183
                if (pList == null) pList = new ArrayList();
184
                pList.add(p);
185
        }
186

    
187
        public ArrayList getParameterList() {
188
                return pList;
189
        }
190
}