Revision 47360

View differences:

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/Xml2dbCommons.java
133 133
//                    status.incrementCurrentValue();
134 134
            
135 135
                    count++;
136
                    if(count > 100){
136
                    if(count > 100000){
137
                        n = 10000;
138
                    } else if(count > 10000){
139
                        n = 1000;
140
                    } else if(count > 1000){
137 141
                        n = 100;
138
                    } else if(count > 1000){
139
                        n = 1000;
140
                    } else if(count > 10000){
141
                        n = 10000;
142
                    } else if(count > 100000){
143
                        n = 100000;
142
                    } else if(count > 100){
143
                        n = 10;
144 144
                    }
145 145
                }
146 146
            } finally {
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
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();
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/StructureExtractorImpl.java
92 92
                        status.setCurValue(line);
93 93
                    }
94 94
                    
95
                    if(line > 100){
95
                    if(line > 100000){
96
                        refreshInterval = 10000;
97
                    } else if(line > 10000){
98
                        refreshInterval = 1000;
99
                    } else if(line > 1000){
96 100
                        refreshInterval = 100;
97
                    } else if(line > 1000){
98
                        refreshInterval = 1000;
99
                    } else if(line > 10000){
100
                        refreshInterval = 10000;
101
                    } else if(line > 100000){
102
                        refreshInterval = 100000;
101
                    } else if(line > 100){
102
                        refreshInterval = 10;
103 103
                    }
104 104

  
105

  
105 106
                    String idvalue = dataManager.createUniqueID();
106 107
                    
107 108
                    path.add(localName);

Also available in: Unified diff