Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.newlayer / org.gvsig.newlayer.lib / org.gvsig.newlayer.lib.api / src / main / java / org / gvsig / newlayer / NewLayerService.java @ 47433

History | View | Annotate | Download (3.39 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
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 3
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.newlayer;
25

    
26
import java.util.List;
27
import org.cresques.cts.IProjection;
28

    
29
import org.gvsig.fmap.dal.DataServerExplorer;
30
import org.gvsig.fmap.dal.DataStoreParameters;
31
import org.gvsig.fmap.dal.feature.EditableFeatureType;
32
import org.gvsig.fmap.dal.feature.FeatureStore;
33
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
34
import org.gvsig.fmap.mapcontext.MapContext;
35

    
36
/**
37
 * <p>
38
 * This service is used to create a new {@link FeatureStore}.
39
 * </p>
40
 * 
41
 * @author gvSIG team
42
 * @version $Id$
43
 */
44
public interface NewLayerService {
45

    
46
    public interface NewLayerServiceListener {
47
        public void postCreateTable(NewLayerService service);
48
    }
49
    
50
    public class NewLayerServiceAdapter implements NewLayerServiceListener {
51

    
52
        @Override
53
        public void postCreateTable(NewLayerService service) {
54
        }
55
        
56
    }
57
    
58
    /**
59
     * @param type
60
     * @deprecated use {@link #setProviderFactory(NewLayerProviderFactory)}
61
     *             instead
62
     */
63
    public void setType(String type);
64

    
65
    /**
66
     * @return 
67
     * @deprecated use {@link #getProviderFactory()} instead
68
     */
69
    public String getType();
70

    
71
    /**
72
     * @return 
73
     * @deprecated use {@link #getProviderFactories()} instead
74
     */
75
    public List<String> getTypes();
76

    
77
    public void setProviderFactory(NewLayerProviderFactory type);
78
    
79
    public NewLayerProviderFactory getProviderFactory();
80

    
81
    public List<NewLayerProviderFactory> getProviderFactories();
82
    
83
    public void createTable() throws NewLayerServiceException;
84

    
85
//    public void loadTable() throws NewLayerServiceException;
86

    
87
    public DataServerExplorer getExplorer() throws NewLayerException;
88
    
89
    public String getStoreProviderName();
90
    
91
    public EditableFeatureType getFeatureType();
92
    
93
    public NewFeatureStoreParameters getNewStoreParameters() throws NewLayerException;
94
    
95
    public DataStoreParameters getOpenStoreParameters() throws NewLayerException;
96
    
97
    public NewFeatureStoreParameters getNewStoreParametersQuietly();
98
    
99
    public DataStoreParameters getOpenStoreParametersQuietly();
100
    
101
    public NewLayerProvider getProvider();
102
    
103
    public void setAddTableToProject(boolean b);
104
    
105
    public boolean isAddTableToProject();
106
    
107
//    public MapContext getMapContext();
108

    
109
    public void addNewLayerServiceListener(NewLayerServiceListener listener);
110
    
111
    public IProjection getDefaultProjection();
112
    
113
    public void setDefaultProjection(IProjection projection);
114
}