-
Notifications
You must be signed in to change notification settings - Fork 0
/
work-anteckntovej.html
159 lines (134 loc) · 5.41 KB
/
work-anteckntovej.html
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
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
<!DOCTYPE html>
<title>Work 1 : LD Slides</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="ldslides.css" />
<script type="module">
import {Steps} from './ldslides.js'
const ref = id => ( { ['@id']: id } )
let steps = new Steps(window)
steps.load(`
<fxql7jqr38b1dkf#it> a :Print ;
:issuanceType :Monograph ;
:hasTitle [ a :Title ;
:mainTitle "Anteckningar från en ö" ] ;
:responsibilityStatement "Tove Jansson, Tuulikki Pietilä" ;
:identifiedBy [ a :ISBN ;
:acquisitionTerms "310:00" ;
:qualifier "INB." ;
:value "9100563226" ] ;
:instanceOf [ a :Text ;
:classification [ a :ClassificationDdc ;
:code "839.7374" ;
:edition "full" ;
:editionEnumeration "23/swe" ] ,
[ a :Classification ;
:code "Gcdz Jansson, Tove" ;
:inScheme [ a :ConceptScheme ;
:code "kssb" ;
:sameAs <https://id.kb.se/term/kssb%2F6/> ;
:version "6" ] ] ,
[ a :Classification ;
:code "Ibz Pietilä, Tuulikki" ;
:inScheme [ a :ConceptScheme ;
:code "kssb" ;
:sameAs <https://id.kb.se/term/kssb%2F6/> ;
:version "6" ] ] ,
[ a :Classification ;
:code "Lz" ] ;
:contribution [ a :PrimaryContribution ;
:agent <wt79bh6f2j46dtr#it> ] ,
[ a :Contribution ;
:agent [ a :Person ;
:familyName "Pietilä" ;
:givenName "Tuulikki" ;
:lifeSpan "1917-2009" ] ] ;
:genreForm <https://id.kb.se/marc/NotFictionNotFurtherSpecified> ,
<https://id.kb.se/marc/Autobiography> ;
:language <https://id.kb.se/language/swe> ;
:subject <wt79bh6f2j46dtr#it> ,
[ a :Person ;
:familyName "Pietilä" ;
:givenName "Tuulikki" ;
:lifeSpan "1917-2009" ] ] ;
:manufacture [ a :Manufacture ;
:place [ a :Place ;
:label "Finland" ] ] ;
:publication [ a :PrimaryPublication ;
:agent [ a :Agent ;
:label "Bonnier" ] ;
:country <https://id.kb.se/country/sw> ;
:place [ a :Place ;
:label "Stockholm" ] ;
:year "1996" ] ;
:physicalDetailsNote "ill." ;
:extent [ a :Extent ;
:label "102, [1] s." ] ;
:hasDimensions [ a :Dimensions ;
:label "25 cm" ] ;
:hasNote [ a :Note ;
:label "Även tillg. med tryckår: 2. uppl., 1996" ] ;
:sameAs <http://libris.kb.se/resource/bib/7149593> .
`)
const work = 'work1#it'
const inst = 'fxql7jqr38b1dkf#it'
steps.display('Extrahera verket till ny post')
steps.extractAsLink(inst, 'instanceOf', work)
steps.display('Visa Tove Jansson (referens)')
steps.create(`
<wt79bh6f2j46dtr#it> a :Person ;
:familyName "Jansson" ;
:givenName "Tove" ;
:identifiedBy [ a :ISNI ;
:value "0000000121478925" ] ;
:closeMatch [ a :ClassificationDdc ;
:code "839.7374" ;
:edition "23/swe" ] ;
:exactMatch <http://www.wikidata.org/entity/Q102071> ;
:lifeSpan "1914-2001" .
`)
steps.display('Extrahera andra bidragande aktör')
steps.extractAsLink(work, ['contribution', 1, 'agent'], 'agent-2')
steps.display('Länka aktör som ämne')
steps.replace(work, ['subject', 1], ref('agent-2'))
steps.display('Lägg till roller', {incomplete: true})
steps.add(work, ['contribution', 0, 'role'], ref('aut'))
steps.complete().add(work, ['contribution', 1, 'role'], ref('ill'))
steps.display('Ta bort illustrationsdetalj')
steps.drop(inst, 'physicalDetailsNote')
steps.display('Kopiera titeln till verket') // ...
steps.copy(inst, 'hasTitle', work)
steps.display('Visa SAB (för referens)')
steps.create(`
<SAB> {
<https://id.kb.se/term/kssb/6> a :ConceptScheme; :code "kssb"; :version "6" .
<https://id.kb.se/term/kssb/6/Gcd> a :Classification ;
:code "Gcd" ;
:prefLabel "Finlandssvensk litteraturhistoria" ;
:inCollection <https://id.kb.se/term/kssb/6/Gbn--Gd> .
<https://id.kb.se/term/kssb/6/Gz> a :Classification ;
:code "Gz" ;
:prefLabel "Särskilda utländska författare" .
<https://id.kb.se/term/kssb/6/Ibz> a :Classification ;
:code "Ibz" ;
:prefLabel "Särskilda konstnärer" .
<https://id.kb.se/term/kssb/6/Lz> a :Classification ;
:code "Lz" ;
:prefLabel "Särskilda personer" .
} `)
const tovej = 'wt79bh6f2j46dtr#it'
const tovejddc = '839.7374'
const sab = 'https://id.kb.se/term/kssb/6'
steps.display('Länka klassifikationsschema', {incomplete: true})
steps.replace(work, ['classification', 1, 'inScheme'], ref(sab))
steps.replace(work, ['classification', 2, 'inScheme'], ref(sab))
steps.complete().add(work, ['classification', 3, 'inScheme'], ref(sab))
steps.display('Länka klassifikation')
steps.replace(work, ['classification', 3], ref(`${sab}/Lz`))
steps.display('Komplettera koder med länkar i 2 klassifikationer', {incomplete: true})
steps.add(work, ['classification', 1, 'termComponentList'], [ref(`${sab}/Gcd`), ref(`${sab}/Gz`), ref(tovej)])
steps.complete().add(work, ['classification', 2, 'termComponentList'], [ref(`${sab}/Ibz`), ref('agent-2')])
steps.display('Extrahera DDC', {note: 'Här vore det lämpligt att länka till dewey.info...'})
steps.extractAsLink(work, ['classification', 0], tovejddc)
steps.display('Notera matchingen för Tove Jansson och länka den')
steps.replace(tovej, 'closeMatch', ref(tovejddc))
</script>