Skip to content

Commit

Permalink
fixup! feat: download wfs files to tmp folder for bucket service
Browse files Browse the repository at this point in the history
Refactor to rename downloaded file to not start with
a "." and to have name format as
<datasetId>_<numberOfTotalFeatureProcessed>

ING-3609
  • Loading branch information
kapil-agnihotri committed Aug 7, 2023
1 parent bb0fe6d commit 8e10178
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,10 @@ private void createNextIterator() {
try {
URL url = nextUri.toURL();
StringBuilder fileName = new StringBuilder(tmpdir);
fileName.append("/").append(url.getPath().replaceAll("/", "."))
.append(totalFeaturesProcessed).append(".gml");

fileName.append("/")
.append(url.getPath().substring(url.getPath().lastIndexOf("/") + 1))
.append("_").append(totalFeaturesProcessed).append(".gml");

// TODO: may be download files in a thread
File downloadFile = new File(fileName.toString());
Expand Down

0 comments on commit 8e10178

Please sign in to comment.