View Javadoc
1 /* 2 * WKB4J - WKB reader for geographical mapping toolkits 3 * (C) 2002,2003, David Garnier, dgarnier@users.sourceforge.net 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation, 8 * version 2.1 of the License. 9 * 10 * This library 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 GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * or visit the web to http://www.gnu.org. 19 * 20 */ 21 22 package org.wkb4j.factories; 23 24 import org.apache.log4j.Logger; 25 import org.wkb4j.engine.WKBFactory3D; 26 27 /*** 28 * @author David Garnier 29 * 30 * Creation date: 6 juil. 2002 23:10:29 31 * @version $Revision: 1.7 $ $Date: 2003/07/01 22:04:46 $ 32 */ 33 public class LoggingWKBFactory 34 extends AbstractWKBFactory 35 implements WKBFactory3D { 36 protected static Logger log = Logger.getLogger(LoggingWKBFactory.class); 37 38 public LoggingWKBFactory() { 39 super(); 40 } 41 42 /*** 43 * @see org.wkb4j.engine.WKBFactory#beginWork() 44 */ 45 public void beginWork() { 46 super.beginWork(); 47 if (log.isInfoEnabled()) { 48 log.info("beginWork()"); 49 } 50 //log.info(""); 51 } 52 53 /*** 54 * @see org.wkb4j.engine.WKBFactory#endWork() 55 */ 56 public void endWork() { 57 super.endWork(); 58 if (log.isInfoEnabled()) { 59 log.info("endWork()"); 60 } 61 } 62 63 /*** 64 * @see org.wkb4j.engine.WKBFactory#abortWork() 65 */ 66 public void abortWork() { 67 super.abortWork(); 68 if (log.isInfoEnabled()) { 69 log.info("abortWork()"); 70 } 71 } 72 73 /*** 74 * @see org.wkb4j.engine.WKBFactory#beginUnit() 75 */ 76 public void beginUnit(String[] words, int[] values) { 77 super.beginUnit(words, values); 78 if (log.isInfoEnabled()) { 79 log.info("beginUnit()"); 80 } 81 //log.info(""); 82 } 83 84 /*** 85 * @see org.wkb4j.engine.WKBFactory#endUnit() 86 */ 87 public void endUnit() { 88 super.endUnit(); 89 if (log.isInfoEnabled()) { 90 log.info("endUnit()"); 91 } 92 } 93 94 /*** 95 * @see org.wkb4j.engine.WKBFactory#abortUnit() 96 */ 97 public void abortUnit() { 98 super.abortUnit(); 99 if (log.isInfoEnabled()) { 100 log.info("abortUnit()"); 101 } 102 } 103 104 /*** 105 * @see org.wkb4j.engine.WKBFactory#beginGeometryCollection() 106 */ 107 public boolean beginGeometryCollection(int count) { 108 boolean retval = super.beginGeometryCollection(count); 109 if (log.isInfoEnabled()) { 110 log.info("beginGeometryCollection()"); 111 } 112 return retval; 113 } 114 115 /*** 116 * @see org.wkb4j.engine.WKBFactory#endGeometryCollection() 117 */ 118 public boolean endGeometryCollection() { 119 boolean retval = super.endGeometryCollection(); 120 if (log.isInfoEnabled()) { 121 log.info("endGeometryCollection()"); 122 } 123 return retval; 124 } 125 126 /*** 127 * @see org.wkb4j.engine.WKBFactory#abortGeometryCollection() 128 */ 129 public void abortGeometryCollection() { 130 super.abortGeometryCollection(); 131 if (log.isInfoEnabled()) { 132 log.info("abortGeometryCollection()"); 133 } 134 } 135 136 /*** 137 * @see org.wkb4j.engine.WKBFactory#beginLineString() 138 */ 139 public boolean beginLineString(int count) { 140 boolean retval = super.beginLineString(count); 141 if (log.isInfoEnabled()) { 142 log.info("beginLineString()"); 143 } 144 return retval; 145 } 146 147 /*** 148 * @see org.wkb4j.engine.WKBFactory#endLineString() 149 */ 150 public boolean endLineString() { 151 boolean retval = super.endLineString(); 152 if (log.isInfoEnabled()) { 153 log.info("endLineString()"); 154 } 155 return retval; 156 } 157 158 /*** 159 * @see org.wkb4j.engine.WKBFactory#abortLineString() 160 */ 161 public void abortLineString() { 162 super.abortLineString(); 163 if (log.isInfoEnabled()) { 164 log.info("abortLineString()"); 165 } 166 } 167 168 /*** 169 * @see org.wkb4j.engine.WKBFactory#beginMultiLineString() 170 */ 171 public boolean beginMultiLineString(int count) { 172 boolean retval = super.beginMultiLineString(count); 173 if (log.isInfoEnabled()) { 174 log.info("beginMultiLineString()"); 175 } 176 return retval; 177 } 178 179 /*** 180 * @see org.wkb4j.engine.WKBFactory#endMultiLineString() 181 */ 182 public boolean endMultiLineString() { 183 boolean retval = super.endMultiLineString(); 184 if (log.isInfoEnabled()) { 185 log.info("endMultiLineString()"); 186 } 187 return retval; 188 } 189 190 /*** 191 * @see org.wkb4j.engine.WKBFactory#abortMultiLineString() 192 */ 193 public void abortMultiLineString() { 194 super.abortMultiLineString(); 195 if (log.isInfoEnabled()) { 196 log.info("abortMultiLineString()"); 197 } 198 } 199 200 /*** 201 * @see org.wkb4j.engine.WKBFactory#beginPoint() 202 */ 203 public boolean beginPoint() { 204 boolean retval = super.beginPoint(); 205 if (log.isInfoEnabled()) { 206 log.info("beginPoint()"); 207 } 208 return retval; 209 } 210 211 /*** 212 * @see org.wkb4j.engine.WKBFactory#endPoint() 213 */ 214 public boolean endPoint() { 215 boolean retval = super.endPoint(); 216 if (log.isInfoEnabled()) { 217 log.info("endPoint()"); 218 } 219 return retval; 220 } 221 222 /*** 223 * @see org.wkb4j.engine.WKBFactory#abortPoint() 224 */ 225 public void abortPoint() { 226 super.abortPoint(); 227 if (log.isInfoEnabled()) { 228 log.info("abortPoint()"); 229 } 230 } 231 232 /*** 233 * @see org.wkb4j.engine.WKBFactory#beginMultiPoint() 234 */ 235 public boolean beginMultiPoint(int count) { 236 boolean retval = super.beginMultiPoint(count); 237 if (log.isInfoEnabled()) { 238 log.info("beginMultiPoint()"); 239 } 240 return retval; 241 } 242 243 /*** 244 * @see org.wkb4j.engine.WKBFactory#endMultiPoint() 245 */ 246 public boolean endMultiPoint() { 247 boolean retval = super.endMultiPoint(); 248 if (log.isInfoEnabled()) { 249 log.info("endMultiPoint()"); 250 } 251 return retval; 252 } 253 254 /*** 255 * @see org.wkb4j.engine.WKBFactory#abortMultiPoint() 256 */ 257 public void abortMultiPoint() { 258 super.abortMultiPoint(); 259 if (log.isInfoEnabled()) { 260 log.info("abortMultiPoint()"); 261 } 262 } 263 264 /*** 265 * @see org.wkb4j.engine.WKBFactory#beginMultiPolygon() 266 */ 267 public boolean beginMultiPolygon(int count) { 268 boolean retval = super.beginMultiPolygon(count); 269 if (log.isInfoEnabled()) { 270 log.info("beginMultiPolygon()"); 271 } 272 return retval; 273 } 274 275 /*** 276 * @see org.wkb4j.engine.WKBFactory#endMultiPolygon() 277 */ 278 public boolean endMultiPolygon() { 279 boolean retval = super.endMultiPolygon(); 280 if (log.isInfoEnabled()) { 281 log.info("endMultiPolygon()"); 282 } 283 return retval; 284 } 285 286 /*** 287 * @see org.wkb4j.engine.WKBFactory#abortMultiPolygon() 288 */ 289 public void abortMultiPolygon() { 290 super.abortMultiPolygon(); 291 if (log.isInfoEnabled()) { 292 log.info("abortMultiPolygon()"); 293 } 294 } 295 296 /*** 297 * @see org.wkb4j.engine.WKBFactory#beginPolygon() 298 */ 299 public boolean beginPolygon(int count) { 300 boolean retval = super.beginPolygon(count); 301 if (log.isInfoEnabled()) { 302 log.info("beginPolygon()"); 303 } 304 return retval; 305 } 306 307 /*** 308 * @see org.wkb4j.engine.WKBFactory#endPolygon() 309 */ 310 public boolean endPolygon() { 311 boolean retval = super.endPolygon(); 312 if (log.isInfoEnabled()) { 313 log.info("endPolygon()"); 314 } 315 return retval; 316 } 317 318 /*** 319 * @see org.wkb4j.engine.WKBFactory#abortPolygon() 320 */ 321 public void abortPolygon() { 322 super.abortPolygon(); 323 if (log.isInfoEnabled()) { 324 log.info("abortPolygon()"); 325 } 326 327 } 328 329 /*** 330 * @see org.wkb4j.engine.WKBFactory#beginLinearRing() 331 */ 332 public boolean beginLinearRing(int count) { 333 boolean retval = super.beginLinearRing(count); 334 if (log.isInfoEnabled()) { 335 log.info("beginLinearRing()"); 336 } 337 return retval; 338 } 339 340 /*** 341 * @see org.wkb4j.engine.WKBFactory#endLinearRing() 342 */ 343 public boolean endLinearRing() { 344 boolean retval = super.endLinearRing(); 345 if (log.isInfoEnabled()) { 346 log.info("endLinearRing()"); 347 } 348 return retval; 349 } 350 351 /*** 352 * @see org.wkb4j.engine.WKBFactory#abortLinearRing() 353 */ 354 public void abortLinearRing() { 355 super.abortLinearRing(); 356 if (log.isInfoEnabled()) { 357 log.info("abortLinearRing()"); 358 } 359 } 360 361 /*** 362 * @see org.wkb4j.engine.WKBFactory#addPoints(double[]) 363 */ 364 public boolean addPoints(double[] points) { 365 boolean retval = super.addPoints(points); 366 if (log.isInfoEnabled()) { 367 log.info("addPoints()"); 368 } 369 if (log.isDebugEnabled()) { 370 String stPoints = new String(); 371 for (int i = 0, size = points.length; i < size; i += 2) { 372 stPoints += "[" + points[i] + "," + points[i + 1] + "], "; 373 } 374 log.debug("Points: " + stPoints); 375 } 376 return retval; 377 } 378 379 /*** 380 * @see org.wkb4j.engine.WKBFactory#addPoints(double[]) 381 */ 382 public boolean addPoints3D(double[] points) { 383 boolean retval = super.addPoints3D(points); 384 if (log.isInfoEnabled()) { 385 log.info("addPoints3D()"); 386 } 387 if (log.isDebugEnabled()) { 388 String stPoints = new String(); 389 for (int i = 0, size = points.length; i < size; i += 3) { 390 stPoints += "[" 391 + points[i] 392 + "," 393 + points[i 394 + 1] 395 + "," 396 + points[i 397 + 2] 398 + "], "; 399 } 400 log.debug("Points3D: " + stPoints); 401 } 402 return retval; 403 } 404 405 /*** 406 * @see org.wkb4j.factories.AbstractWKBFactory#reset() 407 */ 408 public void reset() { 409 410 } 411 412 }

This page was automatically generated by Maven