Skip to content

Commit

Permalink
Fixed output format to include stage numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
yazan committed Aug 11, 2016
1 parent 024ed6f commit d5dd643
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>edu.iris.dmc</groupId>
<artifactId>stationXml-Validator</artifactId>
<packaging>pom</packaging>
<version>1.5.1</version>
<version>1.5.2</version>
<name>FDSN StationXML Validator</name>


Expand Down
159 changes: 159 additions & 0 deletions validation-client/logs/station_validator.log
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,162 @@
2016-08-11 13:02:39 - Starting Application on Yazans-MacBook-Pro.local with PID 65476 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:02:39 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:02:39 - No active profile set, falling back to default profiles: default
2016-08-11 13:40:48 - Starting Application on Yazans-MacBook-Pro.local with PID 65633 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:40:48 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:40:48 - No active profile set, falling back to default profiles: default
2016-08-11 13:41:22 - Starting Application on Yazans-MacBook-Pro.local with PID 65634 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:41:22 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:41:22 - No active profile set, falling back to default profiles: default
2016-08-11 13:44:39 - Starting Application on Yazans-MacBook-Pro.local with PID 65644 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:44:39 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:44:39 - No active profile set, falling back to default profiles: default
2016-08-11 13:48:00 - Starting Application on Yazans-MacBook-Pro.local with PID 65653 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:48:00 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:48:00 - No active profile set, falling back to default profiles: default
2016-08-11 13:49:02 - Starting Application on Yazans-MacBook-Pro.local with PID 65657 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:49:02 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:49:02 - No active profile set, falling back to default profiles: default
2016-08-11 13:49:03 - Application startup failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:809)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:790)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:777)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at edu.iris.dmc.Application.main(Application.java:78)
at edu.iris.dmc.station.validator.ApplicationTest.main(ApplicationTest.java:12)
Caused by: java.lang.NumberFormatException: For input string: "(stage:2)512"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:569)
at java.lang.Integer.valueOf(Integer.java:766)
at edu.iris.dmc.service.Error.<init>(Error.java:46)
at edu.iris.dmc.service.Errors.add(Errors.java:38)
at edu.iris.dmc.service.ValidatorServiceImp.run(ValidatorServiceImp.java:153)
at edu.iris.dmc.ValidStationController.run(ValidStationController.java:40)
at edu.iris.dmc.Application.validate(Application.java:247)
at edu.iris.dmc.Application.run(Application.java:212)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:806)
... 5 common frames omitted
2016-08-11 13:49:17 - Starting Application on Yazans-MacBook-Pro.local with PID 65658 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:49:17 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:49:17 - No active profile set, falling back to default profiles: default
2016-08-11 13:49:18 - Application startup failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:809)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:790)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:777)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at edu.iris.dmc.Application.main(Application.java:78)
at edu.iris.dmc.station.validator.ApplicationTest.main(ApplicationTest.java:12)
Caused by: java.lang.NumberFormatException: For input string: "(stage:2)512"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:569)
at java.lang.Integer.valueOf(Integer.java:766)
at edu.iris.dmc.service.Error.<init>(Error.java:46)
at edu.iris.dmc.service.Errors.add(Errors.java:38)
at edu.iris.dmc.service.ValidatorServiceImp.run(ValidatorServiceImp.java:153)
at edu.iris.dmc.ValidStationController.run(ValidStationController.java:40)
at edu.iris.dmc.Application.validate(Application.java:247)
at edu.iris.dmc.Application.run(Application.java:212)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:806)
... 5 common frames omitted
2016-08-11 13:49:55 - Starting Application on Yazans-MacBook-Pro.local with PID 65661 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:49:55 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:49:55 - No active profile set, falling back to default profiles: default
2016-08-11 13:49:56 - Application startup failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:809)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:790)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:777)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at edu.iris.dmc.Application.main(Application.java:78)
at edu.iris.dmc.station.validator.ApplicationTest.main(ApplicationTest.java:12)
Caused by: java.lang.NumberFormatException: For input string: "(stage:2)512"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:569)
at java.lang.Integer.valueOf(Integer.java:766)
at edu.iris.dmc.service.Error.<init>(Error.java:46)
at edu.iris.dmc.service.Errors.add(Errors.java:38)
at edu.iris.dmc.service.ValidatorServiceImp.run(ValidatorServiceImp.java:153)
at edu.iris.dmc.ValidStationController.run(ValidStationController.java:40)
at edu.iris.dmc.Application.validate(Application.java:247)
at edu.iris.dmc.Application.run(Application.java:212)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:806)
... 5 common frames omitted
2016-08-11 13:50:20 - Starting Application on Yazans-MacBook-Pro.local with PID 65662 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:50:20 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:50:20 - No active profile set, falling back to default profiles: default
2016-08-11 13:50:39 - Starting Application on Yazans-MacBook-Pro.local with PID 65665 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:50:39 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:50:39 - No active profile set, falling back to default profiles: default
2016-08-11 13:50:41 - Application startup failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:809)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:790)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:777)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at edu.iris.dmc.Application.main(Application.java:78)
at edu.iris.dmc.station.validator.ApplicationTest.main(ApplicationTest.java:12)
Caused by: java.lang.NumberFormatException: For input string: "(stage:2)512"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:569)
at java.lang.Integer.valueOf(Integer.java:766)
at edu.iris.dmc.service.Error.<init>(Error.java:46)
at edu.iris.dmc.service.Errors.add(Errors.java:38)
at edu.iris.dmc.service.ValidatorServiceImp.run(ValidatorServiceImp.java:153)
at edu.iris.dmc.ValidStationController.run(ValidStationController.java:40)
at edu.iris.dmc.Application.validate(Application.java:247)
at edu.iris.dmc.Application.run(Application.java:212)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:806)
... 5 common frames omitted
2016-08-11 13:52:17 - Starting Application on Yazans-MacBook-Pro.local with PID 65668 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:52:17 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:52:17 - No active profile set, falling back to default profiles: default
2016-08-11 13:52:18 - Application startup failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:809)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:790)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:777)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at edu.iris.dmc.Application.main(Application.java:78)
at edu.iris.dmc.station.validator.ApplicationTest.main(ApplicationTest.java:12)
Caused by: java.lang.NumberFormatException: For input string: "stage[2] 512"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at edu.iris.dmc.service.Error.<init>(Error.java:46)
at edu.iris.dmc.service.Errors.add(Errors.java:38)
at edu.iris.dmc.service.ValidatorServiceImp.run(ValidatorServiceImp.java:153)
at edu.iris.dmc.ValidStationController.run(ValidStationController.java:40)
at edu.iris.dmc.Application.validate(Application.java:247)
at edu.iris.dmc.Application.run(Application.java:212)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:806)
... 5 common frames omitted
2016-08-11 13:52:40 - Starting Application on Yazans-MacBook-Pro.local with PID 65671 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:52:40 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:52:40 - No active profile set, falling back to default profiles: default
2016-08-11 13:52:41 - Application startup failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:809)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:790)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:777)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at edu.iris.dmc.Application.main(Application.java:78)
at edu.iris.dmc.station.validator.ApplicationTest.main(ApplicationTest.java:12)
Caused by: java.lang.NumberFormatException: For input string: "2-512"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at edu.iris.dmc.service.Error.<init>(Error.java:46)
at edu.iris.dmc.service.Errors.add(Errors.java:38)
at edu.iris.dmc.service.ValidatorServiceImp.run(ValidatorServiceImp.java:153)
at edu.iris.dmc.ValidStationController.run(ValidStationController.java:40)
at edu.iris.dmc.Application.validate(Application.java:247)
at edu.iris.dmc.Application.run(Application.java:212)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:806)
... 5 common frames omitted
2016-08-11 13:52:51 - Starting Application on Yazans-MacBook-Pro.local with PID 65672 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:52:51 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:52:51 - No active profile set, falling back to default profiles: default
2016-08-11 13:53:56 - Starting Application on Yazans-MacBook-Pro.local with PID 65675 (/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/target/classes started by Suleiman in /Users/Suleiman/PROJECTS/StationXML-Validator/validation-client)
2016-08-11 13:53:56 - Running with Spring Boot v1.3.3.RELEASE, Spring v4.2.5.RELEASE
2016-08-11 13:53:56 - No active profile set, falling back to default profiles: default
2 changes: 1 addition & 1 deletion validation-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<dependency>
<groupId>edu.iris.dmc</groupId>
<artifactId>validation-service</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>edu.iris.dmc</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
public class ApplicationTest {

public static void main(String[] args) throws Exception {
//args = new String[] {"/StationXML-Validator/validation-client/src/test/resources/XX-TEST-FalseFailure-Rule413.xml.txt"};
args = new String[] {"/Users/Suleiman/PROJECTS/StationXML-Validator/validation-client/src/test/resources/XX-TEST-FalseFailure-Rule413.xml.txt"};
//args = new String[] {"/Users/Suleiman/stations/archive/", "--summary", "-o=/Users/Suleiman/outs.txt"};
//args = new String[] {"--print-rules"};
args = new String[] {"--print-units"};
//args = new String[] {"--print-units"};
Application.main(args);
}
}
2 changes: 1 addition & 1 deletion validation-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<artifactId>validation-service</artifactId>
<name>validation-service</name>
<version>1.0.2</version>
<version>1.0.3</version>
<packaging>jar</packaging>
<url>http://maven.apache.org</url>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,15 @@ null, null, null, map(violation.getPropertyPath()), violation.getInvalidValue(),
}

for (ResponseStage stage : response.getStage()) {

Set<ConstraintViolation<ResponseStage>> stageConstraintViolations = validator
.validate(stage);
for (ConstraintViolation<ResponseStage> violation : stageConstraintViolations) {
errors.add(network.getCode(), network.getStartDate(), network.getEndDate(),
station.getCode(), station.getStartDate(), station.getEndDate(),
channel.getLocationCode(), channel.getCode(), channel.getStartDate(),
channel.getEndDate(), map(violation.getPropertyPath()),
violation.getInvalidValue(), violation.getMessage());
violation.getInvalidValue(), "(stage:"+stage.getNumber()+")"+violation.getMessage());
}

if (stage.getFilters() != null) {
Expand All @@ -154,7 +155,7 @@ null, null, null, map(violation.getPropertyPath()), violation.getInvalidValue(),
station.getEndDate(), channel.getLocationCode(),
channel.getCode(), channel.getStartDate(), channel.getEndDate(),
map(violation.getPropertyPath()), violation.getInvalidValue(),
violation.getMessage());
violation.getMessage()+"[stage:"+stage.getNumber()+"]");
}
}
if (stage.getDecimation() != null) {
Expand Down

0 comments on commit d5dd643

Please sign in to comment.