Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / org.gvsig.newlayer / org.gvsig.newlayer.lib / org.gvsig.newlayer.lib.api / src / main / java / org / gvsig / newlayer / NewLayerService.java @ 36721

History | View | Annotate | Download (2.74 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
package org.gvsig.newlayer;
24

    
25
import java.util.List;
26

    
27
import org.gvsig.fmap.dal.DataServerExplorer;
28
import org.gvsig.fmap.dal.feature.EditableFeatureType;
29
import org.gvsig.fmap.dal.feature.FeatureSet;
30
import org.gvsig.fmap.dal.feature.FeatureStore;
31
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
32
import org.gvsig.fmap.mapcontext.MapContext;
33
import org.gvsig.tools.task.MonitorableTask;
34

    
35
/**
36
 * <p>
37
 * This service is used to export a source {@link FeatureStore} to a
38
 * target {@link FeatureStore}. 
39
 * </p>
40
 * <p>
41
 * It inherits if {@link MonitorableTask}, and it means that the export 
42
 * process can be monitorized by one or more observers that can listen
43
 * all the export events.
44
 * <p>
45
 * @author gvSIG team
46
 * @version $Id$
47
 */
48
public interface NewLayerService {
49

    
50
    public void setType(String type);
51
    
52
    public String getType();
53

    
54
    public List<String> getTypes();
55
    
56
    /**
57
     * This method create a {@link FeatureSet} to other {@link FeatureSet}. 
58
     * The other necessary parameters to make this conversion are specific
59
     * for every {@link NewLayerService}. e.g: a shape exporter needs a 
60
     * file and a projection, a database exporter needs a connection parameters...
61
     * @param featureSet
62
     *          the set of features hat have to be exported.     
63
     * @throws NewLayerServiceException
64
     *          if there is any exception in the exporting process
65
     */
66
    public void createLayer() throws NewLayerServiceException;
67

    
68
        public void loadLayer() throws NewLayerServiceException;
69

    
70
    public DataServerExplorer getExplorer();
71
    
72
    public String getStoreName();
73
    
74
    public EditableFeatureType getFeatureType();
75
    
76
    public NewFeatureStoreParameters getNewStoreParameters();
77
    
78
    public NewLayerProvider getProvider();
79
    
80
    public void addLayerToView(boolean b);
81
    
82
    public MapContext getMapContext();
83
    
84
}