Revision 47640
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/test/java/org/gvsig/fmap/dal/store/csv/TestCreate.java | ||
---|---|---|
331 | 331 |
} |
332 | 332 |
|
333 | 333 |
public void testCreateWithoutDALFile() throws Exception { |
334 |
FeatureStore sourceStore = openSourceStore1(); |
|
335 |
|
|
336 |
createFrom(sourceStore); |
|
337 |
removeDALFile(); |
|
338 |
|
|
339 |
checkTypes(sourceStore.getDefaultFeatureType()); |
|
340 |
copyFrom(sourceStore, FeatureStore.MODE_APPEND); |
|
341 |
removeDALFile(); |
|
342 |
checkData(sourceStore); |
|
343 |
|
|
344 |
createFrom(sourceStore); |
|
345 |
removeDALFile(); |
|
346 |
copyFrom(sourceStore, FeatureStore.MODE_FULLEDIT); |
|
347 |
removeDALFile(); |
|
348 |
checkData(sourceStore); |
|
334 |
try { |
|
335 |
FeatureStore sourceStore = openSourceStore1(); |
|
349 | 336 |
|
337 |
createFrom(sourceStore); |
|
338 |
removeDALFile(); |
|
339 |
|
|
340 |
checkTypes(sourceStore.getDefaultFeatureType()); |
|
341 |
copyFrom(sourceStore, FeatureStore.MODE_APPEND); |
|
342 |
removeDALFile(); |
|
343 |
checkData(sourceStore); |
|
344 |
|
|
345 |
createFrom(sourceStore); |
|
346 |
removeDALFile(); |
|
347 |
copyFrom(sourceStore, FeatureStore.MODE_FULLEDIT); |
|
348 |
removeDALFile(); |
|
349 |
checkData(sourceStore); |
|
350 |
} catch(Throwable t) { |
|
351 |
LOGGER.warn("",t); |
|
352 |
throw t; |
|
353 |
} |
|
350 | 354 |
} |
351 | 355 |
|
352 | 356 |
public void testCRLFAndQuotes() throws Exception { |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/java/org/gvsig/fmap/dal/store/csv/CSVFeatureTypeLoader.java | ||
---|---|---|
56 | 56 |
} |
57 | 57 |
|
58 | 58 |
|
59 |
|
|
60 |
protected String[] getHeaders(CSVStoreParameters parameters, SimpleReader reader) throws RuntimeException, IOException { |
|
59 |
protected String[] getHeaders(SimpleReader reader) throws RuntimeException, IOException { |
|
61 | 60 |
String headers[]; |
62 | 61 |
headers = CSVStoreParameters.getHeaders(parameters); |
63 | 62 |
if (headers == null) { |
... | ... | |
86 | 85 |
return headers; |
87 | 86 |
} |
88 | 87 |
|
89 |
protected void fillFeatureType(CSVStoreParameters parameters, EditableFeatureType fType, String headers[], AutomaticDetectionOfTypes.DetectedValue automaticTypes[]) {
|
|
88 |
protected void fillFeatureType(EditableFeatureType fType, String headers[], AutomaticDetectionOfTypes.DetectedValue automaticTypes[]) { |
|
90 | 89 |
String fullFileName = parameters.getFile()==null? "":parameters.getFile().getAbsolutePath(); |
91 | 90 |
String providerName = this.getProviderName(); |
92 | 91 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/resources/org/gvsig/fmap/dal/store/gml/GMLMetadata.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
Definitions of metadata fields of a shp file. |
|
4 |
--> |
|
5 |
<definitions> |
|
6 |
<version>1.0.0</version> |
|
7 |
<classes> |
|
8 |
|
|
9 |
<class name="GML" namespace="Metadata"> |
|
10 |
<extends> |
|
11 |
<class namespace="Metadata" name="SpatialProvider"/> |
|
12 |
</extends> |
|
13 |
<description>Metadata of a GML store</description> |
|
14 |
<fields> |
|
15 |
</fields> |
|
16 |
</class> |
|
17 |
|
|
18 |
</classes> |
|
19 |
</definitions> |
|
0 | 20 |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.csv/src/main/resources/org/gvsig/fmap/dal/store/gml/GMLParameters.xml | ||
---|---|---|
1 |
<?xml version= "1.0 "?> |
|
2 |
<definitions> |
|
3 |
<version>1.0.0</version> |
|
4 |
<classes> |
|
5 |
<class name="GMLStoreParameters"> |
|
6 |
<extends> |
|
7 |
<class namespace="dal" name="ProviderParameters"/> |
|
8 |
</extends> |
|
9 |
<tags> |
|
10 |
<value name="defaultGroup" value="Basic"/> |
|
11 |
</tags> |
|
12 |
<description>_GML_loading_parameters</description> |
|
13 |
<fields> |
|
14 |
<field name="File" type="file" mandatory="true" group="Basic"> |
|
15 |
<description>GML file</description> |
|
16 |
</field> |
|
17 |
<field name="locale" type="string" mandatory="true" defaultValue="DEFAULT" group="Basic"> |
|
18 |
<description>Locale used to parse double and float values (BCP47 language tag representing the locale)</description> |
|
19 |
<availableValues> |
|
20 |
<value label="Default (use system locale)">DEFAULT</value> |
|
21 |
<value label="Canada (english)">en-CA</value> |
|
22 |
<value label="Canada (french)">fr-CA</value> |
|
23 |
<value label="Chinese">zh</value> |
|
24 |
<value label="English">en</value> |
|
25 |
<value label="French">fr</value> |
|
26 |
<value label="German">de</value> |
|
27 |
<value label="Italian">it</value> |
|
28 |
<value label="Japanese">ja</value> |
|
29 |
<value label="Korea">ko</value> |
|
30 |
<value label="Spain">es</value> |
|
31 |
<value label="Uk">en-GB</value> |
|
32 |
<value label="Us">en-US</value> |
|
33 |
</availableValues> |
|
34 |
</field> |
|
35 |
<field name="charset" label="_Charset" type="string" mandatory="false" defaultValue="UTF-8" group="Basic"> |
|
36 |
<description>Sets the charset to use.</description> |
|
37 |
</field> |
|
38 |
<field name="automaticTypesDetection" label="_Automatic_type_detection" type="boolean" mandatory="false" defaultValue="true" group="Basic"> |
|
39 |
<description>This flag activate the autodetection of types in the GML. Can be slow.</description> |
|
40 |
</field> |
|
41 |
<field name="header" type="string" mandatory="false" defaultValue="" group="Advanced"> |
|
42 |
<description>The header or empty if parsed automatically</description> |
|
43 |
</field> |
|
44 |
<field name="skipLines" label="Number of lines to skip" type="integer" mandatory="false" defaultValue="0" group="Advanced"> |
|
45 |
<description>The number of lines to skip at begin of file</description> |
|
46 |
</field> |
|
47 |
<field name="fieldsDefinition" label="Fields definition" type="string" mandatory="false" defaultValue="" group="Advanced"> |
|
48 |
<description>If set use this to define fields of fixed length instead of use a separator.\nThe format is a list of values separateds by spaces of the form N:M\nwhere N is the position of the first character of field, and M the last.\nCan accept N: to use form the N character to the end of line.</description> |
|
49 |
</field> |
|
50 |
<field name="CRS" type="crs" mandatory="false" group="Geometry" order="10"> |
|
51 |
<description>The coordinate reference system used in this GML file if contains geometries</description> |
|
52 |
</field> |
|
53 |
<field name="fieldtypes" type="string" mandatory="false" defaultValue="" group="Advanced"> |
|
54 |
<description>Comma separated list of field types. If empty strings are assumed (Eg: integer,string,double,boolean,float,geometry).</description> |
|
55 |
</field> |
|
56 |
<field name="ignoreErrors" label="_Ignore_errors" type="boolean" mandatory="false" defaultValue="false" group="Basic"> |
|
57 |
<description>Set to true to ignore errors during load of data.</description> |
|
58 |
</field> |
|
59 |
<field name="limit" type="integer" mandatory="false" defaultValue="-1" group="Advanced"> |
|
60 |
<description>Limit the number of record to load of GML file.</description> |
|
61 |
</field> |
|
62 |
</fields> |
|
63 |
</class> |
|
64 |
</classes> |
|
65 |
</definitions> |
|
0 | 66 |
Also available in: Unified diff