Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / org.gvsig.arcims / src / org / gvsig / remoteclient / arcims / ArcImsFeatureClient.java @ 32538

History | View | Annotate | Download (3.21 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
 * 2010 Prodevelop S.L. main development
26
 * http://www.prodevelop.es
27
 */
28

    
29
package org.gvsig.remoteclient.arcims;
30

    
31
import java.awt.geom.Rectangle2D;
32
import java.util.List;
33

    
34
import org.gvsig.remoteclient.arcims.exceptions.ArcImsException;
35
import org.gvsig.remoteclient.arcims.utils.ArcImsFeature;
36
import org.gvsig.remoteclient.arcims.utils.ServiceInfoTags;
37
import org.gvsig.remoteclient.exceptions.ServerErrorException;
38

    
39
/**
40
 * Class that connects with ArcIMS and retrieves a Feature Layer
41
 * 
42
 * @author jsanz
43
 * @author vsanjaime version 2.0
44
 * 
45
 */
46
public class ArcImsFeatureClient extends ArcImsClient {
47
        /**
48
         * Constructor
49
         * 
50
         * @param host
51
         * @param service
52
         */
53
        public ArcImsFeatureClient(String serverURL, String serviceName) {
54
                // client to feature services
55
                super(serverURL, serviceName, ServiceInfoTags.vFEATURESERVICE);
56

    
57
        }
58

    
59
        /**
60
         * Requests a map
61
         * 
62
         * @param status
63
         * @return
64
         * @throws ArcImsException
65
         * @throws ServerErrorException
66
         */
67
        public List<List<ArcImsFeature>> getMap(ArcImsVectStatus status)
68
                        throws ArcImsException, ServerErrorException {
69
                // get features 
70
                return ((ArcImsProtFeatureHandler) handler).getMap(status);
71
        }
72

    
73
        /**
74
         * Requests service extent in view coordinates
75
         * 
76
         * @param status
77
         * @param subfields
78
         * @return
79
         * @throws ArcImsException
80
         * @throws ServerErrorException
81
         */
82
        public Rectangle2D getLayerExtent(ArcImsVectStatus status)
83
                        throws ArcImsException, ServerErrorException {
84
                return ((ArcImsProtFeatureHandler) handler).getLayerExtent(status);
85
        }
86

    
87
        /**
88
         * @param status
89
         * @param subfields
90
         * @param where
91
         * @param envelope
92
         * @return
93
         * @throws ArcImsException
94
         */
95
        public List<List<ArcImsFeature>> getAttributes(ArcImsVectStatus status,
96
                        String[] subfields, String where, Rectangle2D envelope)
97
                        throws ArcImsException {
98
                return ((ArcImsProtFeatureHandler) handler).getAttributes(status,
99
                                subfields, where, envelope);
100
        }
101

    
102
        /**
103
         * @param status
104
         * @param subfields
105
         * @param where
106
         * @param envelope
107
         * @return
108
         * @throws ArcImsException
109
         */
110
        public List<List<ArcImsFeature>> getAttributesWithEnvelope(
111
                        ArcImsVectStatus status, String[] subfields, String where,
112
                        Rectangle2D envelope) throws ArcImsException {
113
                return ((ArcImsProtFeatureHandler) handler).getAttributesWithEnvelope(
114
                                status, subfields, where, envelope);
115
        }
116
}