import java.util.List;
import java.util.Map;
+import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVRecord;
import org.simantics.db.Resource;
import org.simantics.district.imports.DistrictImportUtils;
private int valvePositionIndx = -1;
private int addressIndex;
private int lengthIndex;
+ private int detailedGeometryIndex;
// Third page
return source;
}
- public List<CSVRecord> getRows(int amount) throws IOException {
+ public List<CSVRecord> getRows(int amount, boolean readFirstAsHeader) throws IOException {
if (source != null)
- return DistrictImportUtils.readRows(source, delimiter, amount);
+ return DistrictImportUtils.readRows(source, delimiter, readFirstAsHeader, amount);
else
return Collections.emptyList();
}
public List<Map<String, String>> readRows(int amount) throws IOException {
if (source != null)
- return DistrictImportUtils.readRows(source, delimiter, readFirstAsHeader, amount);
+ return DistrictImportUtils.readRows(source, CSVFormat.newFormat(delimiter), readFirstAsHeader, amount);
else
return Collections.emptyList();
}
public void setLengthIndex(int lengthIndex) {
this.lengthIndex = lengthIndex;
}
+
+ public void detailedGeometryIndex(int detailedGeometryIndex) {
+ this.detailedGeometryIndex = detailedGeometryIndex;
+ }
+
+ public int getDetailedGeometryIndex() {
+ return detailedGeometryIndex;
+ }
}