Revision 47360 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.lib/org.gvsig.xml2db.lib.impl/src/main/java/org/gvsig/xml2db/lib/impl/CopyXML2dbImpl.java

View differences:

CopyXML2dbImpl.java
266 266
            saxParser.parse(is, new DefaultHandler() {
267 267
                private Locator locator;
268 268
                private StringBuilder valueBuilder;
269
                int refreshInterval = 1;
269 270
                
270 271
                @Override
271 272
                public void setDocumentLocator(Locator locator) {
......
277 278
                    line.setValue(this.locator.getLineNumber());
278 279
                    column.setValue(this.locator.getColumnNumber()-2-localName.length());
279 280

  
280
                    taskStatus.setCurValue(line.intValue());
281
                    if(line.intValue() % refreshInterval == 0) {
282
                        taskStatus.setCurValue(line.intValue());
283
                    }
284
                    
285
                    if(line.intValue() > 100000){
286
                        refreshInterval = 10000;
287
                    } else if(line.intValue() > 10000){
288
                        refreshInterval = 1000;
289
                    } else if(line.intValue() > 1000){
290
                        refreshInterval = 100;
291
                    } else if(line.intValue() > 100){
292
                        refreshInterval = 10;
293
                    }
294

  
295

  
281 296
                    try {
282 297
                        path.add(localName);
283 298
                        String path_s = StringUtils.join(path, "/");
......
301 316
                    line.setValue(this.locator.getLineNumber());
302 317
                    column.setValue(this.locator.getColumnNumber()-2-localName.length());
303 318

  
304
                    taskStatus.setCurValue(line.intValue());
319
//                    taskStatus.setCurValue(line.intValue());
305 320
                    try {
306 321
                        String path_s = StringUtils.join(path, "/");
307 322
                        TableInfo table1 = getTableByPath(tables, path_s);
......
339 354
                @Override
340 355
                public void characters(char[] ch, int start, int length) throws SAXException {
341 356
                    line.setValue(this.locator.getLineNumber());
342
                    taskStatus.setCurValue(line.intValue());
357
//                    taskStatus.setCurValue(line.intValue());
343 358

  
344 359
                    if( this.valueBuilder == null ) {
345 360
                        this.valueBuilder = new StringBuilder();

Also available in: Unified diff