-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel.jv
More file actions
98 lines (86 loc) · 2.55 KB
/
model.jv
File metadata and controls
98 lines (86 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// Warning Flags can either be "S" or "O" (see page 7)
constraint WarningFlagList oftype AllowlistConstraint {
allowlist: [
"S",
"O"
];
}
valuetype WarningFlag oftype text {
constraints: [
WarningFlagList
];
}
// This is an optical property database of refractive indices and dielectric constants (see page 2)
constraint PropertyTypeList oftype AllowlistConstraint {
allowlist: [
"Refractive Index",
"Dielectric Constant"
];
}
valuetype PropertyType oftype text {
constraints:
[
PropertyTypeList
];
}
// DateFormat constrained to either YYYY-MM-DD or DD/MM/YYYY
// Date in shared is only YYYY-MM-DD
constraint DateFormatRegex oftype RegexConstraint {
regex: /\b(?:\d{4}-\d{2}-\d{2}|(?:\d{1,2}\/){2}\d{4})\b/;
}
valuetype DateFormat oftype text {
constraints:
[
DateFormatRegex
];
}
use {
BracesRemover
} from "../../shared/composite-blocktypes.jv";
pipeline RefractiveIndicesAndDielectricConstantsPipeline {
RefractiveIndicesAndDielectricConstantsExtractor
-> RefractiveIndicesAndDielectricConstantsTextFileInterpreter
-> RefractiveIndicesAndDielectricConstantsCSVInterpreter
-> RefractiveIndicesAndDielectricConstantsTableInterpreter
-> BracesRemover
-> RefractiveIndicesAndDielectricConstantsDatabaseLoader;
block RefractiveIndicesAndDielectricConstantsExtractor oftype HttpExtractor {
url: "https://figshare.com/ndownloader/files/33982973";
}
block RefractiveIndicesAndDielectricConstantsTextFileInterpreter oftype TextFileInterpreter { }
block RefractiveIndicesAndDielectricConstantsCSVInterpreter oftype CSVInterpreter {
delimiter: ",";
enclosing: '"';
enclosingEscape: '"';
}
block BracesRemover oftype BracesRemover {
columnWithBraces: 'values';
}
block RefractiveIndicesAndDielectricConstantsTableInterpreter oftype TableInterpreter {
header: true;
columns: [
"DOI" oftype DOI,
"Date" oftype DateFormat,
"Journal" oftype text,
"Title" oftype text,
"compound" oftype text,
"extracted_error" oftype text,
"extracted_value" oftype text,
"measurement_wavelength" oftype text,
"normalised_name" oftype text,
"raw_value" oftype text,
"specifier" oftype text,
"values" oftype text,
"warning" oftype WarningFlag,
"dielectric_loss" oftype text,
"measurement_frequency" oftype text,
"doi_variation" oftype text,
"original_sentence" oftype text,
"property_type" oftype PropertyType,
];
}
block RefractiveIndicesAndDielectricConstantsDatabaseLoader oftype SQLiteLoader {
table: "RefractiveIndicesAndDielectricConstants";
file: "./RefractiveIndicesAndDielectricConstants.sqlite";
}
}