-
Notifications
You must be signed in to change notification settings - Fork 0
/
DataMapping.lua
102 lines (95 loc) · 3.41 KB
/
DataMapping.lua
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
99
100
101
102
DataMapping = {}
DataMapping.Icons = {};
DataMapping.SearchTypes = {};
DataMapping.SourceFields = {};
DataMapping.ImportFields = {};
DataMapping.ImportFields.Bibliographic = {};
DataMapping.ImportFields.Holding = {};
DataMapping.ImportFields.StaticHolding = {};
-- Typical Settings that shouldn't need user configuration
DataMapping.LabelName = "Catalog Search";
-- Icons: Aeon
DataMapping.Icons["Aeon"] = {};
DataMapping.Icons["Aeon"]["Search"] = "srch_32x32";
DataMapping.Icons["Aeon"]["Home"] = "home_32x32";
DataMapping.Icons["Aeon"]["Web"] = "web_32x32";
DataMapping.Icons["Aeon"]["Record"] = "record_32x32";
DataMapping.Icons["Aeon"]["Import"] = "impt_32x32";
-- SearchTypes (query strings appended to the base URL)
DataMapping.SearchTypes["Title"] = "?search_field=title_search&q=";
DataMapping.SearchTypes["Author"] = "?search_field=author_search&q=";
DataMapping.SearchTypes["Call Number"] = "?search_field=call_number_xfacet&q=";
-- Source Fields: Aeon
DataMapping.SourceFields["Aeon"] = {};
DataMapping.SourceFields["Aeon"]["Title"] = { Table = "Transaction", Field = "ItemTitle" };
DataMapping.SourceFields["Aeon"]["Author"] = { Table = "Transaction", Field = "ItemAuthor" };
DataMapping.SourceFields["Aeon"]["Call Number"] = { Table = "Transaction", Field = "CallNumber" };
DataMapping.SourceFields["Aeon"]["Catalog Number"] = { Table = "Transaction", Field = "ReferenceNumber" };
DataMapping.SourceFields["Aeon"]["TransactionNumber"] = { Table = "Transaction", Field = "TransactionNumber" };
-- Import Fields
DataMapping.ImportFields.Bibliographic["Aeon"] = {
{
Table = "Transaction",
Field = "ItemTitle",
MaxSize = 255,
Value = "//datafield[@tag='245']/subfield[@code='a']|//datafield[@tag='245']/subfield[@code='b']"
},
{
Table = "Transaction",
Field = "ItemAuthor",
MaxSize = 255,
Value = "//datafield[@tag='100']/subfield[@code='a']|//datafield[@tag='100']/subfield[@code='b'],//datafield[@tag='110']/subfield[@code='a']|//datafield[@tag='110']/subfield[@code='b'],//datafield[@tag='111']/subfield[@code='a']|//datafield[@tag='111']/subfield[@code='b']"
},
{
Table = "Transaction",
Field = "ItemPublisher",
MaxSize = 255,
Value = "//datafield[@tag='260']/subfield[@code='b']"
},
{
Table = "Transaction",
Field = "ItemPlace",
MaxSize = 255,
Value = "//datafield[@tag='260']/subfield[@code='a']"
},
{
Table = "Transaction",
Field = "ItemDate",
MaxSize = 50,
Value = "//datafield[@tag='260']/subfield[@code='c']"
},
{
Table = "Transaction",
Field = "ItemEdition",
MaxSize = 50,
Value = "//datafield[@tag='250']/subfield[@code='a']"
},
{
Table = "Transaction",
Field = "ItemIssue",
MaxSize = 255,
Value = "//datafield[@tag='773']/subfield[@code='g']"
}
};
DataMapping.ImportFields.Holding["Aeon"] = {
{
Table = "Transaction",
Field = "ReferenceNumber", MaxSize = 50,
Value = "ReferenceNumber"
},
{
Table = "Transaction",
Field = "CallNumber", MaxSize = 255,
Value = "CallNumber"
},
{
Table = "Transaction",
Field = "Location", MaxSize = 255,
Value = "Location"
},
{
Table = "Transaction",
Field = "SubLocation", MaxSize = 255,
Value = "LocationCode"
}
};