diff --git a/src/main/java/gov/nasa/pds/tools/validate/ProblemType.java b/src/main/java/gov/nasa/pds/tools/validate/ProblemType.java index 97a5f1bbd..f482d76b4 100644 --- a/src/main/java/gov/nasa/pds/tools/validate/ProblemType.java +++ b/src/main/java/gov/nasa/pds/tools/validate/ProblemType.java @@ -117,6 +117,7 @@ public enum ProblemType { ARRAY_VALUE_OUT_OF_DATA_TYPE_RANGE("error.array.value_out_of_data_type_range"), ARRAY_VALUE_OUT_OF_MIN_MAX_RANGE("error.array.value_out_of_min_max_range"), + ARRAY_VALUE_OUT_OF_SPECIAL_CONSTANT_MIN_MAX_RANGE("warning.array.value_out_of_special_constant_min_max_range"), ARRAY_VALUE_OUT_OF_SCALED_MIN_MAX_RANGE("error.array.value_out_of_scaled_min_max_range"), @@ -139,6 +140,7 @@ public enum ProblemType { FIELDS_MISMATCH("error.table.fields_mismatch"), FIELD_VALUE_OUT_OF_MIN_MAX_RANGE("error.table.field_value_out_of_min_max_range"), + FIELD_VALUE_OUT_OF_SPECIAL_CONSTANT_MIN_MAX_RANGE("warning.table.field_value_out_of_special_constant_min_max_range"), FIELD_VALUE_TOO_LONG("error.table.field_value_too_long"), diff --git a/src/main/java/gov/nasa/pds/tools/validate/content/array/ArrayContentValidator.java b/src/main/java/gov/nasa/pds/tools/validate/content/array/ArrayContentValidator.java index 6e60b6d65..bc4e7190f 100644 --- a/src/main/java/gov/nasa/pds/tools/validate/content/array/ArrayContentValidator.java +++ b/src/main/java/gov/nasa/pds/tools/validate/content/array/ArrayContentValidator.java @@ -288,8 +288,8 @@ private void validatePosition(Array array, ArrayObject arrayObject, ArrayLocatio boolean isSpecialConstant = false; if (array.getSpecialConstants() != null) { - ProblemReporter reporter = new ArrayProblemReporter(this, ExceptionType.ERROR, - ProblemType.ARRAY_VALUE_OUT_OF_DATA_TYPE_RANGE, ArrayContentValidator.tableNameReportStr, + ProblemReporter reporter = new ArrayProblemReporter(this, ExceptionType.WARNING, + ProblemType.ARRAY_VALUE_OUT_OF_SPECIAL_CONSTANT_MIN_MAX_RANGE, ArrayContentValidator.tableNameReportStr, location); isSpecialConstant = isSpecialConstant(value, array.getSpecialConstants(), reporter); } diff --git a/src/main/java/gov/nasa/pds/tools/validate/content/table/FieldValueValidator.java b/src/main/java/gov/nasa/pds/tools/validate/content/table/FieldValueValidator.java index 8e523a87c..5aadf842a 100644 --- a/src/main/java/gov/nasa/pds/tools/validate/content/table/FieldValueValidator.java +++ b/src/main/java/gov/nasa/pds/tools/validate/content/table/FieldValueValidator.java @@ -489,8 +489,8 @@ private void checkSpecialMinMax(String value, SpecialConstants specialConstants, boolean isSpecialConstant = false; if (specialConstants != null) { - FieldProblemReporter reporter = new FieldProblemReporter(this, ExceptionType.ERROR, - ProblemType.FIELD_VALUE_OUT_OF_MIN_MAX_RANGE, recordLocation, fieldIndex); + FieldProblemReporter reporter = new FieldProblemReporter(this, ExceptionType.WARNING, + ProblemType.FIELD_VALUE_OUT_OF_SPECIAL_CONSTANT_MIN_MAX_RANGE, recordLocation, fieldIndex); isSpecialConstant = ArrayContentValidator.isSpecialConstant(number.stripTrailingZeros(), specialConstants, reporter); } diff --git a/src/test/resources/features/validate.feature b/src/test/resources/features/validate.feature index bfc021394..264c1dfbc 100644 --- a/src/test/resources/features/validate.feature +++ b/src/test/resources/features/validate.feature @@ -36,6 +36,12 @@ Scenario Outline: Execute validate command for tests below. # Validate#616 |"NASA-PDS/validate#616 Success Multiple Tables One File" | "github616" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github616.json -s json --skip-context-validation -t {resourceDir}/github616/mre_cal_sc_ttcp_delay_schulte_01s_2021069.xml" | "report_github616.json" | +# Validate#614 +|"NASA-PDS/validate#616 Success out of order offsets" | "github614" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github614.json -s json -t {resourceDir}/github614/ss__0505_0711794861_465rmo__0261222srlc10000w0__cgnj02.xml" | "report_github614.json" | + +# Validate#611 +|"NASA-PDS/validate#611 Detect Special Constants Max/Min out of range" | "github611" | 9 | "9 warnings expected" | "FIELD_VALUE_OUT_OF_SPECIAL_CONSTANT_MIN_MAX_RANGE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github611.json -s json -t {resourceDir}/github611/GRD-L1A-150313-150319_150625-BGO.xml" | "report_github611.json" | + # Validate#605 |"NASA-PDS/validate#605 Success Video+Audio" | "github605" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github605.json -s json --skip-context-validation -t {resourceDir}/github605/video_and_audio.xml" | "report_github605.json" | @@ -48,13 +54,6 @@ Scenario Outline: Execute validate command for tests below. #|"NASA-PDS/validate#599 Failure Override Schematron" | "github599" | 1 | "1 errors expected" | "SCHEMA_ERROR" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github599_3.json -s json -S {resourceDir}/github599/PDS4_PDS_1I00.sch -t {resourceDir}/github599/AREA_Camelot_1radii.xml" | "report_github599_3.json" | #|"NASA-PDS/validate#599 Failure Override Schema+Schematron" | "github599" | 1 | "1 errors expected" | "SCHEMA_ERROR" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github599_4.json -s json -S {resourceDir}/github599/PDS4_PDS_1I00.sch -x {resourceDir}/github599/PDS4_PDS_1I00.xsd -t {resourceDir}/github599/AREA_Camelot_1radii.xml" | "report_github599_4.json" | - -# Validate#614 -|"NASA-PDS/validate#616 Success out of order offsets" | "github614" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github614.json -s json -t {resourceDir}/github614/ss__0505_0711794861_465rmo__0261222srlc10000w0__cgnj02.xml" | "report_github614.json" | - -# Validate#611 -|"NASA-PDS/validate#611 Detect Special Constants Max/Min out of range" | "github611" | 9 | "9 errors expected" | "FIELD_VALUE_OUT_OF_MIN_MAX_RANGE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github611.json -s json -t {resourceDir}/github611/GRD-L1A-150313-150319_150625-BGO.xml" | "report_github611.json" | - # Validate#597 |"NASA-PDS/validate#597 Success Find Resources in Older/Skipped Bundles/Collections" | "github597" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github597_1.json -s json -R pds4.bundle -t {resourceDir}/github597" | "report_github597_1.json" |