Commit 558f67b1 authored by Ina Curdt's avatar Ina Curdt
Browse files

Merge branch 'DEVELOP' of...

Merge branch 'DEVELOP' of ssh://git.eclipse.org:29418/openk-usermodules/org.eclipse.openk-usermodules.gridFailureInformation.backend into SI-541-Rolle-Gast-Lesezugriff

merge conflicts resolved
parents 6204294b 7a5fd9ff
......@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.xml.ws.http.HTTPException;
import java.io.FileReader;
import java.io.IOException;
......@@ -124,7 +125,7 @@ public class AddressImportService {
storeAddress(isTableClean, line);
}
} catch (IOException | CsvValidationException e) {
} catch (IOException | CsvValidationException | NumberFormatException e) {
log.error(e);
}
Instant end = Instant.now();
......@@ -189,7 +190,7 @@ public class AddressImportService {
addressService.updateOrInsertAddressByG3efid(addressDto);
}
} catch (IOException | CsvValidationException e) {
} catch (IOException | CsvValidationException | NumberFormatException e) {
log.error(e);
}
Instant end = Instant.now();
......@@ -202,6 +203,7 @@ public class AddressImportService {
String csvFile = fileWaterConnections;
CSVReader reader = null;
String[]line;
try {final CSVParser parser = new CSVParserBuilder()
.withSeparator(';')
.withIgnoreQuotations(true)
......@@ -210,7 +212,6 @@ public class AddressImportService {
.withSkipLines(1)
.withCSVParser(parser)
.build();
String[]line;
while ((line = reader.readNext()) != null) {
AddressDto addressDto = new AddressDto();
// !!! Parsing BigDecimal anpassen, locale???
......@@ -231,7 +232,7 @@ public class AddressImportService {
addressService.updateOrInsertAddressByG3efid(addressDto);
}
} catch (IOException | CsvValidationException e) {
} catch (IOException | CsvValidationException | NumberFormatException e) {
log.error(e);
}
Instant end = Instant.now();
......@@ -272,7 +273,7 @@ public class AddressImportService {
addressService.updateOrInsertAddressByG3efid(addressDto);
}
} catch (IOException | CsvValidationException e) {
} catch (IOException | CsvValidationException | NumberFormatException e) {
log.error(e);
}
Instant end = Instant.now();
......@@ -313,7 +314,7 @@ public class AddressImportService {
}
}
} catch (IOException | CsvValidationException e) {
} catch (IOException | CsvValidationException | NumberFormatException e) {
log.error(e);
}
Instant end = Instant.now();
......
......@@ -123,8 +123,8 @@ adressimport:
cleanup: true
cron: 0 0 0 1 * ?
file:
addresses: /opt/mics/addressImport/importFiles/adressenTest.csv
power-connections: /opt/mics/addressImport/importFiles/strom_hausanschlussTest.csv
water-connections: /opt/mics/addressImport/importFiles/wasser_hausanschlussTest.csv
gas-connections: /opt/mics/addressImport/importFiles/gas_hausanschlussTest.csv
power-stations: /opt/mics/addressImport/importFiles/strom_stationTest.csv
\ No newline at end of file
addresses: /opt/mics/addressImport/importFiles/EREP_CSV_ADRESSEN.csv
power-connections: /opt/mics/addressImport/importFiles/EREP_CSV_STROM_HAUSANSCHLUSS.csv
water-connections: /opt/mics/addressImport/importFiles/EREP_CSV_WASSER_HAUSANSCHLUSS.csv
gas-connections: /opt/mics/addressImport/importFiles/EREP_CSV_GAS_HAUSANSCHLUSS.csv
power-stations: /opt/mics/addressImport/importFiles/EREP_CSV_STROM_STATION.csv
\ No newline at end of file
......@@ -15,7 +15,6 @@
<description>Grid-Failure-Information Project for openKONSEQUENZ</description>
<properties>
<skip.asciidoc>false</skip.asciidoc>
<maven.test.skip>false</maven.test.skip>
<flyway.sqlMigrationSeparator>__</flyway.sqlMigrationSeparator>
......@@ -32,10 +31,6 @@
<spring-security-test.version>5.2.1.RELEASE</spring-security-test.version>
<powerMockReflect.version>2.0.0</powerMockReflect.version>
<sonar-maven-plugin.version>3.2</sonar-maven-plugin.version>
<asciidoctor-maven-plugin-version>1.5.3</asciidoctor-maven-plugin-version>
<asciidoctorj-pdf-version>1.5.0-alpha.11</asciidoctorj-pdf-version>
<asciidoctorj-version>1.5.4</asciidoctorj-version>
<asciidoctorj-diagram-versions>1.5.4.1</asciidoctorj-diagram-versions>
<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
<jruby-complete-version>9.0.0.0</jruby-complete-version>
<mapstruct.version>1.2.0.Final</mapstruct.version>
......@@ -178,6 +173,11 @@
<version>${rabbitmq.version}</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.12</version>
</dependency>
</dependencies>
......@@ -233,87 +233,6 @@
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>${asciidoctor-maven-plugin-version}</version>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>${jruby-complete-version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-pdf</artifactId>
<version>${asciidoctorj-pdf-version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>${asciidoctorj-version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-diagram</artifactId>
<version>${asciidoctorj-diagram-versions}</version>
</dependency>
</dependencies>
<configuration>
<sourceDirectory>src/main/asciidoc</sourceDirectory>
<requires>
<require>asciidoctor-diagram</require>
</requires>
<attributes>
<imagesoutdir>${project.build.directory}/generated-docs/img</imagesoutdir>
<imagesDir>${project.build.directory}/generated-docs/img</imagesDir>
</attributes>
</configuration>
<executions>
<execution>
<id>output-html</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<skip>${skip.asciidoc}</skip>
<imagesDir>./img</imagesDir>
<requires>
<require>asciidoctor-diagram</require>
</requires>
<sourceHighlighter>coderay</sourceHighlighter>
<backend>html</backend>
<doctype>book</doctype>
</configuration>
</execution>
<execution>
<id>output-pdf</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<skip>${skip.asciidoc}</skip>
<imagesDir>${project.build.directory}/generated-docs/img</imagesDir>
<requires>
<require>asciidoctor-diagram</require>
</requires>
<sourceHighlighter>coderay</sourceHighlighter>
<backend>pdf</backend>
<doctype>book</doctype>
<attributes>
<icons>font</icons>
<pagenums />
<toc />
<idprefix />
<idseparator>-</idseparator>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment