Revision 319
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLEuroroadsReader.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import org.gvsig.gpe.containers.Layer; |
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
6 |
* |
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id: GMLEuroroadsReader.java 202 2007-11-27 12:00:11Z jpiera $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.1 2007/06/08 13:01:12 jorpiell |
|
50 |
* Add the targetNamespace to the file |
|
51 |
* |
|
52 |
* |
|
53 |
*/ |
|
54 |
/** |
|
55 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
56 |
*/ |
|
57 |
public class GMLEuroroadsReader extends GMLReaderBaseTest { |
|
58 |
/* |
|
59 |
* (non-Javadoc) |
|
60 |
* @see org.gvsig.gpe.readers.GPEReaderBaseTest#getFile() |
|
61 |
*/ |
|
62 |
public String getFile() { |
|
63 |
return "testdata/euroroads.gml"; |
|
64 |
} |
|
65 |
|
|
66 |
/* |
|
67 |
* (non-Javadoc) |
|
68 |
* @see org.gvsig.gpe.gml.readers.GMLReaderBaseTest#hasSchema() |
|
69 |
*/ |
|
70 |
public boolean hasSchema() { |
|
71 |
return false; |
|
72 |
} |
|
73 |
|
|
74 |
/* |
|
75 |
* (non-Javadoc) |
|
76 |
* @see org.gvsig.gpe.readers.GPEReaderBaseTest#makeAsserts() |
|
77 |
*/ |
|
78 |
public void makeAsserts() { |
|
79 |
Layer[] layers = getLayers(); |
|
80 |
assertEquals(1, layers.length); |
|
81 |
Layer layer = layers[0]; |
|
82 |
assertEquals(10, layer.getFeatures().size()); |
|
83 |
} |
|
84 |
} |
|
0 | 85 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLMultiSurfaceReader.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
|
|
5 |
import org.gvsig.gpe.containers.Layer; |
|
6 |
|
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
8 |
* |
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
10 |
* |
|
11 |
* This program is free software; you can redistribute it and/or |
|
12 |
* modify it under the terms of the GNU General Public License |
|
13 |
* as published by the Free Software Foundation; either version 2 |
|
14 |
* of the License, or (at your option) any later version. |
|
15 |
* |
|
16 |
* This program is distributed in the hope that it will be useful, |
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19 |
* GNU General Public License for more details. |
|
20 |
* |
|
21 |
* You should have received a copy of the GNU General Public License |
|
22 |
* along with this program; if not, write to the Free Software |
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
24 |
* |
|
25 |
* For more information, contact: |
|
26 |
* |
|
27 |
* Generalitat Valenciana |
|
28 |
* Conselleria d'Infraestructures i Transport |
|
29 |
* Av. Blasco Ib??ez, 50 |
|
30 |
* 46010 VALENCIA |
|
31 |
* SPAIN |
|
32 |
* |
|
33 |
* +34 963862235 |
|
34 |
* gvsig@gva.es |
|
35 |
* www.gvsig.gva.es |
|
36 |
* |
|
37 |
* or |
|
38 |
* |
|
39 |
* IVER T.I. S.A |
|
40 |
* Salamanca 50 |
|
41 |
* 46005 Valencia |
|
42 |
* Spain |
|
43 |
* |
|
44 |
* +34 963163400 |
|
45 |
* dac@iver.es |
|
46 |
*/ |
|
47 |
/* CVS MESSAGES: |
|
48 |
* |
|
49 |
* $Id$ |
|
50 |
* $Log$ |
|
51 |
* |
|
52 |
*/ |
|
53 |
/** |
|
54 |
* @author Jorge Piera Llodr? (jorge.piera@iver.es) |
|
55 |
*/ |
|
56 |
public class GMLMultiSurfaceReader extends GMLReaderBaseTest { |
|
57 |
|
|
58 |
/* |
|
59 |
* (non-Javadoc) |
|
60 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#getFile() |
|
61 |
*/ |
|
62 |
public String getFile() { |
|
63 |
return "testdata/MultiSurface.gml"; |
|
64 |
} |
|
65 |
|
|
66 |
/* |
|
67 |
* (non-Javadoc) |
|
68 |
* @see org.gvsig.gpe.gml.parser.GMLReaderBaseTest#hasSchema() |
|
69 |
*/ |
|
70 |
public boolean hasSchema() { |
|
71 |
// TODO Auto-generated method stub |
|
72 |
return false; |
|
73 |
} |
|
74 |
|
|
75 |
/* |
|
76 |
* (non-Javadoc) |
|
77 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#makeAsserts() |
|
78 |
*/ |
|
79 |
public void makeAsserts() { |
|
80 |
assertEquals(1, getLayers().length); |
|
81 |
Layer layer = getLayers()[0]; |
|
82 |
ArrayList features = layer.getFeatures(); |
|
83 |
assertEquals(1, features.size()); |
|
84 |
} |
|
85 |
} |
|
0 | 86 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLProvinciasIDEEReader.java | ||
---|---|---|
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.gpe.gml.parser; |
|
29 |
|
|
30 |
import org.gvsig.gpe.containers.Layer; |
|
31 |
|
|
32 |
public class GMLProvinciasIDEEReader extends GMLReaderBaseTest { |
|
33 |
/* |
|
34 |
* (non-Javadoc) |
|
35 |
* @see org.gvsig.gpe.readers.GPEReaderBaseTest#getFile() |
|
36 |
*/ |
|
37 |
public String getFile() { |
|
38 |
return "testdata/ProvinciasIDEE.gml"; |
|
39 |
} |
|
40 |
|
|
41 |
/* |
|
42 |
* (non-Javadoc) |
|
43 |
* @see org.gvsig.gpe.gml.readers.GMLReaderBaseTest#hasSchema() |
|
44 |
*/ |
|
45 |
public boolean hasSchema() { |
|
46 |
return false; |
|
47 |
} |
|
48 |
|
|
49 |
/* |
|
50 |
* (non-Javadoc) |
|
51 |
* @see org.gvsig.gpe.readers.GPEReaderBaseTest#makeAsserts() |
|
52 |
*/ |
|
53 |
public void makeAsserts() { |
|
54 |
Layer[] layers = getLayers(); |
|
55 |
assertEquals(layers.length, 1); |
|
56 |
Layer layer = layers[0]; |
|
57 |
assertEquals(52, layer.getFeatures().size()); |
|
58 |
|
|
59 |
} |
|
60 |
|
|
61 |
} |
|
62 |
|
|
0 | 63 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLMultiLineStringTest.java | ||
---|---|---|
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.gpe.gml.parser; |
|
29 |
|
|
30 |
import java.util.ArrayList; |
|
31 |
|
|
32 |
import org.gvsig.gpe.containers.Layer; |
|
33 |
|
|
34 |
public class GMLMultiLineStringTest extends GMLReaderBaseTest { |
|
35 |
|
|
36 |
/* |
|
37 |
* (non-Javadoc) |
|
38 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#getFile() |
|
39 |
*/ |
|
40 |
public String getFile() { |
|
41 |
return "testdata/MultiLineString.gml"; |
|
42 |
} |
|
43 |
|
|
44 |
/* |
|
45 |
* (non-Javadoc) |
|
46 |
* @see org.gvsig.gpe.gml.parser.GMLReaderBaseTest#hasSchema() |
|
47 |
*/ |
|
48 |
public boolean hasSchema() { |
|
49 |
// TODO Auto-generated method stub |
|
50 |
return false; |
|
51 |
} |
|
52 |
|
|
53 |
/* |
|
54 |
* (non-Javadoc) |
|
55 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#makeAsserts() |
|
56 |
*/ |
|
57 |
public void makeAsserts() { |
|
58 |
assertEquals(1, getLayers().length); |
|
59 |
Layer layer = getLayers()[0]; |
|
60 |
ArrayList features = layer.getFeatures(); |
|
61 |
assertEquals(846, features.size()); |
|
62 |
} |
|
63 |
} |
|
64 |
|
|
65 |
|
|
0 | 66 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLCurvesReader.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
/** |
|
42 |
* @autor Carlos S?nchez Peri??n (csanper) |
|
43 |
**/ |
|
44 |
|
|
45 |
package org.gvsig.gpe.gml.parser; |
|
46 |
|
|
47 |
import java.util.ArrayList; |
|
48 |
|
|
49 |
import org.gvsig.gpe.containers.Layer; |
|
50 |
|
|
51 |
public class GMLCurvesReader extends GMLReaderBaseTest { |
|
52 |
|
|
53 |
/* |
|
54 |
* (non-Javadoc) |
|
55 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#getFile() |
|
56 |
*/ |
|
57 |
public String getFile() { |
|
58 |
return "testdata/GML-curves.gml"; |
|
59 |
} |
|
60 |
|
|
61 |
/* |
|
62 |
* (non-Javadoc) |
|
63 |
* @see org.gvsig.gpe.gml.parser.GMLReaderBaseTest#hasSchema() |
|
64 |
*/ |
|
65 |
public boolean hasSchema() { |
|
66 |
// TODO Auto-generated method stub |
|
67 |
return false; |
|
68 |
} |
|
69 |
|
|
70 |
/* |
|
71 |
* (non-Javadoc) |
|
72 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#makeAsserts() |
|
73 |
*/ |
|
74 |
public void makeAsserts() { |
|
75 |
assertEquals(1, getLayers().length); |
|
76 |
Layer layer = getLayers()[0]; |
|
77 |
ArrayList features = layer.getFeatures(); |
|
78 |
assertEquals(1, features.size()); |
|
79 |
} |
|
80 |
} |
|
0 | 81 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLSFP0Reader.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
/** |
|
42 |
* @autor Carlos S?nchez Peri??n (csanper) |
|
43 |
**/ |
|
44 |
package org.gvsig.gpe.gml.parser; |
|
45 |
|
|
46 |
import java.util.ArrayList; |
|
47 |
|
|
48 |
import org.gvsig.gpe.containers.Layer; |
|
49 |
|
|
50 |
public class GMLSFP0Reader extends GMLReaderBaseTest{ |
|
51 |
|
|
52 |
/* |
|
53 |
* (non-Javadoc) |
|
54 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#getFile() |
|
55 |
*/ |
|
56 |
public String getFile() { |
|
57 |
return "testdata/EjemploSPF0.xml"; |
|
58 |
} |
|
59 |
|
|
60 |
/* |
|
61 |
* (non-Javadoc) |
|
62 |
* @see org.gvsig.gpe.gml.parser.GMLReaderBaseTest#hasSchema() |
|
63 |
*/ |
|
64 |
public boolean hasSchema() { |
|
65 |
// TODO Auto-generated method stub |
|
66 |
return false; |
|
67 |
} |
|
68 |
|
|
69 |
/* |
|
70 |
* (non-Javadoc) |
|
71 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#makeAsserts() |
|
72 |
*/ |
|
73 |
public void makeAsserts() { |
|
74 |
assertEquals(1, getLayers().length); |
|
75 |
Layer layer = getLayers()[0]; |
|
76 |
ArrayList features = layer.getFeatures(); |
|
77 |
assertEquals(2, features.size()); |
|
78 |
} |
|
79 |
|
|
80 |
} |
|
0 | 81 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLNomenclatorIdeeReader.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import org.gvsig.gpe.containers.Layer; |
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
6 |
* |
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id: GMLNomenclatorIdeeReader.java 147 2007-06-08 13:01:44Z jorpiell $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.1 2007/06/08 13:01:12 jorpiell |
|
50 |
* Add the targetNamespace to the file |
|
51 |
* |
|
52 |
* |
|
53 |
*/ |
|
54 |
/** |
|
55 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
56 |
*/ |
|
57 |
public class GMLNomenclatorIdeeReader extends GMLReaderBaseTest { |
|
58 |
/* |
|
59 |
* (non-Javadoc) |
|
60 |
* @see org.gvsig.gpe.readers.GPEReaderBaseTest#getFile() |
|
61 |
*/ |
|
62 |
public String getFile() { |
|
63 |
return "testdata/GMLNomenclatorIdee.gml"; |
|
64 |
} |
|
65 |
|
|
66 |
/* |
|
67 |
* (non-Javadoc) |
|
68 |
* @see org.gvsig.gpe.gml.readers.GMLReaderBaseTest#hasSchema() |
|
69 |
*/ |
|
70 |
public boolean hasSchema() { |
|
71 |
return false; |
|
72 |
} |
|
73 |
|
|
74 |
/* |
|
75 |
* (non-Javadoc) |
|
76 |
* @see org.gvsig.gpe.readers.GPEReaderBaseTest#makeAsserts() |
|
77 |
*/ |
|
78 |
public void makeAsserts() { |
|
79 |
Layer[] layers = getLayers(); |
|
80 |
assertEquals(layers.length, 1); |
|
81 |
Layer layer = layers[0]; |
|
82 |
assertEquals(1, layer.getFeatures().size()); |
|
83 |
|
|
84 |
} |
|
85 |
|
|
86 |
} |
|
0 | 87 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLLinesReader.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
|
|
5 |
import org.gvsig.gpe.containers.Layer; |
|
6 |
|
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
8 |
* |
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
10 |
* |
|
11 |
* This program is free software; you can redistribute it and/or |
|
12 |
* modify it under the terms of the GNU General Public License |
|
13 |
* as published by the Free Software Foundation; either version 2 |
|
14 |
* of the License, or (at your option) any later version. |
|
15 |
* |
|
16 |
* This program is distributed in the hope that it will be useful, |
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19 |
* GNU General Public License for more details. |
|
20 |
* |
|
21 |
* You should have received a copy of the GNU General Public License |
|
22 |
* along with this program; if not, write to the Free Software |
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
24 |
* |
|
25 |
* For more information, contact: |
|
26 |
* |
|
27 |
* Generalitat Valenciana |
|
28 |
* Conselleria d'Infraestructures i Transport |
|
29 |
* Av. Blasco Ib??ez, 50 |
|
30 |
* 46010 VALENCIA |
|
31 |
* SPAIN |
|
32 |
* |
|
33 |
* +34 963862235 |
|
34 |
* gvsig@gva.es |
|
35 |
* www.gvsig.gva.es |
|
36 |
* |
|
37 |
* or |
|
38 |
* |
|
39 |
* IVER T.I. S.A |
|
40 |
* Salamanca 50 |
|
41 |
* 46005 Valencia |
|
42 |
* Spain |
|
43 |
* |
|
44 |
* +34 963163400 |
|
45 |
* dac@iver.es |
|
46 |
*/ |
|
47 |
/* CVS MESSAGES: |
|
48 |
* |
|
49 |
* $Id: GMLLinesReader.java 73 2007-04-20 08:33:37Z jorpiell $ |
|
50 |
* $Log$ |
|
51 |
* Revision 1.1 2007/04/20 08:33:37 jorpiell |
|
52 |
* Test updated |
|
53 |
* |
|
54 |
* |
|
55 |
*/ |
|
56 |
/** |
|
57 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
58 |
*/ |
|
59 |
public class GMLLinesReader extends GMLReaderBaseTest { |
|
60 |
|
|
61 |
/* |
|
62 |
* (non-Javadoc) |
|
63 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#getFile() |
|
64 |
*/ |
|
65 |
public String getFile() { |
|
66 |
return "testdata/GML-lines.gml"; |
|
67 |
} |
|
68 |
|
|
69 |
/* |
|
70 |
* (non-Javadoc) |
|
71 |
* @see org.gvsig.gpe.gml.parser.GMLReaderBaseTest#hasSchema() |
|
72 |
*/ |
|
73 |
public boolean hasSchema() { |
|
74 |
// TODO Auto-generated method stub |
|
75 |
return false; |
|
76 |
} |
|
77 |
|
|
78 |
/* |
|
79 |
* (non-Javadoc) |
|
80 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#makeAsserts() |
|
81 |
*/ |
|
82 |
public void makeAsserts() { |
|
83 |
assertEquals(1, getLayers().length); |
|
84 |
Layer layer = getLayers()[0]; |
|
85 |
ArrayList features = layer.getFeatures(); |
|
86 |
assertEquals(10, features.size()); |
|
87 |
} |
|
88 |
} |
|
0 | 89 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLReaderBaseTest.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import org.gvsig.gpe.parser.GPEReaderBaseTest; |
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
6 |
* |
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id: GMLReaderBaseTest.java 202 2007-11-27 12:00:11Z jpiera $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.5 2007/05/18 10:41:01 csanchez |
|
50 |
* Actualizaciรณn libGPE-GML eliminaciรณn de clases inecesarias |
|
51 |
* |
|
52 |
* Revision 1.4 2007/04/20 08:33:37 jorpiell |
|
53 |
* Test updated |
|
54 |
* |
|
55 |
* Revision 1.3 2007/04/20 08:13:43 csanchez |
|
56 |
* Actualizacion protoripo libGPE |
|
57 |
* |
|
58 |
* Revision 1.2 2007/04/13 07:17:57 jorpiell |
|
59 |
* Add the writting tests for the simple geometries |
|
60 |
* |
|
61 |
* Revision 1.1 2007/04/12 10:24:12 jorpiell |
|
62 |
* Add the GML and schema tests |
|
63 |
* |
|
64 |
* |
|
65 |
*/ |
|
66 |
/** |
|
67 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
68 |
*/ |
|
69 |
public abstract class GMLReaderBaseTest extends GPEReaderBaseTest { |
|
70 |
|
|
71 |
//Aqui se le pasa la clase |
|
72 |
public Class getGPEParserClass() { |
|
73 |
return org.gvsig.gpe.gml.parser.GPEGmlSFP0Parser.class; |
|
74 |
} |
|
75 |
|
|
76 |
/** |
|
77 |
* Return if the GML has a schema |
|
78 |
* @return |
|
79 |
*/ |
|
80 |
public abstract boolean hasSchema(); |
|
81 |
|
|
82 |
} |
|
0 | 83 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GML3PuntosReader.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
/** |
|
42 |
* @autor Carlos S?nchez Peri??n (csanper) |
|
43 |
**/ |
|
44 |
package org.gvsig.gpe.gml.parser; |
|
45 |
|
|
46 |
import java.util.ArrayList; |
|
47 |
|
|
48 |
import org.gvsig.gpe.containers.Layer; |
|
49 |
|
|
50 |
public class GML3PuntosReader extends GMLReaderBaseTest{ |
|
51 |
|
|
52 |
/* |
|
53 |
* (non-Javadoc) |
|
54 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#getFile() |
|
55 |
*/ |
|
56 |
public String getFile() { |
|
57 |
return "testdata/EjemploPuntosGML3.xml"; |
|
58 |
} |
|
59 |
|
|
60 |
/* |
|
61 |
* (non-Javadoc) |
|
62 |
* @see org.gvsig.gpe.gml.parser.GMLReaderBaseTest#hasSchema() |
|
63 |
*/ |
|
64 |
public boolean hasSchema() { |
|
65 |
// TODO Auto-generated method stub |
|
66 |
return false; |
|
67 |
} |
|
68 |
|
|
69 |
/* |
|
70 |
* (non-Javadoc) |
|
71 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#makeAsserts() |
|
72 |
*/ |
|
73 |
public void makeAsserts() { |
|
74 |
assertEquals(1, getLayers().length); |
|
75 |
Layer layer = getLayers()[0]; |
|
76 |
ArrayList features = layer.getFeatures(); |
|
77 |
assertEquals(241, features.size()); |
|
78 |
} |
|
79 |
|
|
80 |
} |
|
0 | 81 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLReadersTestSuite.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import junit.framework.Test; |
|
4 |
import junit.framework.TestSuite; |
|
5 |
|
|
6 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
7 |
* |
|
8 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
9 |
* |
|
10 |
* This program is free software; you can redistribute it and/or |
|
11 |
* modify it under the terms of the GNU General Public License |
|
12 |
* as published by the Free Software Foundation; either version 2 |
|
13 |
* of the License, or (at your option) any later version. |
|
14 |
* |
|
15 |
* This program is distributed in the hope that it will be useful, |
|
16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
* GNU General Public License for more details. |
|
19 |
* |
|
20 |
* You should have received a copy of the GNU General Public License |
|
21 |
* along with this program; if not, write to the Free Software |
|
22 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
23 |
* |
|
24 |
* For more information, contact: |
|
25 |
* |
|
26 |
* Generalitat Valenciana |
|
27 |
* Conselleria d'Infraestructures i Transport |
|
28 |
* Av. Blasco Ib??ez, 50 |
|
29 |
* 46010 VALENCIA |
|
30 |
* SPAIN |
|
31 |
* |
|
32 |
* +34 963862235 |
|
33 |
* gvsig@gva.es |
|
34 |
* www.gvsig.gva.es |
|
35 |
* |
|
36 |
* or |
|
37 |
* |
|
38 |
* IVER T.I. S.A |
|
39 |
* Salamanca 50 |
|
40 |
* 46005 Valencia |
|
41 |
* Spain |
|
42 |
* |
|
43 |
* +34 963163400 |
|
44 |
* dac@iver.es |
|
45 |
*/ |
|
46 |
/* CVS MESSAGES: |
|
47 |
* |
|
48 |
* $Id: GMLReadersTestSuite.java 346 2008-01-08 15:35:58Z jpiera $ |
|
49 |
* $Log$ |
|
50 |
* Revision 1.6 2007/06/11 06:17:36 jorpiell |
|
51 |
* Add a new GML test |
|
52 |
* |
|
53 |
* Revision 1.5 2007/06/08 13:01:12 jorpiell |
|
54 |
* Add the targetNamespace to the file |
|
55 |
* |
|
56 |
* Revision 1.4 2007/05/16 12:34:55 csanchez |
|
57 |
* GPEParser Prototipo final de lectura |
|
58 |
* |
|
59 |
* Revision 1.3 2007/04/25 11:08:38 csanchez |
|
60 |
* Parseo correcto con XSOM de esquemas, EntityResolver para los imports |
|
61 |
* |
|
62 |
* Revision 1.2 2007/04/20 08:33:37 jorpiell |
|
63 |
* Test updated |
|
64 |
* |
|
65 |
* Revision 1.1 2007/04/20 08:13:43 csanchez |
|
66 |
* Actualizacion protoripo libGPE |
|
67 |
* |
|
68 |
* |
|
69 |
*/ |
|
70 |
/** |
|
71 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
72 |
*/ |
|
73 |
public class GMLReadersTestSuite { |
|
74 |
|
|
75 |
public static Test suite() { |
|
76 |
TestSuite suite = new TestSuite("Test for org.gvsig.gpe.gml.readers"); |
|
77 |
//$JUnit-BEGIN$ |
|
78 |
suite.addTestSuite(GMLLinesReader.class); |
|
79 |
suite.addTestSuite(GMLPointsReader.class); |
|
80 |
suite.addTestSuite(GMLEuroroadsReader.class); |
|
81 |
suite.addTestSuite(GMLNomenclatorIdeeReader.class); |
|
82 |
suite.addTestSuite(GMLAforosReader.class); |
|
83 |
suite.addTestSuite(GMLCurvesReader.class); |
|
84 |
suite.addTestSuite(GMLIDEECosntruccionesReader.class); |
|
85 |
suite.addTestSuite(GMLfromSHPReader.class); |
|
86 |
suite.addTestSuite(GMLCitiesReader.class); |
|
87 |
suite.addTestSuite(GMLMultiSurfaceReader.class); |
|
88 |
suite.addTestSuite(GMLProvinciasIDEEReader.class); |
|
89 |
suite.addTestSuite(GMLMultiPolygonTest.class); |
|
90 |
suite.addTestSuite(GMLMultiLineStringTest.class); |
|
91 |
//$JUnit-END$ |
|
92 |
return suite; |
|
93 |
} |
|
94 |
|
|
95 |
} |
|
0 | 96 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLPointsReader.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
|
|
5 |
import org.gvsig.gpe.containers.Layer; |
|
6 |
|
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
8 |
* |
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
10 |
* |
|
11 |
* This program is free software; you can redistribute it and/or |
|
12 |
* modify it under the terms of the GNU General Public License |
|
13 |
* as published by the Free Software Foundation; either version 2 |
|
14 |
* of the License, or (at your option) any later version. |
|
15 |
* |
|
16 |
* This program is distributed in the hope that it will be useful, |
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19 |
* GNU General Public License for more details. |
|
20 |
* |
|
21 |
* You should have received a copy of the GNU General Public License |
|
22 |
* along with this program; if not, write to the Free Software |
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
24 |
* |
|
25 |
* For more information, contact: |
|
26 |
* |
|
27 |
* Generalitat Valenciana |
|
28 |
* Conselleria d'Infraestructures i Transport |
|
29 |
* Av. Blasco Ib??ez, 50 |
|
30 |
* 46010 VALENCIA |
|
31 |
* SPAIN |
|
32 |
* |
|
33 |
* +34 963862235 |
|
34 |
* gvsig@gva.es |
|
35 |
* www.gvsig.gva.es |
|
36 |
* |
|
37 |
* or |
|
38 |
* |
|
39 |
* IVER T.I. S.A |
|
40 |
* Salamanca 50 |
|
41 |
* 46005 Valencia |
|
42 |
* Spain |
|
43 |
* |
|
44 |
* +34 963163400 |
|
45 |
* dac@iver.es |
|
46 |
*/ |
|
47 |
/* CVS MESSAGES: |
|
48 |
* |
|
49 |
* $Id: GMLPointsReader.java 76 2007-04-25 11:08:38Z csanchez $ |
|
50 |
* $Log$ |
|
51 |
* Revision 1.1 2007/04/25 11:08:38 csanchez |
|
52 |
* Parseo correcto con XSOM de esquemas, EntityResolver para los imports |
|
53 |
* |
|
54 |
* |
|
55 |
*/ |
|
56 |
/** |
|
57 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
58 |
*/ |
|
59 |
public class GMLPointsReader extends GMLReaderBaseTest { |
|
60 |
|
|
61 |
/* |
|
62 |
* (non-Javadoc) |
|
63 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#getFile() |
|
64 |
*/ |
|
65 |
public String getFile() { |
|
66 |
return "testdata/GML-points.gml"; |
|
67 |
} |
|
68 |
|
|
69 |
/* |
|
70 |
* (non-Javadoc) |
|
71 |
* @see org.gvsig.gpe.gml.parser.GMLReaderBaseTest#hasSchema() |
|
72 |
*/ |
|
73 |
public boolean hasSchema() { |
|
74 |
// TODO Auto-generated method stub |
|
75 |
return false; |
|
76 |
} |
|
77 |
|
|
78 |
/* |
|
79 |
* (non-Javadoc) |
|
80 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#makeAsserts() |
|
81 |
*/ |
|
82 |
public void makeAsserts() { |
|
83 |
assertEquals(1, getLayers().length); |
|
84 |
Layer layer = getLayers()[0]; |
|
85 |
ArrayList features = layer.getFeatures(); |
|
86 |
assertEquals(25, features.size()); |
|
87 |
} |
|
88 |
} |
|
0 | 89 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLEscapeCharacters.java | ||
---|---|---|
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.gpe.gml.parser; |
|
29 |
|
|
30 |
import java.util.ArrayList; |
|
31 |
|
|
32 |
import org.gvsig.gpe.containers.Layer; |
|
33 |
|
|
34 |
public class GMLEscapeCharacters extends GMLReaderBaseTest { |
|
35 |
|
|
36 |
/* |
|
37 |
* (non-Javadoc) |
|
38 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#getFile() |
|
39 |
*/ |
|
40 |
public String getFile() { |
|
41 |
return "testdata/escape-characters.gml"; |
|
42 |
} |
|
43 |
|
|
44 |
/* |
|
45 |
* (non-Javadoc) |
|
46 |
* @see org.gvsig.gpe.gml.parser.GMLReaderBaseTest#hasSchema() |
|
47 |
*/ |
|
48 |
public boolean hasSchema() { |
|
49 |
// TODO Auto-generated method stub |
|
50 |
return false; |
|
51 |
} |
|
52 |
|
|
53 |
/* |
|
54 |
* (non-Javadoc) |
|
55 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#makeAsserts() |
|
56 |
*/ |
|
57 |
public void makeAsserts() { |
|
58 |
assertEquals(1, getLayers().length); |
|
59 |
Layer layer = getLayers()[0]; |
|
60 |
ArrayList features = layer.getFeatures(); |
|
61 |
assertEquals(85, features.size()); |
|
62 |
|
|
63 |
} |
|
64 |
} |
|
65 |
|
|
0 | 66 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLfromSHPReader.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import org.gvsig.gpe.containers.Layer; |
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
6 |
* |
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id$ |
|
48 |
* $Log$ |
|
49 |
* |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
53 |
*/ |
|
54 |
public class GMLfromSHPReader extends GMLReaderBaseTest { |
|
55 |
/* |
|
56 |
* (non-Javadoc) |
|
57 |
* @see org.gvsig.gpe.readers.GPEReaderBaseTest#getFile() |
|
58 |
*/ |
|
59 |
public String getFile() { |
|
60 |
return "testdata/fromSHP.gml"; |
|
61 |
} |
|
62 |
|
|
63 |
/* |
|
64 |
* (non-Javadoc) |
|
65 |
* @see org.gvsig.gpe.gml.readers.GMLReaderBaseTest#hasSchema() |
|
66 |
*/ |
|
67 |
public boolean hasSchema() { |
|
68 |
return false; |
|
69 |
} |
|
70 |
|
|
71 |
/* |
|
72 |
* (non-Javadoc) |
|
73 |
* @see org.gvsig.gpe.readers.GPEReaderBaseTest#makeAsserts() |
|
74 |
*/ |
|
75 |
public void makeAsserts() { |
|
76 |
Layer[] layers = getLayers(); |
|
77 |
assertEquals(layers.length, 1); |
|
78 |
Layer layer = layers[0]; |
|
79 |
assertEquals(2643, layer.getFeatures().size()); |
|
80 |
|
|
81 |
} |
|
82 |
} |
|
0 | 83 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLMultiPolygonTest.java | ||
---|---|---|
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.gpe.gml.parser; |
|
29 |
|
|
30 |
import java.util.ArrayList; |
|
31 |
|
|
32 |
import org.gvsig.gpe.containers.Layer; |
|
33 |
|
|
34 |
public class GMLMultiPolygonTest extends GMLReaderBaseTest { |
|
35 |
|
|
36 |
/* |
|
37 |
* (non-Javadoc) |
|
38 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#getFile() |
|
39 |
*/ |
|
40 |
public String getFile() { |
|
41 |
return "testdata/GML-MultiPolygon.gml"; |
|
42 |
} |
|
43 |
|
|
44 |
/* |
|
45 |
* (non-Javadoc) |
|
46 |
* @see org.gvsig.gpe.gml.parser.GMLReaderBaseTest#hasSchema() |
|
47 |
*/ |
|
48 |
public boolean hasSchema() { |
|
49 |
// TODO Auto-generated method stub |
|
50 |
return false; |
|
51 |
} |
|
52 |
|
|
53 |
/* |
|
54 |
* (non-Javadoc) |
|
55 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#makeAsserts() |
|
56 |
*/ |
|
57 |
public void makeAsserts() { |
|
58 |
assertEquals(1, getLayers().length); |
|
59 |
Layer layer = getLayers()[0]; |
|
60 |
ArrayList features = layer.getFeatures(); |
|
61 |
assertEquals(1, features.size()); |
|
62 |
} |
|
63 |
} |
|
64 |
|
|
0 | 65 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLCitiesReader.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
|
|
5 |
import org.gvsig.gpe.containers.Layer; |
|
6 |
|
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
8 |
* |
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
10 |
* |
|
11 |
* This program is free software; you can redistribute it and/or |
|
12 |
* modify it under the terms of the GNU General Public License |
|
13 |
* as published by the Free Software Foundation; either version 2 |
|
14 |
* of the License, or (at your option) any later version. |
|
15 |
* |
|
16 |
* This program is distributed in the hope that it will be useful, |
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19 |
* GNU General Public License for more details. |
|
20 |
* |
|
21 |
* You should have received a copy of the GNU General Public License |
|
22 |
* along with this program; if not, write to the Free Software |
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
24 |
* |
|
25 |
* For more information, contact: |
|
26 |
* |
|
27 |
* Generalitat Valenciana |
|
28 |
* Conselleria d'Infraestructures i Transport |
|
29 |
* Av. Blasco Ib??ez, 50 |
|
30 |
* 46010 VALENCIA |
|
31 |
* SPAIN |
|
32 |
* |
|
33 |
* +34 963862235 |
|
34 |
* gvsig@gva.es |
|
35 |
* www.gvsig.gva.es |
|
36 |
* |
|
37 |
* or |
|
38 |
* |
|
39 |
* IVER T.I. S.A |
|
40 |
* Salamanca 50 |
|
41 |
* 46005 Valencia |
|
42 |
* Spain |
|
43 |
* |
|
44 |
* +34 963163400 |
|
45 |
* dac@iver.es |
|
46 |
*/ |
|
47 |
/* CVS MESSAGES: |
|
48 |
* |
|
49 |
* $Id$ |
|
50 |
* $Log$ |
|
51 |
* |
|
52 |
*/ |
|
53 |
/** |
|
54 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
55 |
*/ |
|
56 |
public class GMLCitiesReader extends GMLReaderBaseTest { |
|
57 |
|
|
58 |
/* |
|
59 |
* (non-Javadoc) |
|
60 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#getFile() |
|
61 |
*/ |
|
62 |
public String getFile() { |
|
63 |
return "testdata/cities.gml"; |
|
64 |
} |
|
65 |
|
|
66 |
/* |
|
67 |
* (non-Javadoc) |
|
68 |
* @see org.gvsig.gpe.gml.parser.GMLReaderBaseTest#hasSchema() |
|
69 |
*/ |
|
70 |
public boolean hasSchema() { |
|
71 |
// TODO Auto-generated method stub |
|
72 |
return false; |
|
73 |
} |
|
74 |
|
|
75 |
/* |
|
76 |
* (non-Javadoc) |
|
77 |
* @see org.gvsig.gpe.parser.GPEReaderBaseTest#makeAsserts() |
|
78 |
*/ |
|
79 |
public void makeAsserts() { |
|
80 |
assertEquals(1, getLayers().length); |
|
81 |
Layer layer = getLayers()[0]; |
|
82 |
ArrayList features = layer.getFeatures(); |
|
83 |
assertEquals(85, features.size()); |
|
84 |
|
|
85 |
} |
|
86 |
} |
|
87 |
|
|
0 | 88 |
org.gvsig.gpe/library/tags/2_0_0/org.gvsig.gpe.gml/src-test/org/gvsig/gpe/gml/parser/GMLComunidadesIDEEReader.java | ||
---|---|---|
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}} |
Also available in: Unified diff