Line | Hits | Source |
---|---|---|
1 | // A Java MapScript module for MapServer. | |
2 | // See <http://mapserver.gis.umn.edu> for information on MapServer. | |
3 | // | |
4 | // Copyright (C) 2003 Andrew Collins <andrewrcollins@yahoo.com> | |
5 | // | |
6 | // This library is free software; you can redistribute it | |
7 | // and/or modify it under the terms of the GNU Lesser General | |
8 | // Public License as published by the Free Software Foundation; | |
9 | // either version 2.1 of the License, or (at your option) any | |
10 | // later version. | |
11 | // | |
12 | // This library is distributed in the hope that it will be useful, | |
13 | // but WITHOUT ANY WARRANTY; without even the implied warranty | |
14 | // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
15 | // See the GNU Lesser General Public License for more details. | |
16 | // | |
17 | // You should have received a copy of the GNU Lesser General | |
18 | // Public License along with this library; if not, write to | |
19 | // the Free Software Foundation, Inc., 59 Temple Place, | |
20 | // Suite 330, Boston, MA 02111-1307 USA | |
21 | package edu.umn.gis.mapscript.imp; | |
22 | ||
23 | /** | |
24 | * DOCUMENT ME! | |
25 | * | |
26 | * @author <a href="mailto:ADDRESS">NAME</a> | |
27 | * | |
28 | * @todo CLASS_DESCRIPTION | |
29 | */ | |
30 | public class shapefileObj | |
31 | { | |
32 | /** | |
33 | * DOCUMENT ME! | |
34 | * | |
35 | * @todo FIELD_DESCRIPTION | |
36 | */ | |
37 | protected boolean swigCMemOwn; | |
38 | ||
39 | /** | |
40 | * DOCUMENT ME! | |
41 | * | |
42 | * @todo FIELD_DESCRIPTION | |
43 | */ | |
44 | private long swigCPtr; | |
45 | ||
46 | /** | |
47 | * Creates a new shapefileObj object. | |
48 | * | |
49 | * @param filename PARAMETER | |
50 | * @param type PARAMETER | |
51 | */ | |
52 | public shapefileObj(String filename, int type) | |
53 | { | |
54 | 0 | this(MapScriptJNI.new_shapefileObj(filename, type), true); |
55 | 0 | } |
56 | ||
57 | /** | |
58 | * Creates a new shapefileObj object. | |
59 | * | |
60 | * @param cPtr PARAMETER | |
61 | * @param cMemoryOwn PARAMETER | |
62 | */ | |
63 | protected shapefileObj(long cPtr, boolean cMemoryOwn) | |
64 | 0 | { |
65 | 0 | swigCMemOwn = cMemoryOwn; |
66 | 0 | swigCPtr = cPtr; |
67 | 0 | } |
68 | ||
69 | /** | |
70 | * Creates a new shapefileObj object. | |
71 | */ | |
72 | protected shapefileObj() | |
73 | { | |
74 | 0 | this(0, false); |
75 | 0 | } |
76 | ||
77 | /** | |
78 | * DOCUMENT ME! | |
79 | * | |
80 | * @return RETURN | |
81 | * | |
82 | * @todo METHOD_DESCRIPTION | |
83 | */ | |
84 | public rectObj getBounds() | |
85 | { | |
86 | 0 | return new rectObj(MapScriptJNI.get_shapefileObj_bounds(swigCPtr), false); |
87 | } | |
88 | ||
89 | /** | |
90 | * DOCUMENT ME! | |
91 | * | |
92 | * @param i PARAMETER | |
93 | * @param rect PARAMETER | |
94 | * | |
95 | * @todo METHOD_DESCRIPTION | |
96 | */ | |
97 | public void getExtent(int i, rectObj rect) | |
98 | { | |
99 | 0 | MapScriptJNI.shapefileObj_getExtent(swigCPtr, i, rectObj.getCPtr(rect)); |
100 | 0 | } |
101 | ||
102 | /** | |
103 | * DOCUMENT ME! | |
104 | * | |
105 | * @return RETURN | |
106 | * | |
107 | * @todo METHOD_DESCRIPTION | |
108 | */ | |
109 | public int getLastshape() | |
110 | { | |
111 | 0 | return MapScriptJNI.get_shapefileObj_lastshape(swigCPtr); |
112 | } | |
113 | ||
114 | /** | |
115 | * DOCUMENT ME! | |
116 | * | |
117 | * @return RETURN | |
118 | * | |
119 | * @todo METHOD_DESCRIPTION | |
120 | */ | |
121 | public int getNumshapes() | |
122 | { | |
123 | 0 | return MapScriptJNI.get_shapefileObj_numshapes(swigCPtr); |
124 | } | |
125 | ||
126 | /** | |
127 | * DOCUMENT ME! | |
128 | * | |
129 | * @param i PARAMETER | |
130 | * @param point PARAMETER | |
131 | * | |
132 | * @return RETURN | |
133 | * | |
134 | * @todo METHOD_DESCRIPTION | |
135 | */ | |
136 | public int getPoint(int i, pointObj point) | |
137 | { | |
138 | 0 | return MapScriptJNI.shapefileObj_getPoint(swigCPtr, i, |
139 | pointObj.getCPtr(point)); | |
140 | } | |
141 | ||
142 | /** | |
143 | * DOCUMENT ME! | |
144 | * | |
145 | * @return RETURN | |
146 | * | |
147 | * @todo METHOD_DESCRIPTION | |
148 | */ | |
149 | public String getShapepath() | |
150 | { | |
151 | 0 | return MapScriptJNI.get_shapefileObj_shapepath(swigCPtr); |
152 | } | |
153 | ||
154 | /** | |
155 | * DOCUMENT ME! | |
156 | * | |
157 | * @return RETURN | |
158 | * | |
159 | * @todo METHOD_DESCRIPTION | |
160 | */ | |
161 | public String getSource() | |
162 | { | |
163 | 0 | return MapScriptJNI.get_shapefileObj_source(swigCPtr); |
164 | } | |
165 | ||
166 | /** | |
167 | * DOCUMENT ME! | |
168 | * | |
169 | * @return RETURN | |
170 | * | |
171 | * @todo METHOD_DESCRIPTION | |
172 | */ | |
173 | public String getStatus() | |
174 | { | |
175 | 0 | return MapScriptJNI.get_shapefileObj_status(swigCPtr); |
176 | } | |
177 | ||
178 | /** | |
179 | * DOCUMENT ME! | |
180 | * | |
181 | * @return RETURN | |
182 | * | |
183 | * @todo METHOD_DESCRIPTION | |
184 | */ | |
185 | public rectObj getStatusbounds() | |
186 | { | |
187 | 0 | return new rectObj(MapScriptJNI.get_shapefileObj_statusbounds(swigCPtr), |
188 | false); | |
189 | } | |
190 | ||
191 | /** | |
192 | * DOCUMENT ME! | |
193 | * | |
194 | * @param map PARAMETER | |
195 | * @param i PARAMETER | |
196 | * @param shape PARAMETER | |
197 | * | |
198 | * @return RETURN | |
199 | * | |
200 | * @todo METHOD_DESCRIPTION | |
201 | */ | |
202 | public int getTransformed(mapObj map, int i, shapeObj shape) | |
203 | { | |
204 | 0 | return MapScriptJNI.shapefileObj_getTransformed(swigCPtr, |
205 | mapObj.getCPtr(map), i, shapeObj.getCPtr(shape)); | |
206 | } | |
207 | ||
208 | /** | |
209 | * DOCUMENT ME! | |
210 | * | |
211 | * @return RETURN | |
212 | * | |
213 | * @todo METHOD_DESCRIPTION | |
214 | */ | |
215 | public int getType() | |
216 | { | |
217 | 0 | return MapScriptJNI.get_shapefileObj_type(swigCPtr); |
218 | } | |
219 | ||
220 | /** | |
221 | * DOCUMENT ME! | |
222 | * | |
223 | * @param shape PARAMETER | |
224 | * | |
225 | * @return RETURN | |
226 | * | |
227 | * @todo METHOD_DESCRIPTION | |
228 | */ | |
229 | public int add(shapeObj shape) | |
230 | { | |
231 | 0 | return MapScriptJNI.shapefileObj_add(swigCPtr, shapeObj.getCPtr(shape)); |
232 | } | |
233 | ||
234 | /** | |
235 | * DOCUMENT ME! | |
236 | * | |
237 | * @param point PARAMETER | |
238 | * | |
239 | * @return RETURN | |
240 | * | |
241 | * @todo METHOD_DESCRIPTION | |
242 | */ | |
243 | public int addPoint(pointObj point) | |
244 | { | |
245 | 0 | return MapScriptJNI.shapefileObj_addPoint(swigCPtr, pointObj.getCPtr(point)); |
246 | } | |
247 | ||
248 | /** | |
249 | * DOCUMENT ME! | |
250 | * | |
251 | * @todo METHOD_DESCRIPTION | |
252 | */ | |
253 | public void delete() | |
254 | { | |
255 | 0 | if ((swigCPtr != 0) && swigCMemOwn) |
256 | { | |
257 | 0 | MapScriptJNI.delete_shapefileObj(swigCPtr); |
258 | 0 | swigCMemOwn = false; |
259 | } | |
260 | ||
261 | 0 | swigCPtr = 0; |
262 | 0 | } |
263 | ||
264 | /** | |
265 | * DOCUMENT ME! | |
266 | * | |
267 | * @param obj PARAMETER | |
268 | * | |
269 | * @return RETURN | |
270 | * | |
271 | * @todo METHOD_DESCRIPTION | |
272 | */ | |
273 | public boolean equals(Object obj) | |
274 | { | |
275 | 0 | boolean equal = false; |
276 | ||
277 | 0 | if (obj instanceof shapefileObj) |
278 | { | |
279 | 0 | equal = (((shapefileObj) obj).swigCPtr == this.swigCPtr); |
280 | } | |
281 | ||
282 | 0 | return equal; |
283 | } | |
284 | ||
285 | /** | |
286 | * DOCUMENT ME! | |
287 | * | |
288 | * @param i PARAMETER | |
289 | * @param shape PARAMETER | |
290 | * | |
291 | * @return RETURN | |
292 | * | |
293 | * @todo METHOD_DESCRIPTION | |
294 | */ | |
295 | public int get(int i, shapeObj shape) | |
296 | { | |
297 | 0 | return MapScriptJNI.shapefileObj_get(swigCPtr, i, shapeObj.getCPtr(shape)); |
298 | } | |
299 | ||
300 | /** | |
301 | * DOCUMENT ME! | |
302 | * | |
303 | * @param obj PARAMETER | |
304 | * | |
305 | * @return RETURN | |
306 | * | |
307 | * @todo METHOD_DESCRIPTION | |
308 | */ | |
309 | protected static long getCPtr(shapefileObj obj) | |
310 | { | |
311 | 0 | return obj.swigCPtr; |
312 | } | |
313 | ||
314 | /** | |
315 | * DOCUMENT ME! | |
316 | * | |
317 | * @todo METHOD_DESCRIPTION | |
318 | */ | |
319 | protected void finalize() | |
320 | { | |
321 | 0 | delete(); |
322 | 0 | } |
323 | } |
this report was generated by version 1.0.2 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |