File Coverage

blib/lib/Koha/Contrib/ValueBuilder/RepeatableAutocomplete/RDA.pm
Criterion Covered Total %
statement 16 38 42.1
branch 0 6 0.0
condition 0 4 0.0
subroutine 6 8 75.0
pod 0 3 0.0
total 22 59 37.2


line stmt bran cond sub pod time code
1             package Koha::Contrib::ValueBuilder::RepeatableAutocomplete::RDA;
2 1     1   154912 use strict;
  1         2  
  1         31  
3 1     1   3 use warnings;
  1         2  
  1         48  
4 1     1   444 use utf8;
  1         231  
  1         23  
5              
6             # ABSTRACT: Values for MARC21 based on RDA
7              
8             our $VERSION = '1.006'; # VERSION
9              
10 1     1   405 use Koha::Contrib::ValueBuilder::RepeatableAutocomplete;
  1         3  
  1         31  
11 1     1   6 use Exporter 'import';
  1         1  
  1         1192  
12              
13             our @EXPORT_OK = qw(creator other_agent);
14              
15             my $CREATORS;
16             my $OTHER_AGENTS;
17             my %VALUES = get_values();
18              
19             sub creator {
20 0   0 0 0 0 my $lang = lc(shift) || 'de';
21              
22 0 0       0 unless ($CREATORS) {
23 0         0 my @list;
24 0         0 for my $type (qw(creator other_agent)) {
25 0         0 for my $data (@{$VALUES{$lang}->{$type}}) {
  0         0  
26 0         0 my $label = $data->{label};
27 0 0       0 $label.= ' (Geistige*r Schöpfer*in)' if $type eq 'creator';
28 0         0 my $item = { value_for_target => $data->{value}, value_for_input => $data->{label}, label => $label };
29 0         0 push(@list, $item);
30             }
31             }
32 0         0 $CREATORS = \@list;
33             }
34              
35             Koha::Contrib::ValueBuilder::RepeatableAutocomplete->build_builder_inline(
36 0         0 { target => '4',
37             data => $CREATORS,
38             }
39             );
40             }
41              
42             sub other_agent {
43 0   0 0 0 0 my $lang = lc(shift) || 'de';
44              
45 0 0       0 unless ($OTHER_AGENTS) {
46 0         0 my @list;
47 0         0 for my $type (qw(creator other_agent)) {
48 0         0 for my $data (@{$VALUES{$lang}->{$type}}) {
  0         0  
49 0         0 my $item = { value_for_target => $data->{value}, value_for_input => $data->{label}, label => $data->{label} };
50 0         0 push(@list, $item);
51             }
52             }
53 0         0 $OTHER_AGENTS = \@list;
54             }
55              
56             Koha::Contrib::ValueBuilder::RepeatableAutocomplete->build_builder_inline(
57 0         0 { target => '4',
58             data => $OTHER_AGENTS
59             }
60             );
61             }
62              
63             # type: creator
64             # https://koha-wiki.thulb.uni-jena.de/erschliessung/katalogisierung/handbuecher/100-haupteintragung-personenname/#Beziehungskennzeichnungen_fuer_Geistige_Schoepfer
65             # https://wiki.dnb.de/download/attachments/106042227/AH-017.pdf
66              
67             # type: other_agent
68             # https://koha-wiki.thulb.uni-jena.de/erschliessung/katalogisierung/handbuecher/700-nebeneintragung-personenname/#Beziehungskennzeichnungen_fuer_sonstige_Personen_Familien_und_Koerperschaften_die_mit_einer_Ressource_in_Verbindung_stehen
69             # https://wiki.dnb.de/download/attachments/106042227/AH-017.pdf
70              
71             sub get_values {
72             return (
73 1     1 0 157 de => {
74             'creator' => [
75             { label => 'AquarellistIn', value => 'oth' },
76             { label => 'ArchitektIn', value => 'arc' },
77             { label => 'Archiv', value => 'oth' },
78             { label => 'BaumeisterIn', value => 'oth' },
79             { label => 'BerichterstatterIn', value => 'cre' },
80             { label => 'BestandsbildnerIn', value => 'oth' },
81             { label => 'Bildagentur', value => 'oth' },
82             { label => 'BildhauerIn', value => 'scl' },
83             { label => 'BuchhändlerIn', value => 'oth' },
84             { label => 'BuchkünstlerIn', value => 'art' },
85             { label => 'BühnenbildnerIn', value => 'oth' },
86             { label => 'ChoreografIn', value => 'chr' },
87             { label => 'Corresponding author', value => 'oth' },
88             { label => 'DesignerIn', value => 'dsr' },
89             { label => 'DrehbuchautorIn', value => 'aus' },
90             { label => 'EmailmalerIn', value => 'oth' },
91             { label => 'EntwerferIn', value => 'oth' },
92             { label => 'ErfinderIn', value => 'inv' },
93             { label => 'FilmemacherIn', value => 'fmk' },
94             { label => 'FormschneiderIn', value => 'oth' },
95             { label => 'Fotoatelier', value => 'oth' },
96             { label => 'FotografIn', value => 'pht' },
97             { label => 'FotohändlerIn', value => 'oth' },
98             { label => 'GalanteriewarenherstellerIn', value => 'oth' },
99             { label => 'GartenarchitektIn', value => 'oth' },
100             { label => 'GeistigeR SchöpferIn', value => 'cre' },
101             { label => 'GemmenschneiderIn', value => 'oth' },
102             { label => 'GesprächsteilnehmerIn', value => 'oth' },
103             { label => 'GießerIn', value => 'oth' },
104             { label => 'GlasmalerIn', value => 'oth' },
105             { label => 'GoldschmiedIn', value => 'oth' },
106             { label => 'GrafikerIn', value => 'oth' },
107             { label => 'GraveurIn', value => 'oth' },
108             { label => 'HolzbildhauerIn', value => 'oth' },
109             { label => 'HolzschneiderIn', value => 'oth' },
110             { label => 'InterviewerIn', value => 'ivr' },
111             { label => 'InterviewteR', value => 'ive' },
112             { label => 'KalligrafIn', value => 'cll' },
113             { label => 'KarikaturistIn', value => 'oth' },
114             { label => 'KartografIn', value => 'ctg' },
115             { label => 'KeramikerIn', value => 'oth' },
116             { label => 'KomponistIn', value => 'cmp' },
117             { label => 'Klischeeanstalt', value => 'oth' },
118             { label => 'KorrespondenzpartnerIn', value => 'oth' },
119             { label => 'KunsthandwerkerIn', value => 'oth' },
120             { label => 'KunsthändlerIn', value => 'oth' },
121             { label => 'KupferstecherIn', value => 'oth' },
122             { label => 'KünstlerIn', value => 'art' },
123             { label => 'KünstlerischeR LeiterIn', value => 'oth' },
124             { label => 'LandschaftsarchitektIn', value => 'lsa' },
125             { label => 'LaudatorIn', value => 'oth' },
126             { label => 'LayouterIn', value => 'oth' },
127             { label => 'LibrettistIn', value => 'lbt' },
128             { label => 'LinolschneiderIn', value => 'oth' },
129             { label => 'Lithografische Anstalt', value => 'oth' },
130             { label => 'MalerIn', value => 'oth' },
131             { label => 'MedailleurIn', value => 'oth' },
132             { label => 'MiniaturmalerIn', value => 'oth' },
133             { label => 'Modeatelier', value => 'oth' },
134             { label => 'ModelleurIn', value => 'oth' },
135             { label => 'ModeschöpferIn', value => 'ctb' },
136             { label => 'Nachrichtenagentur', value => 'oth' },
137             { label => 'Normerlassende Gebietskörperschaft', value => 'enj' },
138             { label => 'ProgrammiererIn', value => 'prg' },
139             { label => 'Präses', value => 'pra' },
140             { label => 'PuppenkünstlerIn', value => 'oth' },
141             { label => 'Remix Artist', value => 'cre' },
142             { label => 'RespondentIn', value => 'rsp' },
143             { label => 'RezensentIn', value => 'oth' },
144             { label => 'SchabkünstlerIn', value => 'oth' },
145             { label => 'SchneiderIn', value => 'oth' },
146             { label => 'SchriftkünstlerIn', value => 'oth' },
147             { label => 'SchriftsetzerIn', value => 'oth' },
148             { label => 'SilhouettenkünstlerIn', value => 'oth' },
149             { label => 'StahlstecherIn', value => 'oth' },
150             { label => 'SteinmetzIn', value => 'oth' },
151             { label => 'StickerIn', value => 'oth' },
152             { label => 'TextdichterIn', value => 'lyr' },
153             { label => 'TextilkünstlerIn', value => 'oth' },
154             { label => 'TischlerIn', value => 'oth' },
155             { label => 'UhrmacherIn', value => 'oth' },
156             { label => 'UrheberIn', value => 'oth' },
157             { label => 'VerfasserIn', value => 'aut' },
158             { label => 'VortragendeR', value => 'oth' },
159             { label => 'WachsbossiererIn', value => 'oth' },
160             { label => 'Werbeagentur', value => 'oth' },
161             { label => 'Werkstatt', value => 'oth' },
162             { label => 'XylografIn', value => 'oth' },
163             { label => 'Xylografische Anstalt', value => 'oth' },
164             { label => 'ZeichnerIn', value => 'oth' },
165             { label => 'ZusammenstellendeR', value => 'com' },
166             ],
167             'other_agent'=> [
168             { label => 'Abgebildet', value => 'oth' },
169             { label => 'AbsenderIn', value => 'oth' },
170             { label => 'AdressatIn', value => 'rcp' },
171             { label => 'AkademischeR BetreuerIn', value => 'dgs' },
172             { label => 'AktenbildnerIn', value => 'oth' },
173             { label => 'AngeklagteR/Beklagte', value => 'dfd' },
174             { label => 'annotierende Person', value => 'ann' },
175             { label => 'ArrangeurIn', value => 'arr' },
176             { label => 'Art Director', value => 'adi' },
177             { label => 'AssistentIn', value => 'oth' },
178             { label => 'AuftraggeberIn', value => 'pat' },
179             { label => 'ausfertigende Institution', value => 'oth' },
180             { label => 'AusführendeR', value => 'prf' },
181             { label => 'BearbeiterIn', value => 'oth' },
182             { label => 'BegründerIn eines Werks', value => 'oth' },
183             { label => 'Behandelt', value => 'oth' },
184             { label => 'BeiträgerIn', value => 'oth' },
185             { label => 'BeraterIn', value => 'csl' },
186             { label => 'BerufungsbeklagteR/RevisionsbeklagteR', value => 'ape' },
187             { label => 'BerufungsklägerIn/RevisionsklägerIn', value => 'apl' },
188             { label => 'beschriftende Person', value => 'ins' },
189             { label => 'Beteiligt', value => 'oth' },
190             { label => 'BildregisseurIn', value => 'vdg' },
191             { label => 'BrailleschriftprägerIn', value => 'brl' },
192             { label => 'BuchbinderIn', value => 'bnd' },
193             { label => 'BuchgestalterIn', value => 'bkd' },
194             { label => 'BühnenregisseurIn', value => 'sgd' },
195             { label => 'Casting Director', value => 'oth' },
196             { label => 'ChefredakteurIn', value => 'pbd' },
197             { label => 'ChorleiterIn', value => 'cnd' },
198             { label => 'ColoristIn', value => 'clr' },
199             { label => 'CutterIn', value => 'edm' },
200             { label => 'DJ/DJane', value => 'ctb' },
201             { label => 'DirigentIn', value => 'cnd' },
202             { label => 'DiskussionsteilnehmerIn', value => 'pan' },
203             { label => 'Dokumentiert', value => 'oth' },
204             { label => 'DonatorIn', value => 'oth' },
205             { label => 'DramaturgIn', value => 'oth' },
206             { label => 'DruckerIn', value => 'prt' },
207             { label => 'DruckformherstellerIn', value => 'plt' },
208             { label => 'DruckgrafikerIn', value => 'prm' },
209             { label => 'Durch Verfahrensvorschriften geregeltes Gericht', value => 'cou' },
210             { label => '(gegenwärtigeR) EigentümerIn', value => 'own' },
211             { label => 'Erwähnt', value => 'oth' },
212             { label => 'ErzählerIn', value => 'nrt' },
213             { label => 'FernsehproduzentIn', value => 'tlp' },
214             { label => 'FernsehregisseurIn', value => 'tld' },
215             { label => 'FestrednerIn', value => 'oth' },
216             { label => 'FilmproduzentIn', value => 'fmp' },
217             { label => 'FilmregisseurIn', value => 'fmd' },
218             { label => 'Filmvertrieb', value => 'fds' },
219             { label => 'FormgießerIn', value => 'cas' },
220             { label => 'ForscherIn', value => 'res' },
221             { label => 'frühereR EigentümerIn', value => 'fmo' },
222             { label => 'Gastgebende Institution', value => 'his' },
223             { label => 'GastgeberIn', value => 'hst' },
224             { label => 'Geehrt', value => 'oth' },
225             { label => 'GefeierteR', value => 'hnr' },
226             { label => 'Geregelte Gebietskörperschaft', value => 'jug' },
227             { label => 'GerichtsstenografIn', value => 'crt' },
228             { label => 'Gesammelt', value => 'oth' },
229             { label => 'GeschichtenerzählerIn', value => 'stl' },
230             { label => 'Grad-verleihende Institution', value => 'dgg' },
231             { label => 'GraduierteR', value => 'oth' },
232             { label => 'Herausgebendes Organ', value => 'isb' },
233             { label => 'HerausgeberIn', value => 'edt' },
234             { label => 'HerstellerIn', value => 'mfr' },
235             { label => 'HörfunkproduzentIn', value => 'rpc' },
236             { label => 'HörfunkregisseurIn', value => 'rdd' },
237             { label => 'IlluminatorIn', value => 'ilu' },
238             { label => 'IllustratorIn', value => 'ill' },
239             { label => 'InhaberIn', value => 'oth' },
240             { label => 'InstrumentalmusikerIn', value => 'itr' },
241             { label => 'KalligrafIn', value => 'cll' },
242             { label => 'KommentarverfasserIn', value => 'wac' },
243             { label => 'KommentatorIn', value => 'cmm' },
244             { label => 'KorrektorIn', value => 'oth' },
245             { label => 'KostümbildnerIn', value => 'cst' },
246             { label => 'KuratorIn', value => 'cur' },
247             { label => 'KürzendeR', value => 'abr' },
248             { label => 'LandvermesserIn', value => 'srv' },
249             { label => 'LehrerIn', value => 'tch' },
250             { label => 'LeihgeberIn', value => 'dpt' },
251             { label => 'LeihnehmerIn', value => 'oth' },
252             { label => 'LektorIn', value => 'oth' },
253             { label => 'Letterer', value => 'ill' },
254             { label => 'LichtdruckerIn', value => 'clt' },
255             { label => 'LichtgestalterIn', value => 'lgd' },
256             { label => 'LithografIn', value => 'ltg' },
257             { label => 'MaskenbildnerIn', value => 'ctb' },
258             { label => 'Medium', value => 'med' },
259             { label => 'MischtontechnikerIn', value => 'ctb' },
260             { label => 'MitarbeiterIn', value => 'oth' },
261             { label => 'Mitglied eines Ausschusses, der akademische Grade vergibt', value => 'oth' },
262             { label => 'Mitglied eines Graduierungsausschusses', value => 'oth' },
263             { label => 'MitunterzeichnerIn', value => 'oth' },
264             { label => 'MitwirkendeR', value => 'ctb' },
265             { label => 'ModeratorIn', value => 'mod' },
266             { label => 'Musik-ProgrammiererIn', value => 'ctb' },
267             { label => 'MusikalischeR LeiterIn', value => 'msd' },
268             { label => 'On-Screen-TeilnehmerIn', value => 'ctb' },
269             { label => 'On-screen PräsentatorIn', value => 'osp' },
270             { label => 'OrchesterleiterIn', value => 'cnd' },
271             { label => 'OrganisatorIn', value => 'oth' },
272             { label => 'PapiermacherIn', value => 'ppm' },
273             { label => 'Produktionsfirma', value => 'prn' },
274             { label => 'ProduzentIn einer Tonaufnahme', value => 'pro' },
275             { label => 'ProduzentIn', value => 'pro' },
276             { label => 'ProgrammgestalterIn', value => 'oth' },
277             { label => 'ProtokollantIn', value => 'mtk' },
278             { label => 'PräsentatorIn', value => 'pre' },
279             { label => 'PuppenspielerIn', value => 'ppt' },
280             { label => 'RadiererIn', value => 'etr' },
281             { label => 'RechnungslegerIn', value => 'oth' },
282             { label => 'RedakteurIn', value => 'oth' },
283             { label => 'RednerIn', value => 'spk' },
284             { label => 'RegieassistentIn', value => 'oth' },
285             { label => 'RegisseurIn', value => 'drt' },
286             { label => 'RegistrarIn', value => 'cor' },
287             { label => 'RichterIn', value => 'jud' },
288             { label => 'SammlerIn', value => 'col' },
289             { label => 'SchauspielerIn', value => 'act' },
290             { label => 'SchreiberIn', value => 'oth' },
291             { label => 'Sender', value => 'brd' },
292             { label => 'SoftwareentwicklerIn', value => 'ctb' },
293             { label => 'Sonstige Person, Familie und Körperschaft', value => 'oth' },
294             { label => 'Special-effects-ProviderIn', value => 'ctb' },
295             { label => 'SponsorIn', value => 'spn' },
296             { label => 'SprecherIn', value => 'oth' },
297             { label => 'StecherIn', value => 'egr' },
298             { label => 'StifterIn', value => 'dnr' },
299             { label => 'SynchronregisseurIn', value => 'ctb' },
300             { label => 'SynchronsprecherIn', value => 'vac' },
301             { label => 'SzenenbildnerIn', value => 'prs' },
302             { label => 'SängerIn', value => 'sng' },
303             { label => 'TechnikerIn', value => 'oth' },
304             { label => 'TechnischeR ZeichnerIn', value => 'drn' },
305             { label => 'TongestalterIn', value => 'sds' },
306             { label => 'ToningenieurIn', value => 'rce' },
307             { label => 'TonmeisterIn', value => 'rcd' },
308             { label => 'TonregisseurIn', value => 'oth' },
309             { label => 'TontechnikerIn', value => 'ctb' },
310             { label => 'TranskribiererIn', value => 'trc' },
311             { label => 'TrickfilmzeichnerIn', value => 'anm' },
312             { label => 'TänzerIn', value => 'dnc' },
313             { label => 'ÜbersetzerIn', value => 'trl' },
314             { label => 'UnterzeichnerIn', value => 'ato' },
315             { label => 'VeranstalterIn', value => 'orm' },
316             { label => 'VerfasserIn einer Einleitung', value => 'win' },
317             { label => 'VerfasserIn eines Geleitwortes', value => 'aui' },
318             { label => 'VerfasserIn eines Nachworts', value => 'aft' },
319             { label => 'VerfasserIn eines Postscriptums', value => 'oth' },
320             { label => 'VerfasserIn eines Vorworts', value => 'wpr' },
321             { label => 'VerfasserIn von Zusatztexten', value => 'wat' },
322             { label => 'VerfasserIn von ergänzendem Text', value => 'est' },
323             { label => 'VerfasserIn von zusätzlichen Lyrics', value => 'wal' },
324             { label => 'VerkäuferIn', value => 'sll' },
325             { label => 'Verlag', value => 'pbl' },
326             { label => 'VerlegerIn', value => 'oth' },
327             { label => 'verleihende Institution', value => 'oth' },
328             { label => 'VertragspartnerIn', value => 'ctr' },
329             { label => 'Vertrieb', value => 'dst' },
330             { label => 'VerwahrerIn', value => 'oth' },
331             { label => 'Visual-effects-Provider', value => 'oth' },
332             { label => 'Visual-effects-ProviderIn', value => 'ctb' },
333             { label => 'VorbesitzerIn', value => 'oth' },
334             { label => 'WidmendeR', value => 'dto' },
335             { label => 'WidmungsempfängerIn', value => 'dte' },
336             { label => 'ZensorIn', value => 'cns' },
337             { label => 'Zitiert', value => 'oth' },
338             { label => 'ZivilklägerIn', value => 'ptf' },
339             ]
340             });
341             }
342              
343             q{ listening to: Fatima Spar & JOV: The Voice Within };
344              
345             __END__