Statistics
| Revision:

root / trunk / extensions / extWCS / src / com / iver / cit / gvsig / fmap / drivers / wcs / FMapWCSDriver.java @ 1877

History | View | Annotate | Download (3.54 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.fmap.drivers.wcs;
42

    
43
import java.io.IOException;
44

    
45
import com.iver.cit.gvsig.fmap.drivers.RemoteServiceDriver;
46

    
47
import es.uji.lsi.wcs.client.WCSClient;
48

    
49
/**
50
 * @author jaume
51
 *
52
 * TODO To change the template for this generated type comment go to
53
 * Window - Preferences - Java - Code Style - Code Templates
54
 */
55
public class FMapWCSDriver implements RemoteServiceDriver {
56
        private String service_name;
57
        private WCSClient wcs = null;
58
        private String host = null;
59
        
60
        public FMapWCSDriver(String host){
61
                setRemoteServiceName("WCS"); 
62
                this.host = host;
63
                wcs = new WCSClient(host);
64
        }
65
        
66
        public void getCapabilities(){
67
                wcs.getCapabilities();
68
        }
69

    
70
        public void describeCoverage(){
71
                wcs.describeCoverage();
72
        }
73
        
74
        public void getCoverage(){
75
                wcs.getCoverage();
76
        }
77

    
78
        public String getName(){
79
                return wcs.getTheCapabilities().getServiceName();
80
        }
81
        
82
        public String getLabel(){
83
                return wcs.getTheCapabilities().getServiceLabel();
84
        }
85
        
86
        public String getVersion(){
87
                return wcs.getTheCapabilities().getVersion();
88
        }
89
        
90
        public String getDescription(){
91
                return wcs.getTheCapabilities().getServiceDescription();
92
        }
93
        
94
        public String getUpdateSequence(){
95
                return wcs.getTheCapabilities().getUpdateSequence();
96
        }
97
        
98
        public String getMetadataLink(){
99
                return wcs.getTheCapabilities().getServiceMetadatalink();
100
        }
101
        
102
        public String getResponsibleParty(){
103
                return wcs.getTheCapabilities().getServiceResponsibleParty();
104
        }
105
        
106
        public String[] getCoverageNames(){
107
                return wcs.getTheCapabilities().getCoverageNames();
108
        }
109
        /* (non-Javadoc)
110
         * @see com.iver.cit.gvsig.fmap.drivers.RemoteServiceDriver#setRemoteServiceName(java.lang.String)
111
         */
112
        public final void setRemoteServiceName(String name) {
113
                service_name = name;
114
        }
115

    
116
        /* (non-Javadoc)
117
         * @see com.iver.cit.gvsig.fmap.drivers.RemoteServiceDriver#getRemoteServiceName()
118
         */
119
        public String getRemoteServiceName() {
120
                // TODO Auto-generated method stub
121
                return null;
122
        }
123

    
124
        /* (non-Javadoc)
125
         * @see com.iver.cit.gvsig.fmap.drivers.RemoteServiceDriver#connect(java.lang.String)
126
         */
127
        public void connect() throws IOException {
128
                // TODO Auto-generated method stub
129
                System.out.println("WCS>>> Faig GetCapabilities");
130
                getCapabilities();
131
                System.out.println("WCS>>> Acabe el GetCapabilities");
132
                //describeCoverage();
133
        }
134
        
135
        /* (non-Javadoc)
136
         * @see com.iver.cit.gvsig.fmap.drivers.RemoteServiceDriver#close()
137
         */
138
        public void close() {
139
                // No fa res, tal volta this= null?
140
        }
141
}