Class: CollectionSpace::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/collectionspace/client/service.rb

Overview

CollectionSpace service

Constant Summary collapse

TERM_SUFFIX =
"TermGroupList/0/termDisplayName"

Class Method Summary collapse

Class Method Details

.get(type:, subtype: "") ⇒ Object



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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/collectionspace/client/service.rb', line 7

def self.get(type:, subtype: "")
  {
    "acquisitions" => {
      identifier: "acquisitionReferenceNumber",
      ns_prefix: "acquisitions",
      path: "acquisitions",
      term: nil
    },
    "chronologyauthorities" => {
      identifier: "shortIdentifier",
      ns_prefix: "chronologies",
      path: "chronologyauthorities/urn:cspace:name(#{subtype})/items",
      term: "chronology#{TERM_SUFFIX}"
    },
    "citationauthorities" => {
      identifier: "shortIdentifier",
      ns_prefix: "citations",
      path: "citationauthorities/urn:cspace:name(#{subtype})/items",
      term: "citation#{TERM_SUFFIX}"
    },
    "claims" => {
      identifier: "claimNumber",
      ns_prefix: "claims",
      path: "claims",
      term: nil
    },
    "collectionobjects" => {
      identifier: "objectNumber",
      ns_prefix: "collectionobjects",
      path: "collectionobjects",
      term: nil
    },
    "conceptauthorities" => {
      identifier: "shortIdentifier",
      ns_prefix: "concepts",
      path: "conceptauthorities/urn:cspace:name(#{subtype})/items",
      term: "concept#{TERM_SUFFIX}"
    },
    "conditionchecks" => {
      identifier: "conditionCheckRefNumber",
      ns_prefix: "conditionchecks",
      path: "conditionchecks",
      term: nil
    },
    "conservation" => {
      identifier: "conservationNumber",
      ns_prefix: "conservation",
      path: "conservation",
      term: nil
    },
    "exhibitions" => {
      identifier: "exhibitionNumber",
      ns_prefix: "exhibitions",
      path: "exhibitions",
      term: nil
    },
    "groups" => {
      identifier: "title",
      ns_prefix: "groups",
      path: "groups",
      term: nil
    },
    "insurances" => {
      identifier: "insuranceIndemnityReferenceNumber",
      ns_prefix: "insurances",
      path: "insurances",
      term: nil
    },
    "intakes" => {
      identifier: "entryNumber",
      ns_prefix: "intakes",
      path: "intakes",
      term: nil
    },
    "iterationreports" => {
      identifier: "iterationIdentificationNumber",
      ns_prefix: "iterationreports",
      path: "iterationreports",
      term: nil
    },
    "loansin" => {
      identifier: "loanInNumber",
      ns_prefix: "loansin",
      path: "loansin",
      term: nil
    },
    "loansout" => {
      identifier: "loanOutNumber",
      ns_prefix: "loansout",
      path: "loansout",
      term: nil
    },
    "locationauthorities" => {
      identifier: "shortIdentifier",
      ns_prefix: "locations",
      path: "locationauthorities/urn:cspace:name(#{subtype})/items",
      term: "loc#{TERM_SUFFIX}"
    },
    "materialauthorities" => {
      identifier: "shortIdentifier",
      ns_prefix: "materials",
      path: "materialauthorities/urn:cspace:name(#{subtype})/items",
      term: "material#{TERM_SUFFIX}"
    },
    "media" => {
      identifier: "identificationNumber",
      ns_prefix: "media",
      path: "media",
      term: nil
    },
    "movements" => {
      identifier: "movementReferenceNumber",
      ns_prefix: "movements",
      path: "movements",
      term: nil
    },
    "objectexit" => {
      identifier: "exitNumber",
      ns_prefix: "objectexit",
      path: "objectexit",
      term: nil
    },
    "orgauthorities" => {
      identifier: "shortIdentifier",
      ns_prefix: "organizations",
      path: "orgauthorities/urn:cspace:name(#{subtype})/items",
      term: "org#{TERM_SUFFIX}"
    },
    "osteology" => {
      identifier: "InventoryID",
      ns_prefix: "osteology",
      path: "osteology",
      term: nil
    },
    "personauthorities" => {
      identifier: "shortIdentifier",
      ns_prefix: "persons",
      path: "personauthorities/urn:cspace:name(#{subtype})/items",
      term: "person#{TERM_SUFFIX}"
    },
    "placeauthorities" => {
      identifier: "shortIdentifier",
      ns_prefix: "places",
      path: "placeauthorities/urn:cspace:name(#{subtype})/items",
      term: "place#{TERM_SUFFIX}"
    },
    "pottags" => {
      identifier: "potTagNumber",
      ns_prefix: "pottags",
      path: "pottags",
      term: nil
    },
    "propagations" => {
      identifier: "propNumber",
      ns_prefix: "propagations",
      path: "propagations",
      term: nil
    },
    "relations" => {
      identifier: "csid",
      ns_prefix: "relations",
      path: "relations",
      term: nil
    },
    "taxonomyauthority" => {
      identifier: "shortIdentifier",
      ns_prefix: "taxon",
      path: "taxonomyauthority/urn:cspace:name(#{subtype})/items",
      term: "taxon#{TERM_SUFFIX}"
    },
    "transports" => {
      identifier: "transportReferenceNumber",
      ns_prefix: "transports",
      path: "transports",
      term: nil
    },
    "uoc" => {
      identifier: "referenceNumber",
      ns_prefix: "uoc",
      path: "uoc",
      term: nil
    },
    "valuationcontrols" => {
      identifier: "valuationcontrolRefNumber",
      ns_prefix: "valuationcontrols",
      path: "valuationcontrols",
      term: nil
    },
    "vocabularies" => {
      identifier: "shortIdentifier",
      ns_prefix: "vocabularyitems",
      path: "vocabularies/urn:cspace:name(#{subtype})/items",
      term: "displayName"
    },
    "workauthorities" => {
      identifier: "shortIdentifier",
      ns_prefix: "works",
      path: "workauthorities/urn:cspace:name(#{subtype})/items",
      term: "work#{TERM_SUFFIX}"
    }
  }.fetch(type)
end