Revision 769
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.gpe.lib.impl</artifactId> |
|
5 |
<packaging>jar</packaging> |
|
6 |
<name>org.gvsig.gpe.lib.impl</name> |
|
7 |
<description>Default Generic Persistence Engine library Implementation</description> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.gpe.lib</artifactId> |
|
11 |
<version>2.1.60</version> |
|
12 |
</parent> |
|
13 |
<dependencies> |
|
14 |
<dependency> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.gpe.lib.api</artifactId> |
|
17 |
<scope>compile</scope> |
|
18 |
</dependency> |
|
19 |
<dependency> |
|
20 |
<groupId>org.gvsig</groupId> |
|
21 |
<artifactId>org.gvsig.gpe.lib.spi</artifactId> |
|
22 |
<scope>compile</scope> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.xmlschema.lib.api</artifactId> |
|
27 |
<scope>compile</scope> |
|
28 |
</dependency> |
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
32 |
<type>test-jar</type> |
|
33 |
<scope>test</scope> |
|
34 |
</dependency> |
|
35 |
</dependencies> |
|
36 |
<build> |
|
37 |
<plugins> |
|
38 |
<plugin> |
|
39 |
<groupId>org.apache.maven.plugins</groupId> |
|
40 |
<artifactId>maven-jar-plugin</artifactId> |
|
41 |
<configuration> |
|
42 |
</configuration> |
|
43 |
<executions> |
|
44 |
<!-- |
|
45 |
Generates a jar file only with the test classes |
|
46 |
--> |
|
47 |
<execution> |
|
48 |
<goals> |
|
49 |
<goal>test-jar</goal> |
|
50 |
</goals> |
|
51 |
<configuration> |
|
52 |
|
|
53 |
</configuration> |
|
54 |
</execution> |
|
55 |
</executions> |
|
56 |
</plugin> |
|
57 |
<plugin> |
|
58 |
<groupId>org.apache.maven.plugins</groupId> |
|
59 |
<artifactId>maven-compiler-plugin</artifactId> |
|
60 |
<configuration> |
|
61 |
<source>1.4</source> |
|
62 |
<target>1.5</target> |
|
63 |
</configuration> |
|
64 |
</plugin> |
|
65 |
</plugins> |
|
66 |
</build> |
|
67 |
<profiles> |
|
68 |
<profile> |
|
69 |
<id>cdc</id> |
|
70 |
<build> |
|
71 |
<plugins> |
|
72 |
<plugin> |
|
73 |
<groupId>org.apache.maven.plugins</groupId> |
|
74 |
<artifactId>maven-compiler-plugin</artifactId> |
|
75 |
<configuration> |
|
76 |
<source>1.4</source> |
|
77 |
<target>1.4</target> |
|
78 |
</configuration> |
|
79 |
</plugin> |
|
80 |
</plugins> |
|
81 |
</build> |
|
82 |
</profile> |
|
83 |
</profiles> |
|
84 |
</project> |
|
85 |
|
|
0 | 86 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/Polygon.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.impl.containers; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
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: Polygon.java 94 2007-05-09 10:25:45Z jorpiell $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.3 2007/05/09 10:25:45 jorpiell |
|
50 |
* Add the multiGeometries |
|
51 |
* |
|
52 |
* Revision 1.2 2007/04/19 07:23:20 jorpiell |
|
53 |
* Add the add methods to teh contenhandler and change the register mode |
|
54 |
* |
|
55 |
* Revision 1.1 2007/04/14 16:06:35 jorpiell |
|
56 |
* Add the container classes |
|
57 |
* |
|
58 |
* |
|
59 |
*/ |
|
60 |
/** |
|
61 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
62 |
*/ |
|
63 |
public class Polygon extends Geometry { |
|
64 |
private ArrayList coordinates = null; |
|
65 |
private ArrayList innerBoundary = new ArrayList(); |
|
66 |
|
|
67 |
public Polygon() { |
|
68 |
super(); |
|
69 |
coordinates = new ArrayList(); |
|
70 |
} |
|
71 |
|
|
72 |
public void addCoordinate(double[] coordinate){ |
|
73 |
coordinates.add(coordinate); |
|
74 |
} |
|
75 |
|
|
76 |
public double geCoordinateAt(int index, int dimension){ |
|
77 |
return ((double[])(coordinates.get(index)))[dimension]; |
|
78 |
} |
|
79 |
|
|
80 |
public int getCoordinatesNumber(){ |
|
81 |
return coordinates.size(); |
|
82 |
} |
|
83 |
|
|
84 |
/** |
|
85 |
* @return the innerBoundary |
|
86 |
*/ |
|
87 |
public ArrayList getInnerBoundary() { |
|
88 |
return innerBoundary; |
|
89 |
} |
|
90 |
|
|
91 |
/** |
|
92 |
* Adds a new layer |
|
93 |
* @param layer |
|
94 |
*/ |
|
95 |
public void addInnerBoundary(Polygon polygon){ |
|
96 |
innerBoundary.add(polygon); |
|
97 |
} |
|
98 |
|
|
99 |
/** |
|
100 |
* Adds a new layer |
|
101 |
* @param layer |
|
102 |
*/ |
|
103 |
public void addInnerBoundary(Object polygon){ |
|
104 |
if (polygon instanceof Polygon){ |
|
105 |
innerBoundary.add(polygon); |
|
106 |
} |
|
107 |
} |
|
108 |
} |
|
0 | 109 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/Point.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.impl.containers; |
|
2 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
3 |
* |
|
4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
19 |
* |
|
20 |
* For more information, contact: |
|
21 |
* |
|
22 |
* Generalitat Valenciana |
|
23 |
* Conselleria d'Infraestructures i Transport |
|
24 |
* Av. Blasco Ib??ez, 50 |
|
25 |
* 46010 VALENCIA |
|
26 |
* SPAIN |
|
27 |
* |
|
28 |
* +34 963862235 |
|
29 |
* gvsig@gva.es |
|
30 |
* www.gvsig.gva.es |
|
31 |
* |
|
32 |
* or |
|
33 |
* |
|
34 |
* IVER T.I. S.A |
|
35 |
* Salamanca 50 |
|
36 |
* 46005 Valencia |
|
37 |
* Spain |
|
38 |
* |
|
39 |
* +34 963163400 |
|
40 |
* dac@iver.es |
|
41 |
*/ |
|
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: Point.java 94 2007-05-09 10:25:45Z jorpiell $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.2 2007/05/09 10:25:45 jorpiell |
|
47 |
* Add the multiGeometries |
|
48 |
* |
|
49 |
* Revision 1.1 2007/04/14 16:06:35 jorpiell |
|
50 |
* Add the container classes |
|
51 |
* |
|
52 |
* |
|
53 |
*/ |
|
54 |
/** |
|
55 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
56 |
*/ |
|
57 |
public class Point extends Geometry { |
|
58 |
private double[] coordinates; |
|
59 |
|
|
60 |
/** |
|
61 |
* @return the x |
|
62 |
*/ |
|
63 |
public double getX() { |
|
64 |
return coordinates[0]; |
|
65 |
} |
|
66 |
/** |
|
67 |
* @param x the x to set |
|
68 |
*/ |
|
69 |
public void setX(double x) { |
|
70 |
coordinates[0] = x; |
|
71 |
} |
|
72 |
/** |
|
73 |
* @return the y |
|
74 |
*/ |
|
75 |
public double getY() { |
|
76 |
return coordinates[1]; |
|
77 |
} |
|
78 |
/** |
|
79 |
* @param y the y to set |
|
80 |
*/ |
|
81 |
public void setY(double y) { |
|
82 |
coordinates[1] = y; |
|
83 |
} |
|
84 |
/** |
|
85 |
* @return the z |
|
86 |
*/ |
|
87 |
public double getZ() { |
|
88 |
return coordinates[2]; |
|
89 |
} |
|
90 |
/** |
|
91 |
* @param z the z to set |
|
92 |
*/ |
|
93 |
public void setZ(double z) { |
|
94 |
coordinates[2] = z; |
|
95 |
} |
|
96 |
/** |
|
97 |
* @param coordinates the coordinates to set |
|
98 |
*/ |
|
99 |
public void setCoordinates(double[] coordinates) { |
|
100 |
this.coordinates = coordinates; |
|
101 |
} |
|
102 |
} |
|
0 | 103 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/Element.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.impl.containers; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
|
|
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: Element.java 108 2007-05-15 07:28:34Z jorpiell $ |
|
49 |
* $Log$ |
|
50 |
* Revision 1.4 2007/05/15 07:28:34 jorpiell |
|
51 |
* Children Element printed |
|
52 |
* |
|
53 |
* Revision 1.3 2007/05/02 11:46:07 jorpiell |
|
54 |
* Writing tests updated |
|
55 |
* |
|
56 |
* Revision 1.2 2007/04/19 11:50:20 csanchez |
|
57 |
* Actualizacion protoripo libGPE |
|
58 |
* |
|
59 |
* Revision 1.1 2007/04/14 16:06:35 jorpiell |
|
60 |
* Add the container classes |
|
61 |
* |
|
62 |
* |
|
63 |
*/ |
|
64 |
/** |
|
65 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
66 |
*/ |
|
67 |
public class Element { |
|
68 |
private String namespace = null; |
|
69 |
private String name = null; |
|
70 |
private String id = null; |
|
71 |
private Object value = null; |
|
72 |
private Object type = null; |
|
73 |
private Element parentElement = null; |
|
74 |
private ArrayList elements = new ArrayList(); |
|
75 |
/** |
|
76 |
* @return the id |
|
77 |
*/ |
|
78 |
public String getId() { |
|
79 |
return id; |
|
80 |
} |
|
81 |
/** |
|
82 |
* @param id the id to set |
|
83 |
*/ |
|
84 |
public void setId(String id) { |
|
85 |
this.id = id; |
|
86 |
} |
|
87 |
/** |
|
88 |
* @return the name |
|
89 |
*/ |
|
90 |
public String getName() { |
|
91 |
return name; |
|
92 |
} |
|
93 |
/** |
|
94 |
* @param name the name to set |
|
95 |
*/ |
|
96 |
public void setName(String name) { |
|
97 |
this.name = name; |
|
98 |
} |
|
99 |
/** |
|
100 |
* @return the type |
|
101 |
*/ |
|
102 |
public Object getType() { |
|
103 |
return type; |
|
104 |
} |
|
105 |
/** |
|
106 |
* @param type the type to set |
|
107 |
*/ |
|
108 |
public void setType(Object type) { |
|
109 |
this.type = type; |
|
110 |
} |
|
111 |
/** |
|
112 |
* @return the value |
|
113 |
*/ |
|
114 |
public Object getValue() { |
|
115 |
return value; |
|
116 |
} |
|
117 |
/** |
|
118 |
* @param value the value to set |
|
119 |
*/ |
|
120 |
public void setValue(Object value) { |
|
121 |
this.value = value; |
|
122 |
} |
|
123 |
|
|
124 |
/** |
|
125 |
* @return the parentElement |
|
126 |
*/ |
|
127 |
public Element getParentElement() { |
|
128 |
return parentElement; |
|
129 |
} |
|
130 |
/** |
|
131 |
* @param parentElement the parentElement to set |
|
132 |
*/ |
|
133 |
public void setParentElement(Object parentElement) { |
|
134 |
if (parentElement != null){ |
|
135 |
this.parentElement = (Element)parentElement; |
|
136 |
((Element)parentElement).addChildEElement(this); |
|
137 |
} |
|
138 |
} |
|
139 |
/** |
|
140 |
* @return the elements |
|
141 |
*/ |
|
142 |
public ArrayList getElements() { |
|
143 |
return elements; |
|
144 |
} |
|
145 |
|
|
146 |
/** |
|
147 |
* @return the element at position i |
|
148 |
* @param i |
|
149 |
* Element position |
|
150 |
*/ |
|
151 |
public Element getElementAt(int i) { |
|
152 |
return (Element)elements.get(i); |
|
153 |
} |
|
154 |
|
|
155 |
/** |
|
156 |
* @param parentElement the parentElement to set |
|
157 |
*/ |
|
158 |
public void setParentElement(Element parentElement) { |
|
159 |
this.parentElement = parentElement; |
|
160 |
} |
|
161 |
|
|
162 |
/** |
|
163 |
* @param adds a child element |
|
164 |
*/ |
|
165 |
public void addChildEElement(Element element) { |
|
166 |
getElements().add(element); |
|
167 |
} |
|
168 |
/** |
|
169 |
* @return the namespace |
|
170 |
*/ |
|
171 |
public String getNamespace() { |
|
172 |
return namespace; |
|
173 |
} |
|
174 |
/** |
|
175 |
* @param namespace the namespace to set |
|
176 |
*/ |
|
177 |
public void setNamespace(String namespace) { |
|
178 |
this.namespace = namespace; |
|
179 |
} |
|
180 |
} |
|
0 | 181 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/MultiLineString.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.impl.containers; |
|
2 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
3 |
* |
|
4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
19 |
* |
|
20 |
* For more information, contact: |
|
21 |
* |
|
22 |
* Generalitat Valenciana |
|
23 |
* Conselleria d'Infraestructures i Transport |
|
24 |
* Av. Blasco Ib??ez, 50 |
|
25 |
* 46010 VALENCIA |
|
26 |
* SPAIN |
|
27 |
* |
|
28 |
* +34 963862235 |
|
29 |
* gvsig@gva.es |
|
30 |
* www.gvsig.gva.es |
|
31 |
* |
|
32 |
* or |
|
33 |
* |
|
34 |
* IVER T.I. S.A |
|
35 |
* Salamanca 50 |
|
36 |
* 46005 Valencia |
|
37 |
* Spain |
|
38 |
* |
|
39 |
* +34 963163400 |
|
40 |
* dac@iver.es |
|
41 |
*/ |
|
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: MultiLineString.java 93 2007-05-09 10:03:19Z jorpiell $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.1 2007/05/09 10:03:19 jorpiell |
|
47 |
* Add the multigeometry tests |
|
48 |
* |
|
49 |
* |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* This class represetnts a MultiLineString |
|
53 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
54 |
*/ |
|
55 |
public class MultiLineString extends MultiGeometry{ |
|
56 |
|
|
57 |
/** |
|
58 |
* Adds a new LineString |
|
59 |
* @param lineString |
|
60 |
* LineString to add |
|
61 |
*/ |
|
62 |
public void addLineString(LineString lineString) { |
|
63 |
addGeometry(lineString); |
|
64 |
} |
|
65 |
|
|
66 |
/** |
|
67 |
* Gets a LineString at position i |
|
68 |
* @param i |
|
69 |
* position |
|
70 |
*/ |
|
71 |
public LineString getMultiLineStringAt(int i) { |
|
72 |
return (LineString)getGeometryAt(i); |
|
73 |
} |
|
74 |
} |
|
0 | 75 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/Bbox.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.impl.containers; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
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: Bbox.java 54 2007-04-14 16:06:35Z jorpiell $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.1 2007/04/14 16:06:35 jorpiell |
|
50 |
* Add the container classes |
|
51 |
* |
|
52 |
* |
|
53 |
*/ |
|
54 |
/** |
|
55 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
56 |
*/ |
|
57 |
public class Bbox { |
|
58 |
private String id = null; |
|
59 |
private ArrayList coordinates = null; |
|
60 |
private int dimension = 0; |
|
61 |
private String srs; |
|
62 |
|
|
63 |
public Bbox(int dimension){ |
|
64 |
this.dimension = dimension; |
|
65 |
coordinates = new ArrayList(); |
|
66 |
} |
|
67 |
|
|
68 |
public void addCoordinate(double[] coordinate){ |
|
69 |
coordinates.add(coordinate); |
|
70 |
} |
|
71 |
|
|
72 |
/** |
|
73 |
* @return the dimension |
|
74 |
*/ |
|
75 |
public int getDimension() { |
|
76 |
return dimension; |
|
77 |
} |
|
78 |
|
|
79 |
public double getMinX(){ |
|
80 |
return ((double[])(coordinates.get(0)))[0]; |
|
81 |
} |
|
82 |
|
|
83 |
public double getMaxX(){ |
|
84 |
return ((double[])(coordinates.get(1)))[0]; |
|
85 |
} |
|
86 |
|
|
87 |
public double getMinY(){ |
|
88 |
return ((double[])(coordinates.get(0)))[1]; |
|
89 |
} |
|
90 |
|
|
91 |
public double getMaxY(){ |
|
92 |
return ((double[])(coordinates.get(1)))[1]; |
|
93 |
} |
|
94 |
|
|
95 |
public double getMinZ(){ |
|
96 |
if (dimension < 3){ |
|
97 |
return 0.0; |
|
98 |
} |
|
99 |
return ((double[])(coordinates.get(0)))[2]; |
|
100 |
} |
|
101 |
|
|
102 |
public double getMaxZ(){ |
|
103 |
if (dimension < 3){ |
|
104 |
return 0.0; |
|
105 |
} |
|
106 |
return ((double[])(coordinates.get(1)))[2]; |
|
107 |
} |
|
108 |
|
|
109 |
public double getMinCoordinate(int dimension){ |
|
110 |
return ((double[])(coordinates.get(0)))[dimension]; |
|
111 |
} |
|
112 |
|
|
113 |
public double getMaxCoordinate(int dimension){ |
|
114 |
return ((double[])(coordinates.get(1)))[dimension]; |
|
115 |
} |
|
116 |
|
|
117 |
/** |
|
118 |
* @return the id |
|
119 |
*/ |
|
120 |
public String getId() { |
|
121 |
return id; |
|
122 |
} |
|
123 |
/** |
|
124 |
* @param id the id to set |
|
125 |
*/ |
|
126 |
public void setId(String id) { |
|
127 |
this.id = id; |
|
128 |
} |
|
129 |
/** |
|
130 |
* @return the srs |
|
131 |
*/ |
|
132 |
public String getSrs() { |
|
133 |
return srs; |
|
134 |
} |
|
135 |
/** |
|
136 |
* @param srs the srs to set |
|
137 |
*/ |
|
138 |
public void setSrs(String srs) { |
|
139 |
this.srs = srs; |
|
140 |
} |
|
141 |
} |
|
0 | 142 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/LinearRing.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.impl.containers; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
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: LinearRing.java 54 2007-04-14 16:06:35Z jorpiell $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.1 2007/04/14 16:06:35 jorpiell |
|
50 |
* Add the container classes |
|
51 |
* |
|
52 |
* |
|
53 |
*/ |
|
54 |
/** |
|
55 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
56 |
*/ |
|
57 |
public class LinearRing extends Geometry { |
|
58 |
private ArrayList coordinates = null; |
|
59 |
|
|
60 |
public LinearRing() { |
|
61 |
super(); |
|
62 |
coordinates = new ArrayList(); |
|
63 |
} |
|
64 |
|
|
65 |
public void addCoordinate(double[] coordinate){ |
|
66 |
coordinates.add(coordinate); |
|
67 |
} |
|
68 |
|
|
69 |
public double geCoordinateAt(int index, int dimension){ |
|
70 |
return ((double[])(coordinates.get(index)))[dimension]; |
|
71 |
} |
|
72 |
|
|
73 |
public int getCoordinatesNumber(){ |
|
74 |
return coordinates.size(); |
|
75 |
} |
|
76 |
} |
|
0 | 77 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/Feature.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.impl.containers; |
|
2 |
|
|
3 |
import java.util.ArrayList; |
|
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: Feature.java 120 2007-05-15 12:10:01Z jorpiell $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.4 2007/05/15 12:09:41 jorpiell |
|
50 |
* The bbox is linked to the feature |
|
51 |
* |
|
52 |
* Revision 1.3 2007/05/02 11:46:07 jorpiell |
|
53 |
* Writing tests updated |
|
54 |
* |
|
55 |
* Revision 1.2 2007/04/19 07:23:20 jorpiell |
|
56 |
* Add the add methods to teh contenhandler and change the register mode |
|
57 |
* |
|
58 |
* Revision 1.1 2007/04/14 16:06:35 jorpiell |
|
59 |
* Add the container classes |
|
60 |
* |
|
61 |
* |
|
62 |
*/ |
|
63 |
/** |
|
64 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
65 |
*/ |
|
66 |
public class Feature { |
|
67 |
private String name = null; |
|
68 |
private String id = null; |
|
69 |
private Geometry geometry = null; |
|
70 |
private ArrayList elements = new ArrayList(); |
|
71 |
private Bbox bbox = null; |
|
72 |
private ArrayList metaDataList = new ArrayList(); |
|
73 |
/** |
|
74 |
* @return the geometry |
|
75 |
*/ |
|
76 |
public Geometry getGeometry() { |
|
77 |
return geometry; |
|
78 |
} |
|
79 |
/** |
|
80 |
* @param geometry the geometry to set |
|
81 |
*/ |
|
82 |
public void setGeometry(Geometry geometry) { |
|
83 |
this.geometry = geometry; |
|
84 |
} |
|
85 |
|
|
86 |
/** |
|
87 |
* @param geometry the geometry to set |
|
88 |
*/ |
|
89 |
public void setGeometry(Object geometry) { |
|
90 |
if (geometry instanceof Geometry){ |
|
91 |
this.geometry = (Geometry)geometry; |
|
92 |
} |
|
93 |
} |
|
94 |
|
|
95 |
/** |
|
96 |
* @return the id |
|
97 |
*/ |
|
98 |
public String getId() { |
|
99 |
return id; |
|
100 |
} |
|
101 |
/** |
|
102 |
* @param id the id to set |
|
103 |
*/ |
|
104 |
public void setId(String id) { |
|
105 |
this.id = id; |
|
106 |
} |
|
107 |
/** |
|
108 |
* @return the name |
|
109 |
*/ |
|
110 |
public String getName() { |
|
111 |
return name; |
|
112 |
} |
|
113 |
/** |
|
114 |
* @param name the name to set |
|
115 |
*/ |
|
116 |
public void setName(String name) { |
|
117 |
this.name = name; |
|
118 |
} |
|
119 |
/** |
|
120 |
* @return the elements |
|
121 |
*/ |
|
122 |
public ArrayList getElements() { |
|
123 |
return elements; |
|
124 |
} |
|
125 |
|
|
126 |
/** |
|
127 |
* @return the element at position i |
|
128 |
* @param i |
|
129 |
* Element position |
|
130 |
*/ |
|
131 |
public Element getElementAt(int i) { |
|
132 |
return (Element)elements.get(i); |
|
133 |
} |
|
134 |
|
|
135 |
/** |
|
136 |
* Adds a new element |
|
137 |
* @param layer |
|
138 |
*/ |
|
139 |
public void addElement(Element element){ |
|
140 |
elements.add(element); |
|
141 |
} |
|
142 |
|
|
143 |
/** |
|
144 |
* Adds a new element |
|
145 |
* @param layer |
|
146 |
*/ |
|
147 |
public void addElement(Object element){ |
|
148 |
if (element instanceof Element){ |
|
149 |
elements.add(element); |
|
150 |
} |
|
151 |
} |
|
152 |
|
|
153 |
/** |
|
154 |
* @return the bbox |
|
155 |
*/ |
|
156 |
public Bbox getBbox() { |
|
157 |
return bbox; |
|
158 |
} |
|
159 |
|
|
160 |
/** |
|
161 |
* @param bbox the bbox to set |
|
162 |
*/ |
|
163 |
public void setBbox(Bbox bbox) { |
|
164 |
this.bbox = bbox; |
|
165 |
} |
|
166 |
|
|
167 |
/** |
|
168 |
* @param bbox the bbox to set |
|
169 |
*/ |
|
170 |
public void setBbox(Object bbox) { |
|
171 |
if (bbox instanceof Bbox){ |
|
172 |
this.bbox = (Bbox)bbox; |
|
173 |
} |
|
174 |
} |
|
175 |
|
|
176 |
public void addMetadata(Object metadata) { |
|
177 |
if (metadata instanceof MetaData){ |
|
178 |
metaDataList.add(metadata); |
|
179 |
} |
|
180 |
} |
|
181 |
|
|
182 |
public void addTime(Object time) { |
|
183 |
if (time instanceof Time){ |
|
184 |
} |
|
185 |
} |
|
186 |
} |
|
0 | 187 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/Geometry.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.impl.containers; |
|
2 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
3 |
* |
|
4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
19 |
* |
|
20 |
* For more information, contact: |
|
21 |
* |
|
22 |
* Generalitat Valenciana |
|
23 |
* Conselleria d'Infraestructures i Transport |
|
24 |
* Av. Blasco Ib??ez, 50 |
|
25 |
* 46010 VALENCIA |
|
26 |
* SPAIN |
|
27 |
* |
|
28 |
* +34 963862235 |
|
29 |
* gvsig@gva.es |
|
30 |
* www.gvsig.gva.es |
|
31 |
* |
|
32 |
* or |
|
33 |
* |
|
34 |
* IVER T.I. S.A |
|
35 |
* Salamanca 50 |
|
36 |
* 46005 Valencia |
|
37 |
* Spain |
|
38 |
* |
|
39 |
* +34 963163400 |
|
40 |
* dac@iver.es |
|
41 |
*/ |
|
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: Geometry.java 180 2007-11-21 11:19:46Z csanchez $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.3 2007/05/09 10:25:45 jorpiell |
|
47 |
* Add the multiGeometries |
|
48 |
* |
|
49 |
* Revision 1.2 2007/04/19 07:23:20 jorpiell |
|
50 |
* Add the add methods to teh contenhandler and change the register mode |
|
51 |
* |
|
52 |
* Revision 1.1 2007/04/14 16:06:35 jorpiell |
|
53 |
* Add the container classes |
|
54 |
* |
|
55 |
* |
|
56 |
*/ |
|
57 |
/** |
|
58 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
59 |
*/ |
|
60 |
public class Geometry { |
|
61 |
private String id = null; |
|
62 |
private Bbox bbox = null; |
|
63 |
private String srs = null; |
|
64 |
private int dimension = 0; |
|
65 |
|
|
66 |
|
|
67 |
/** |
|
68 |
* Constructor |
|
69 |
*/ |
|
70 |
public Geometry(String id, String srs, int dimension) { |
|
71 |
super(); |
|
72 |
this.id = id; |
|
73 |
this.srs = srs; |
|
74 |
this.dimension = dimension; |
|
75 |
} |
|
76 |
|
|
77 |
/** |
|
78 |
* @return the srs |
|
79 |
*/ |
|
80 |
public String getSrs() { |
|
81 |
return srs; |
|
82 |
} |
|
83 |
|
|
84 |
/** |
|
85 |
* @param srs the srs to set |
|
86 |
*/ |
|
87 |
public void setSrs(String srs) { |
|
88 |
this.srs = srs; |
|
89 |
} |
|
90 |
|
|
91 |
/** |
|
92 |
* @return the bbox |
|
93 |
*/ |
|
94 |
public Bbox getBbox() { |
|
95 |
return bbox; |
|
96 |
} |
|
97 |
|
|
98 |
/** |
|
99 |
* @param bbox the bbox to set |
|
100 |
*/ |
|
101 |
public void setBbox(Bbox bbox) { |
|
102 |
this.bbox = bbox; |
|
103 |
} |
|
104 |
|
|
105 |
/** |
|
106 |
* @param bbox the bbox to set |
|
107 |
*/ |
|
108 |
public void setBbox(Object bbox) { |
|
109 |
if (bbox instanceof Bbox){ |
|
110 |
this.bbox = (Bbox)bbox; |
|
111 |
} |
|
112 |
} |
|
113 |
|
|
114 |
/** |
|
115 |
* @return the id |
|
116 |
*/ |
|
117 |
public String getId() { |
|
118 |
return id; |
|
119 |
} |
|
120 |
|
|
121 |
/** |
|
122 |
* @param id the id to set |
|
123 |
*/ |
|
124 |
public void setId(String id) { |
|
125 |
this.id = id; |
|
126 |
} |
|
127 |
|
|
128 |
public Geometry() { |
|
129 |
super(); |
|
130 |
} |
|
131 |
|
|
132 |
/** |
|
133 |
* @return the dimension |
|
134 |
*/ |
|
135 |
public int getDimension() { |
|
136 |
return dimension; |
|
137 |
} |
|
138 |
|
|
139 |
/** |
|
140 |
* @param dimension the dimension to set |
|
141 |
*/ |
|
142 |
public void setDimension(int dimension) { |
|
143 |
this.dimension = dimension; |
|
144 |
} |
|
145 |
|
|
146 |
} |
|
0 | 147 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/Time.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 |
* 2008 PRODEVELOP S.L. |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.gpe.lib.impl.containers; |
|
29 |
|
|
30 |
import java.util.Date; |
|
31 |
|
|
32 |
/** |
|
33 |
* @author Carlos S?nchez Peri??n |
|
34 |
* PRODEVELOP S.L. |
|
35 |
* 08/01/2009 |
|
36 |
*/ |
|
37 |
public class Time { |
|
38 |
Date date=null; |
|
39 |
Time hour=null; |
|
40 |
String UTCoffset=null; |
|
41 |
Double duration=null; |
|
42 |
String unit=null; |
|
43 |
Time next=null, previous=null; |
|
44 |
String type=null,description=null,name=null,value=null; |
|
45 |
|
|
46 |
public Time getNext() { |
|
47 |
return next; |
|
48 |
} |
|
49 |
public void setNext(Time next) { |
|
50 |
this.next = next; |
|
51 |
} |
|
52 |
public Time getPrevious() { |
|
53 |
return previous; |
|
54 |
} |
|
55 |
public void setPrevious(Time previous) { |
|
56 |
this.previous = previous; |
|
57 |
} |
|
58 |
public Date getDate() { |
|
59 |
return date; |
|
60 |
} |
|
61 |
public void setDate(Date date) { |
|
62 |
this.date = date; |
|
63 |
} |
|
64 |
public Time getHour() { |
|
65 |
return hour; |
|
66 |
} |
|
67 |
public void setHour(Time hour) { |
|
68 |
this.hour = hour; |
|
69 |
} |
|
70 |
public String getUTCoffset() { |
|
71 |
return UTCoffset; |
|
72 |
} |
|
73 |
public void setUTCoffset(String coffset) { |
|
74 |
UTCoffset = coffset; |
|
75 |
} |
|
76 |
public Double getDuration() { |
|
77 |
return duration; |
|
78 |
} |
|
79 |
public void setDuration(Double duration) { |
|
80 |
this.duration = duration; |
|
81 |
} |
|
82 |
public String getUnit() { |
|
83 |
return unit; |
|
84 |
} |
|
85 |
public void setUnit(String unit) { |
|
86 |
this.unit = unit; |
|
87 |
} |
|
88 |
|
|
89 |
public String getType() { |
|
90 |
return type; |
|
91 |
} |
|
92 |
public void setType(String type) { |
|
93 |
this.type = type; |
|
94 |
} |
|
95 |
|
|
96 |
public String getName() { |
|
97 |
return name; |
|
98 |
} |
|
99 |
public void setName(String name) { |
|
100 |
this.name = name; |
|
101 |
} |
|
102 |
|
|
103 |
public String getDescription() { |
|
104 |
return description; |
|
105 |
} |
|
106 |
public void setDescription(String description) { |
|
107 |
this.description = description; |
|
108 |
} |
|
109 |
|
|
110 |
public String getValue() { |
|
111 |
return value; |
|
112 |
} |
|
113 |
public void setValue(String value) { |
|
114 |
this.value = value; |
|
115 |
} |
|
116 |
} |
|
0 | 117 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/MultiCurve.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.impl.containers; |
|
2 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
3 |
* |
|
4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
19 |
* |
|
20 |
* For more information, contact: |
|
21 |
* |
|
22 |
* Generalitat Valenciana |
|
23 |
* Conselleria d'Infraestructures i Transport |
|
24 |
* Av. Blasco Ib??ez, 50 |
|
25 |
* 46010 VALENCIA |
|
26 |
* SPAIN |
|
27 |
* |
|
28 |
* +34 963862235 |
|
29 |
* gvsig@gva.es |
|
30 |
* www.gvsig.gva.es |
|
31 |
* |
|
32 |
* or |
|
33 |
* |
|
34 |
* IVER T.I. S.A |
|
35 |
* Salamanca 50 |
|
36 |
* 46005 Valencia |
|
37 |
* Spain |
|
38 |
* |
|
39 |
* +34 963163400 |
|
40 |
* dac@iver.es |
|
41 |
*/ |
|
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id$ |
|
45 |
* $Log$ |
|
46 |
* |
|
47 |
*/ |
|
48 |
/** |
|
49 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
50 |
*/ |
|
51 |
public class MultiCurve extends MultiGeometry{ |
|
52 |
|
|
53 |
/** |
|
54 |
* Adds a new Curve |
|
55 |
* @param curve |
|
56 |
* The curve to add |
|
57 |
*/ |
|
58 |
public void addCurve(Curve curve) { |
|
59 |
addGeometry(curve); |
|
60 |
} |
|
61 |
|
|
62 |
/** |
|
63 |
* Gets a Curve at position i |
|
64 |
* @param i |
|
65 |
* position |
|
66 |
*/ |
|
67 |
public Curve getCurvePointAt(int i) { |
|
68 |
return (Curve)getGeometryAt(i); |
|
69 |
} |
|
70 |
} |
|
0 | 71 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.60/org.gvsig.gpe.lib/org.gvsig.gpe.lib.impl/src/test/java/org/gvsig/gpe/lib/impl/containers/AttributesIterator.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.impl.containers; |
|
2 |
|
|
3 |
import java.io.IOException; |
|
4 |
import java.util.HashMap; |
|
5 |
import java.util.Iterator; |
|
6 |
|
|
7 |
import org.gvsig.gpe.lib.api.parser.IAttributesIterator; |
|
8 |
import org.gvsig.xmlpull.lib.api.stream.IQName; |
|
9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
10 |
* |
|
11 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
12 |
* |
|
13 |
* This program is free software; you can redistribute it and/or |
|
14 |
* modify it under the terms of the GNU General Public License |
|
15 |
* as published by the Free Software Foundation; either version 2 |
|
16 |
* of the License, or (at your option) any later version. |
|
17 |
* |
|
18 |
* This program is distributed in the hope that it will be useful, |
|
19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 |
* GNU General Public License for more details. |
|
22 |
* |
|
23 |
* You should have received a copy of the GNU General Public License |
|
24 |
* along with this program; if not, write to the Free Software |
|
25 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
26 |
* |
|
27 |
* For more information, contact: |
|
28 |
* |
|
29 |
* Generalitat Valenciana |
|
30 |
* Conselleria d'Infraestructures i Transport |
|
31 |
* Av. Blasco Ib??ez, 50 |
|
32 |
* 46010 VALENCIA |
|
33 |
* SPAIN |
|
34 |
* |
|
35 |
* +34 963862235 |
|
36 |
* gvsig@gva.es |
|
37 |
* www.gvsig.gva.es |
|
38 |
* |
|
39 |
* or |
|
40 |
* |
|
41 |
* IVER T.I. S.A |
|
42 |
* Salamanca 50 |
|
43 |
* 46005 Valencia |
|
44 |
* Spain |
|
45 |
* |
|
46 |
* +34 963163400 |
|
47 |
* dac@iver.es |
|
48 |
*/ |
|
49 |
/* CVS MESSAGES: |
|
50 |
* |
|
51 |
* $Id$ |
|
52 |
* $Log$ |
|
53 |
* |
|
54 |
*/ |
|
55 |
/** |
|
56 |
* @author Carlos S?nchez Peri??n |
|
57 |
*/ |
|
58 |
public class AttributesIterator implements IAttributesIterator{ |
|
59 |
private HashMap attributes; |
|
60 |
private Iterator keys = null; |
|
61 |
private IQName currentAttibuteName = null; |
|
62 |
|
|
63 |
public AttributesIterator(IQName name, Object value){ |
|
64 |
attributes = new HashMap(); |
|
65 |
attributes.put(name, value); |
|
66 |
initialize(); |
|
67 |
} |
|
68 |
|
|
69 |
public AttributesIterator(IQName[] names, String[] values){ |
|
70 |
attributes = new HashMap(); |
|
71 |
for (int i=0 ; i<names.length ; i++){ |
|
72 |
attributes.put(names[i], values[i]); |
|
73 |
} |
|
74 |
initialize(); |
|
75 |
} |
|
76 |
|
|
77 |
/* |
|
78 |
* (non-Javadoc) |
|
79 |
* @see org.gvsig.gpe.parser.IAttributesIterator#hasNext() |
|
80 |
*/ |
|
81 |
public boolean hasNext() throws IOException { |
|
82 |
currentAttibuteName = null; |
|
83 |
return (keys.hasNext()); |
|
84 |
} |
|
85 |
|
|
86 |
/* |
|
87 |
* (non-Javadoc) |
|
88 |
* @see org.gvsig.gpe.parser.IAttributesIterator#getNumAttributes() |
|
89 |
*/ |
|
90 |
public int getNumAttributes() { |
|
91 |
return attributes.size(); |
Also available in: Unified diff