You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//1st part, batch_code must be between 1 and 11 characters long, and (implicitly multiple conditions are joined
23
+
//by a logical AND unless another boolean is provided). 2nd part restricts to form similar to WO95Y14B000 (last
24
+
//three digits are running number for batches throughout the project.
25
+
department: is("WO") and (in($file_path) and in($resource_uri))
26
+
//Parentheses control evaluation order of booleans as might be expected
27
+
//Department is fixed value of WO for this project.
28
+
//The grouped "in" statements say that the value found in this field must also be found as part of the fields
29
+
//"file_path" and "resource_uri"
30
+
division: is("13")
31
+
//this field must be precisely 13
32
+
series: is("95") and (in($file_path) and in($resource_uri))
33
+
//Fixed value of 95 for this project
34
+
//The value must also be part of the fields "file_path" and "resource_uri"
35
+
sub_series: is("1")
36
+
//For the 2014-15 project all material to be digitised is in sub_series 1 (France and Flanders)
37
+
sub_sub_series: if($piece/is("5500"),is(""),(range(1,7) or is("115")))
38
+
//As described in Appendix E of the ITT, the 1914-15 project is scanning material in sub_sub_series 1-7 and 115,
39
+
//Piece 5500 is also included which is not in any sub_sub_series, so the value is blank for that piece only.
40
+
piece: if($sub_sub_series/is("1"),range(1,85),if($sub_sub_series/is("2"),range(86,153),if($sub_sub_series/is("3"),range(154,267),if($sub_sub_series/is("4"),range(268,358),if($sub_sub_series/is("5"),range(359,430),if($sub_sub_series/is("6"),range(431,517),if($sub_sub_series/is("7"),range(518,571),if($sub_sub_series/is("115"),range(3949,4193),if($sub_sub_series/is(""),is("5500")))))))))) and (in($file_path) and in($resource_uri))
41
+
//For this project there is a defined relationship between piece ranges as listed in Appendix E
42
+
//This is encapsulated in this rather complex if,then,else statement
43
+
//The value must also be part of the fields "file_path" and "resource_uri"
44
+
item: (range(1,20) and in($file_path)) or is("")
45
+
//Most pieces are subdivided into items, there are not expected to be more than 10 per piece
46
+
//The value must also be part of the fields "file_path" and "resource_uri"
47
+
//In many cases the item level is not used, so this would be left blank.
48
+
//as the sorting/cataloguing process advances this condition may be tightened
49
+
ordinal: range(1,500) and in($file_path) unique($department,$division,$series,$sub_series,$sub_sub_series,$piece,$item,$ordinal)
50
+
//the ordinal is a simple running count of the images within an item (or piece if not itemised).
51
+
//No single item (or piece if not itemised) should contain more than 150 pages but rule changed to 500 to allow for exceptions
52
+
//This (with leading zeroes) also forms the final part of the filepath, immediately before the .jp2 extension
53
+
//the combination of fields indicated should be unique within the file
54
+
description: not("") and regex("^.*[^\.]$")
55
+
//description is a fairly free-form field, but must not be empty
Copy file name to clipboardExpand all lines: csv-validator-core/src/test/scala/uk/gov/nationalarchives/csv/validator/MetaDataValidatorAcceptanceSpec.scala
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -516,6 +516,21 @@ class MetaDataValidatorAcceptanceSpec extends Specification with TestResources {
Copy file name to clipboardExpand all lines: csv-validator-core/src/test/scala/uk/gov/nationalarchives/csv/validator/MetaDataValidatorIntegrityCheckSpec.scala
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,13 @@ class MetaDataValidatorIntegrityCheckSpec extends Specification with TestResourc
Copy file name to clipboardExpand all lines: csv-validator-core/src/test/scala/uk/gov/nationalarchives/csv/validator/schema/v1_1/SchemaParserVersionSpec.scala
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ class SchemaParserVersionSpec extends SchemaSpecBase with TestResources{
51
51
LastName: @IgnoreCase regex ("[a]")"""
52
52
53
53
parse(newStringReader(schema)) must beLike {
54
-
caseFailure(messages, _) => messages mustEqual s"Invalid schema version. This version of the csv validator supports only 1.1 and below."
54
+
caseFailure(messages, _) => messages mustEqual s"Invalid schema version. This version of the csv validator supports only 1.2 and below."
0 commit comments