Statistics
| Revision:

gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / gvsig / javadocs / scripting / gvsig.java @ 742

History | View | Annotate | Download (6.29 KB)

1
package scripting;
2

    
3
import org.cresques.cts.IProjection;
4
import org.gvsig.fmap.dal.DataStore;
5
import org.gvsig.fmap.dal.feature.FeatureType;
6
import org.gvsig.fmap.mapcontext.layers.FLayer;
7
import org.gvsig.scripting.app.extension.ScriptingExtension;
8

    
9
/**
10
 * Representa al modulo python "gvsig".
11
 *
12
 * Es el modulo base que nos facilita el acceso a todos los componentes de
13
 * gvSIG.
14
 *
15
 */
16
public class gvsig {
17

    
18
    public static int LOGGER_INFO = ScriptingExtension.INFO;
19
    public static int LOGGER_WARN = ScriptingExtension.WARN;
20
    public static int LOGGER_ERROR = ScriptingExtension.ERROR;
21

    
22
    /**
23
     * Returns a new and empty attributes definition.
24
     *
25
     * @return the new FeatureType
26
     */
27
    public static FeatureType createFeatureType() {
28
        return null;
29
    }
30

    
31
    /**
32
     * Returns a new and empty attributes definition based in an existing
33
     * FeatureType.
34
     *
35
     * All attributes in the feature type pased as parameters are created in the
36
     * new definition
37
     *
38
     * @param featureType from the new attributes are copied
39
     * @return The new FeatureType
40
     */
41
    public static FeatureType createFeatureType(FeatureType featureType) {
42
        return null;
43
    }
44

    
45
    /**
46
     * Create a new layer with the specified parameters.
47
     *
48
     * The paramaters are used to connect to the server type and create the
49
     * layer. These parameters are specific of each type of layer.
50
     *
51
     * Valid values of server type are:
52
     * <ul>
53
     * <li>FilesystemExplorer</li>
54
     * <li>PostgreSQLExplorer</li>
55
     * <li>WFSServerExplorer</li>
56
     * <li>Wms Store</li>
57
     * <li>...</li>
58
     * </ul>
59
     *
60
     * Valid values of layer type are:
61
     * <ul>
62
     * <li>Shape</li>
63
     * <li>Dbf</li>
64
     * <li>DXF</li>
65
     * <li>DGN</li>
66
     * <li>DWG</li>
67
     * <li>JExcel</li>
68
     * <li>PostgreSQL</li>
69
     * <li>WFSStore</li>
70
     * <li>Gdal Store</li>
71
     * <li>...</li>
72
     * </ul>
73
     *
74
     * Excamples of use:<br>
75
     * <code>
76
     * TODO
77
     * </code>
78
     *
79
     * @param schema the schema to use to create la layer.
80
     * @param serverType The server type (filesystem, BBDD, ...)
81
     * @param layerType The layer type to create (Shape, ...)
82
     * @param parameters the specific parameters to create the new layer
83
     * @return the new created layer
84
     *
85
     */
86
    public static FLayer creaetLayer(FeatureType schema, String serverType, String layerType, Object... parameters) {
87
        return null;
88
    }
89

    
90
    /**
91
     * Create a new layer with the specified parameters.
92
     *
93
     * Use as default serverType the "FilesystemExplorer".
94
     *
95
     * @param schema
96
     * @param layerType
97
     * @param parameters
98
     * @return
99
     */
100
    public static FLayer creaetLayer(FeatureType schema, String layerType, Object... parameters) {
101
        return null;
102
    }
103

    
104
    /**
105
     * Load an existing shape file in the current view.
106
     *
107
     * @param path path to the shape file to load
108
     * @param projection to use to load the shape file
109
     * @return
110
     *
111
     */
112
    public static FLayer loadShapeFile(String path, String projection) {
113
        return null;
114
    }
115

    
116
    /**
117
     * Load an existing shape file in the current view.
118
     *
119
     * Use as default projection "CRS:84"
120
     *
121
     * @param path path to the shape file to load
122
     * @return
123
     *
124
     */
125
    public static FLayer loadShapeFile(String path) {
126
        return null;
127
    }
128

    
129
    /**
130
     * Load an existing layer and return it.
131
     *
132
     * Valid values of layer type are: - Shape - TODO
133
     *
134
     * @param layerType
135
     * @param parameters
136
     * @return
137
     *
138
     */
139
    public static FLayer loadLayer(String layerType, Object... parameters) {
140
        return null;
141
    }
142

    
143
    /**
144
     * Send a message to the log system.
145
     *
146
     * The values of mode are:
147
     * <ul>
148
     * <li>LOGGER_INFO</li>
149
     * <li>LOGGER_WARN</li>
150
     * <li>LOGGER_ERROR</li>
151
     * </ul>
152
     *
153
     * @param msg to send to log
154
     * @param mode message type, is optional with defaul of LOGGER_INFO.
155
     * @param exception an exception to log, is optional.
156
     */
157
    public static void logger(String msg, int mode, Throwable exception) {
158

    
159
    }
160

    
161
    /**
162
     * Create the path to a resource.
163
     *
164
     * This function runs like the os.path.join, but if the first argument is a
165
     * full path name to a file, it only get the dirname of it.
166
     *
167
     * This is usefull to use with the variable __file__ as the first argument
168
     * to get a path name to a resource relative to the current module.
169
     *
170
     * Explample:<br>
171
     * <code>
172
     *  pathname = getResource(__file__,"data","icon.png")
173
     * </code>
174
     *
175
     * @param parameters parts of path to the resource.
176
     * @return the path name to the resource.
177
     */
178
    public String getResource(String... parameters) {
179
        return null;
180
    }
181

    
182
    /**
183
     * Open an existen data store an return it.
184
     *
185
     * The type of store depened of store to be opened. It can be:
186
     * <ul>
187
     * <li>Shape</li>
188
     * <li>Dbf</li>
189
     * <li>DXF</li>
190
     * <li>DGN</li>
191
     * <li>DWG</li>
192
     * <li>JExcel</li>
193
     * <li>PostgreSQL</li>
194
     * <li>WFSStore</li>
195
     * <li>Gdal Store</li>
196
     * </ul>
197
     *
198
     * @param storeType the type of store to open.
199
     * @param parameters to open the store.
200
     * @return the opened data store
201
     */
202
    public DataStore openStore(String storeType, Object... parameters) {
203
        return null;
204
    }
205
    
206
    /**
207
     * Create a new projectionobject associated with the passed name of 
208
     * the projection.
209
     * 
210
     * Usually, the name is the abbreviation of the projection.
211
     * 
212
     * Is preferable to use this method <code>CRSFactory.getCRS(name)</code> instead.
213
     * 
214
     * @param name abbreviation of the projection
215
     * @return the projection object associated with the name
216
     */
217
    public IProjection getCRS(String name) {
218
        return null;
219
    }
220
    
221
    /**
222
     * Return the default data folder of gvSIG.
223
     * This is configured in the preferences of gvSIG.
224
     * 
225
     * @return the data folder of gvSIG
226
     */
227
    public String getDataFolder() {
228
        return null;
229
    }
230
    
231
    /**
232
     * Return the default projects folder of gvSIG.
233
     * This is configured in the preferences of gvSIG.
234
     * 
235
     * @return the projects folder of gvSIG.
236
     */
237
    public String getProjectsFolder() {
238
        return null;
239
    }
240
}