Skip to content

Commit b90db7c

Browse files
author
mgeipel
committed
examples updated
1 parent b004dbb commit b90db7c

File tree

6 files changed

+49
-1052
lines changed

6 files changed

+49
-1052
lines changed

examples/beacon/create/create.flux

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
//creates a beacon file based on a pica+ dump of the DNB CBS data.
22

3-
default out = dump + ".beacon";
3+
default out = dump + "-" + type + ".beacon";
44
default header = FLUX_DIR + "header.txt";
5+
default type = "ALL";
56

67
//read header
78
"reading header " + header | write("stdout");
@@ -16,12 +17,12 @@ as-lines|
1617
catch-object-exception|
1718
decode-pica|
1819
batch-log(batchsize="100000")|
19-
morph(FLUX_DIR + "extract.xml")|
20+
morph(FLUX_DIR + "extract.xml", *)|
2021
stream-to-triples(redirect="true")|
2122
sort-triples(by="subject")|
2223
collect-triples|
2324
morph(FLUX_DIR + "output.xml")|
24-
batch-log("merged ${totalRecords}",batchsize="100000")|
25+
batch-log("merged ${totalRecords}", batchsize="100000")|
2526
stream-to-triples|
2627
template("${s}")|
2728
@Y;

examples/beacon/create/extract.xml

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,54 @@
99
<equals string="Tp" />
1010
</data>
1111

12-
<combine name="{to:${ref}}refed" value="">
13-
<data source="041A*.9" name="ref">
12+
<combine name="{to:${ref}}refed" value="${v}">
13+
<data
14+
source="041A*.9|028A.9|029B*.9|028C*.9|028Q*.9|028P*.9|028F*.9|028M*.9|028D*.9|028E*.9"
15+
name="ref">
1416
<trim />
1517
<unique />
1618
</data>
17-
</combine>
18-
19-
2019

20+
<choose name="v">
21+
<!-- DBSM: -->
22+
<!-- (006U $0 “04p01*”) or (017A $a “yy”) -->
23+
<data source="006U.0">
24+
<regexp match="04p01.*" />
25+
<constant value="DBSM|ALL" />
26+
</data>
27+
<data source="017A.a">
28+
<equals string="yy" />
29+
<constant value="DBSM|ALL" />
30+
</data>
31+
<!-- DEA: -->
32+
<!-- (001@ $a 2””) or (209A $f “Exilarchiv” or 209A $f “HB/EB”) -->
33+
<data source="[email protected]">
34+
<equals string="2" />
35+
<constant value="DEA|ALL" />
36+
</data>
37+
<data source="209A.f">
38+
<equals string="HB/EB" />
39+
<constant value="DEA|ALL" />
40+
</data>
41+
<!-- DMA: -->
42+
<!-- (002@ $0 “G*” or 002@ $0 “M*”) or (006U $0 “10,P01*”) -->
43+
<data source="[email protected]">
44+
<regexp match="^[GM].*" />
45+
<constant value="DMA|ALL" />
46+
</data>
47+
<data source="006U.0">
48+
<regexp match="^10,P01.*" />
49+
<constant value="DMA|ALL" />
50+
</data>
51+
<data source="_id">
52+
<constant value="TITLE|ALL"/>
53+
</data>
54+
<postprocess>
55+
<regexp match="$[type]"/>
56+
</postprocess>
57+
</choose>
58+
59+
</combine>
2160

2261
</rules>
2362
</metamorph>

examples/gnd/crisscross-connections/extract.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
</choose>
222222

223223
<choose name="ent">
224-
<concat delimiter="; " name="ent">
224+
<concat delimiter=" | " name="ent">
225225
<data source="004B.a" />
226226
</concat>
227227
<data source="_id">

0 commit comments

Comments
 (0)