Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extWFS2 / src-test / org / gvsig / fmap / dal / store / wfs / WFSTest.java @ 30754

History | View | Annotate | Download (2.73 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.fmap.dal.store.wfs;
29

    
30
import java.io.File;
31

    
32
import org.gvsig.fmap.dal.DataStoreParameters;
33
import org.gvsig.fmap.dal.exception.DataException;
34
import org.gvsig.fmap.dal.feature.BaseTestFeatureStore;
35
import org.gvsig.gpe.GPELocator;
36
import org.gvsig.gpe.GPEManager;
37

    
38
/**
39
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
40
 */
41
public class WFSTest extends BaseTestFeatureStore {
42
        private String url = "http://inspire.cop.gva.es/geoserver/wfs";
43
        private String version = "1.0.0";
44
        private String featureType = "comunic_lin_300k";
45
        private String namespace = "http://inspire.cop.gva.es";
46
        private String namespacePrefix = "cit";        
47

    
48
        private String parsersFile = "config" + File.separatorChar + "parser.properties";        
49
        private GPEManager gpeManager = null;
50
        
51
        @Override
52
        protected void doSetUp() throws Exception {
53
                gpeManager = GPELocator.getGPEManager();
54
                gpeManager.addParsersFile(new File(parsersFile));                
55
        }
56

    
57
        /*
58
         * (non-Javadoc)
59
         *
60
         * @see
61
         * org.gvsig.fmap.dal.feature.BaseTestFeatureStore#getDefaultDataStoreParameters
62
         * ()
63
         */
64
        public DataStoreParameters getDefaultDataStoreParameters()
65
                        throws DataException {
66
                WFSStoreParameters parameters = null;
67

    
68
                parameters = (WFSStoreParameters) dataManager
69
                                .createStoreParameters(WFSStoreProvider.NAME);
70

    
71
                parameters.setUrl(url);
72
                parameters.setFeatureType(namespacePrefix, namespace, featureType);
73
                parameters.setVersion(version);
74
                //parameters.setFields(fields);
75
                return parameters;
76
        }
77

    
78
        /*
79
         * (non-Javadoc)
80
         *
81
         * @see org.gvsig.fmap.dal.feature.BaseTestFeatureStore#hasExplorer()
82
         */
83
        public boolean hasExplorer() {
84
                return true;
85
        }
86

    
87
        /* (non-Javadoc)
88
         * @see org.gvsig.fmap.dal.feature.BaseTestFeatureStore#usesResources()
89
         */
90
        @Override
91
        public boolean usesResources() {
92
                // TODO Auto-generated method stub
93
                return false;
94
        }
95

    
96

    
97
}
98

    
99