Revision 47679
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.gml/src/main/java/org/gvsig/fmap/dal/store/gml/virtualrows/XMLFileAsList.java | ||
---|---|---|
113 | 113 |
IOUtils.closeQuietly(this.index); |
114 | 114 |
} |
115 | 115 |
|
116 |
private List<String> getRecord(long position, List<String> fieldPaths) { |
|
116 |
private synchronized List<String> getRecord(long position, List<String> fieldPaths) {
|
|
117 | 117 |
class StopParserSAXException extends SAXException { |
118 | 118 |
} |
119 | 119 |
|
... | ... | |
194 | 194 |
// System.out.println("RECORD "+position); |
195 | 195 |
ParseRecordsHandler handler = null; |
196 | 196 |
Record record = this.index.get64(position); |
197 |
int recordLine = record.getInt(IDXFIELD_BEGINLINE); |
|
198 |
int recordColumn = record.getInt(IDXFIELD_BEGINCOLUMN); |
|
199 |
long recordPosition = record.getLong(IDXFIELD_BEGINRECORDPOS); |
|
197 | 200 |
try { |
198 |
long recordPosition = record.getLong(IDXFIELD_BEGINRECORDPOS); |
|
199 | 201 |
this.reader.seek(recordPosition); |
200 | 202 |
// TODO: guardarse el tama?o del registro en el indice y en funcion de eso usar un buffersize mas peque?o aqui si procede |
201 | 203 |
int bufferSize = 1024*8; |
... | ... | |
213 | 215 |
} catch (StopParserSAXException ex) { |
214 | 216 |
//Do nothing |
215 | 217 |
} catch (Exception ex) { |
216 |
throw new RuntimeException("Can't parse record " + position, ex); |
|
218 |
throw new RuntimeException("Can't parse record " + position +" recordPosition "+recordPosition+ " line "+recordLine+ " column "+recordColumn, ex);
|
|
217 | 219 |
} |
218 | 220 |
if (handler == null) { |
219 | 221 |
return null; |
... | ... | |
311 | 313 |
return false; |
312 | 314 |
} |
313 | 315 |
|
314 |
final public void createIndex(File indexFile, SimpleTaskStatus status) throws IOException { |
|
316 |
final public synchronized void createIndex(File indexFile, SimpleTaskStatus status) throws IOException {
|
|
315 | 317 |
try { |
316 | 318 |
// 1. Creamos el indice vacio |
317 | 319 |
RecordsFile.RecordTypeBuilder builder = recordTypeBuilder() |
Also available in: Unified diff