Statistics
| Revision:

svn-gvsig-desktop / tags / v2_0_0_Build_2020 / libraries / libRemoteServices / src / org / gvsig / remoteclient / wms / WMSServiceInformation.java @ 33910

History | View | Annotate | Download (4.37 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22

    
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2009 Iver T.I.  {{Task}}
26
*/
27
 
28
package org.gvsig.remoteclient.wms;
29

    
30
import java.util.Vector;
31

    
32
import org.gvsig.remoteclient.ogc.OGCClientOperation;
33
import org.gvsig.remoteclient.ogc.OGCServiceInformation;
34
import org.gvsig.remoteclient.utils.CapabilitiesTags;
35

    
36
/**
37
 * Class that represents the description of the WMS metadata.
38
 * The first part of the capabilities will return the service information
39
 * from the WMS, this class will hold this information.
40
 * 
41
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
42
 */
43
public class WMSServiceInformation extends OGCServiceInformation{
44
        /*public String map_online_resource = null;
45
    public String feature_online_resource = null;*/
46
    public String version;
47
    public String name;
48
    public String scope;
49
    public String title;
50
    public String abstr;
51
    public String keywords;
52
    public String fees;
53
    public String operationsInfo;
54
    public String personname;
55
    public String organization;
56
    public String function;
57
    public String addresstype;
58
    public String address;
59
    public String place;
60
    public String province;
61
    public String postcode;
62
    public String country;
63
    public String phone;
64
    public String fax;
65
    public String email;
66
    public Vector formats;
67

    
68
    public WMSServiceInformation()
69
    {
70
        version = new String();
71
        name = new String();
72
        scope = new String();
73
        title = new String();
74
        abstr = new String();
75
        keywords = new String();
76
        fees = new String();
77
        operationsInfo = new String();
78
        personname = new String();
79
        organization = new String();
80
        function = new String();
81
        addresstype = new String();
82
        address = new String();
83
        place = new String();
84
        province = new String();
85
        postcode = new String();
86
        country = new String();
87
        phone = new String();
88
        fax = new String();
89
        email = new String();
90
        formats = new Vector();       
91
    }
92
    
93
    public boolean isQueryable()
94
    {
95
            if (getOnlineResource(CapabilitiesTags.GETFEATUREINFO) != null)            
96
                    return true;
97
            else
98
                    return false;
99
    }
100
    
101
    public boolean hasLegendGraphic()
102
    {
103
            if (getOnlineResource(CapabilitiesTags.GETLEGENDGRAPHIC) != null) 
104
                    return true;
105
            else
106
                    return false;
107
    }
108
    
109
    public void clear() {
110
            version = new String();
111
        name = new String();
112
        scope = new String();
113
        title = new String();
114
        abstr = new String();
115
        keywords = new String();
116
        fees = new String();
117
        operationsInfo = new String();
118
        personname = new String();
119
        organization = new String();
120
        function = new String();
121
        addresstype = new String();
122
        address = new String();
123
        place = new String();
124
        province = new String();
125
        postcode = new String();
126
        country = new String();
127
        phone = new String();
128
        fax = new String();
129
        email = new String();
130
        formats = new Vector();        
131
    }      
132
    
133
        /* (non-Javadoc)
134
         * @see org.gvsig.remoteClient.ogc.OGCServiceInformation#createOperation(java.lang.String)
135
         */        
136
        public OGCClientOperation createOperation(String name) {
137
                return new WMSOperation(name); 
138
        }
139

    
140
        /* (non-Javadoc)
141
         * @see org.gvsig.remoteClient.ogc.OGCServiceInformation#createOperation(java.lang.String, java.lang.String)
142
         */        
143
        public OGCClientOperation createOperation(String name, String onlineResource) {
144
                return new WMSOperation(name, onlineResource);
145
        }        
146

    
147
 }
148