skos2html 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/skos2html.rb +305 -285
  2. metadata +1 -1
data/lib/skos2html.rb CHANGED
@@ -1,93 +1,94 @@
1
1
  # encoding: UTF-8
2
- require 'linkeddata'
3
- require 'logger'
4
- require 'builder'
2
+ #
3
+ module Skos2Html
4
+ require 'linkeddata'
5
+ require 'logger'
6
+ require 'builder'
7
+
8
+ # Converts a SKOS RDF file to a bare-bones HTML file
9
+ # readabale for humans. Rendering a HTML file consists of
10
+ # three basic steps:
11
+ # 1. Create a new instance of this class and specify input and output file.
12
+ # 2. Call load_and_parse.
13
+ # 3. Call generate_html_document.
14
+ # 4. Call the write method.
15
+ class Converter
16
+
17
+ # The output buffer to which we write all HTML.
18
+ attr_accessor :buffer
19
+
20
+ # Initialize the class.
21
+ #
22
+ # @param infile [String], a filepath to a SKOS RDF/XML file
23
+ # @param outfile [String], a filepath where the resulting file will be written (overwriting existing files)
24
+ def initialize(infile=nil, outfile="vocab.html")
25
+ @log = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
26
+ @log.info("init")
27
+
28
+ @infile = infile
29
+ @outfile = outfile
30
+
31
+ @default_lang = :en
32
+
33
+ @graph = nil
34
+ @vocabs = nil
35
+ set_up_vocabs
36
+
37
+ @buffer = ""
38
+ @builder = Builder::XmlMarkup.new(:target=>@buffer, :indent=>2)
39
+
40
+ @title = ""
5
41
 
42
+ end
6
43
 
7
- # Converts a SKOS RDF file to a bare-bones HTML file
8
- # readabale for humans. Rendering a HTML file consists of
9
- # three basic steps:
10
- # 1. Create a new instance of this class and specify input and output file.
11
- # 2. Call load_and_parse.
12
- # 3. Call generate_html_document.
13
- # 4. Call the write method.
14
- class Skos2Html
15
-
16
- # The output buffer to which we write all HTML.
17
- attr_accessor :buffer
18
-
19
- # Initialize the class.
20
- #
21
- # @param infile [String], a filepath to a SKOS RDF/XML file
22
- # @param outfile [String], a filepath where the resulting file will be written (overwriting existing files)
23
- def initialize(infile=nil, outfile="vocab.html")
24
- @log = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
25
- @log.info("init")
26
-
27
- @infile = infile
28
- @outfile = outfile
29
-
30
- @default_lang = :en
31
-
32
- @graph = nil
33
- @vocabs = nil
34
- set_up_vocabs
35
-
36
- @buffer = ""
37
- @builder = Builder::XmlMarkup.new(:target=>@buffer, :indent=>2)
38
-
39
- @title = ""
40
44
 
41
- end
45
+ # Load some basic vocabularies in order to retrieve labels
46
+ # etc.
47
+ def set_up_vocabs
48
+ @vocabs = RDF::Graph.load(File.expand_path("skos.rdf", File.dirname(__FILE__)))
49
+ @vocabs << RDF::Graph.load(File.expand_path("dcterms.rdf", File.dirname(__FILE__)))
50
+ @vocabs << RDF::Graph.load(File.expand_path("rdf-schema.rdf", File.dirname(__FILE__)))
51
+ end
42
52
 
43
53
 
44
- # Load some basic vocabularies in order to retrieve labels
45
- # etc.
46
- def set_up_vocabs
47
- @vocabs = RDF::Graph.load(File.expand_path("skos.rdf", File.dirname(__FILE__)))
48
- @vocabs << RDF::Graph.load(File.expand_path("dcterms.rdf", File.dirname(__FILE__)))
49
- @vocabs << RDF::Graph.load(File.expand_path("rdf-schema.rdf", File.dirname(__FILE__)))
50
- end
54
+ # Load the SKOS RDF file into a graph object.
55
+ def load_and_parse
51
56
 
57
+ if @infile
58
+ @graph = RDF::Graph.load(@infile)
59
+ end
52
60
 
53
- # Load the SKOS RDF file into a graph object.
54
- def load_and_parse
55
-
56
- if @infile
57
- @graph = RDF::Graph.load(@infile)
58
61
  end
59
62
 
60
- end
61
-
62
63
 
63
- def generate_html_document
64
- @builder.declare! :DOCTYPE, :html
64
+ def generate_html_document
65
+ @builder.declare! :DOCTYPE, :html
65
66
 
66
- @builder.html(:lang => @default_lang) { |html|
67
- generate_html_head
68
- generate_html_body
69
- }
70
- end
67
+ @builder.html(:lang => @default_lang) { |html|
68
+ generate_html_head
69
+ generate_html_body
70
+ }
71
+ end
71
72
 
72
73
 
73
- def generate_html_body
74
- @builder.body { |body|
75
- generate_conceptscheme_info
76
- generate_concepts
77
- }
78
- end
74
+ def generate_html_body
75
+ @builder.body { |body|
76
+ generate_conceptscheme_info
77
+ generate_concepts
78
+ }
79
+ end
79
80
 
80
81
 
81
- def generate_html_head
82
+ def generate_html_head
82
83
 
83
- title = concept_scheme_title
84
+ title = concept_scheme_title
84
85
 
85
- @builder.head { |head|
86
- head.meta(:charset => "UTF-8")
87
- head.title(title)
88
- head.meta(:name => "generator", :content => "skos2html")
89
- head.comment! "Edit styles and other html in this file as you like but do not change text or id-attributes."
90
- head.style("""
86
+ @builder.head { |head|
87
+ head.meta(:charset => "UTF-8")
88
+ head.title(title)
89
+ head.meta(:name => "generator", :content => "skos2html")
90
+ head.comment! "Edit styles and other html in this file as you like but do not change text or id-attributes."
91
+ head.style("""
91
92
  html {
92
93
  margin: auto;
93
94
  max-width: 800px;
@@ -122,343 +123,362 @@ div.conceptscheme {
122
123
  div.concept {
123
124
  margin: 0 0 2.5em 0;
124
125
  }
125
- """)
126
- }
126
+ """)
127
+ }
127
128
 
128
- end
129
+ end
129
130
 
130
131
 
131
132
 
132
- def labels_for(uri)
133
+ def labels_for(uri)
133
134
 
134
- solutions = RDF::Query.execute(@vocabs) do
135
- pattern [RDF::URI.new(uri), RDF::RDFS.label, :label]
136
- end
135
+ solutions = RDF::Query.execute(@vocabs) do
136
+ pattern [RDF::URI.new(uri), RDF::RDFS.label, :label]
137
+ end
137
138
 
138
- result = []
139
+ result = []
139
140
 
140
- if solutions
141
- solutions.each do |solution|
142
- # adding RDF literals
143
- result << solution.label
141
+ if solutions
142
+ solutions.each do |solution|
143
+ # adding RDF literals
144
+ result << solution.label
145
+ end
144
146
  end
145
- end
146
147
 
147
- return result
148
- end
148
+ return result
149
+ end
149
150
 
150
151
 
151
152
 
152
- def string_for(obj, lang)
153
- # return a human readable representation of obj - for literals the literal
154
- # value in lang. For URI:s lookup something.
153
+ def string_for(obj, lang)
154
+ # return a human readable representation of obj - for literals the literal
155
+ # value in lang. For URI:s lookup something.
155
156
 
156
- case obj
157
- when String
158
- return obj
159
- when RDF::Literal
160
- if lang
161
- if obj.language == lang
162
- return obj.to_s
157
+ case obj
158
+ when String
159
+ return obj
160
+ when RDF::Literal
161
+ if lang
162
+ if obj.language == lang
163
+ return obj.to_s
164
+ else
165
+ return "[Not available in #{lang}]"
166
+ end
163
167
  else
164
- return "[Not available in #{lang}]"
168
+ return obj.to_s
165
169
  end
170
+ when RDF::URI
171
+ # TODO: fetch it...
172
+ return "[fetched label for #{obj.to_s}]"
166
173
  else
167
- return obj.to_s
174
+ @log.info("unknown class")
168
175
  end
169
- when RDF::URI
170
- # TODO: fetch it...
171
- return "[fetched label for #{obj.to_s}]"
172
- else
173
- @log.info("unknown class")
174
176
  end
175
- end
176
177
 
177
178
 
178
179
 
179
- def label_for(uri, lang)
180
+ def label_for(uri, lang)
180
181
 
181
- @log.info("label_for #{uri} #{lang}")
182
+ @log.info("label_for #{uri} #{lang}")
182
183
 
183
- labels = labels_for(uri)
184
+ labels = labels_for(uri)
184
185
 
185
- @log.info("labels: #{labels.inspect}")
186
+ @log.info("labels: #{labels.inspect}")
186
187
 
187
- if labels
188
- labels.each do |label|
188
+ if labels
189
+ labels.each do |label|
189
190
 
190
- @log.info("label: #{label}")
191
+ @log.info("label: #{label}")
191
192
 
192
- if label.language == lang
193
- return label.value
193
+ if label.language == lang
194
+ return label.value
195
+ end
194
196
  end
195
197
  end
196
198
  end
197
- end
198
199
 
199
200
 
200
- def generate_conceptscheme_info
201
+ def generate_conceptscheme_info
201
202
 
202
- conceptschemes = RDF::Query.execute(@graph) do
203
- pattern [:scheme, RDF.type, RDF::SKOS.ConceptScheme]
204
- end
203
+ conceptschemes = RDF::Query.execute(@graph) do
204
+ pattern [:scheme, RDF.type, RDF::SKOS.ConceptScheme]
205
+ end
205
206
 
206
207
 
207
- @log.info("Concept scheme count #{conceptschemes.size}")
208
+ @log.info("Concept scheme count #{conceptschemes.size}")
208
209
 
209
210
 
210
- if conceptschemes.size == 1
211
+ if conceptschemes.size == 1
211
212
 
212
- scheme = conceptschemes[0]
213
- @log.info("Concept scheme " + scheme.scheme)
213
+ scheme = conceptschemes[0]
214
+ @log.info("Concept scheme " + scheme.scheme)
214
215
 
215
- scheme_info = RDF::Query.execute(@graph) do
216
- pattern [scheme.scheme, :predicate, :object]
217
- end
218
-
219
- title = ""
220
- description = ""
221
- creators = []
222
- contributors = []
216
+ scheme_info = RDF::Query.execute(@graph) do
217
+ pattern [scheme.scheme, :predicate, :object]
218
+ end
223
219
 
224
- # get values
225
- scheme_info.each do |solution|
220
+ title = ""
221
+ description = ""
222
+ creators = []
223
+ contributors = []
224
+ version = nil
225
+
226
+ # get values
227
+ scheme_info.each do |solution|
228
+
229
+ case solution.predicate
230
+ when "http://purl.org/dc/terms/title", "http://www.w3.org/2000/01/rdf-schema#label"
231
+ title = string_for(solution.object, @default_lang)
232
+ when "http://purl.org/dc/terms/description"
233
+ description = string_for(solution.object, @default_lang)
234
+ when "http://purl.org/dc/terms/contributor"
235
+ contributors << string_for(solution.object, nil)
236
+ when "http://purl.org/dc/terms/creator"
237
+ creators << string_for(solution.object, nil)
238
+ end
226
239
 
227
- case solution.predicate
228
- when "http://purl.org/dc/terms/title", "http://www.w3.org/2000/01/rdf-schema#label"
229
- title = string_for(solution.object, @default_lang)
230
- when "http://purl.org/dc/terms/description"
231
- description = string_for(solution.object, @default_lang)
232
- when "http://purl.org/dc/terms/contributor"
233
- contributors << string_for(solution.object, nil)
234
- when "http://purl.org/dc/terms/creator"
235
- creators << string_for(solution.object, nil)
236
240
  end
237
241
 
238
- end
239
-
240
- @builder.div(:class => "conceptscheme") { |html|
242
+ @builder.div(:class => "conceptscheme") { |html|
241
243
 
242
- html.h1(title)
244
+ html.h1(title)
243
245
 
244
- html.dl { |html|
246
+ html.dl { |html|
245
247
 
246
- html.dt("Description")
247
- html.dd(description, "class" => "description")
248
+ html.dt("Description")
249
+ html.dd(description, "class" => "description")
248
250
 
249
- if contributors.size > 0
250
- html.dt("Contributors")
251
+ if contributors.size > 0
252
+ html.dt("Contributors")
251
253
 
252
- contributors.each do |item|
253
- html.dd(item, "class" => "contributor")
254
+ contributors.each do |item|
255
+ html.dd(item, "class" => "contributor")
256
+ end
254
257
  end
255
- end
256
258
 
257
- if creators.size > 0
258
- html.dt("Creators")
259
+ if creators.size > 0
260
+ html.dt("Creators")
259
261
 
260
- creators.each do |item|
261
- html.dd(item, "class" => "creator")
262
+ creators.each do |item|
263
+ html.dd(item, "class" => "creator")
264
+ end
262
265
  end
263
- end
264
266
 
267
+ html.dt("Identifier")
268
+ html.dd(scheme.scheme, :class => "identifier")
269
+
270
+ }
265
271
  }
266
- }
267
272
 
268
- else
269
- @log.info("Concept scheme count wrong. Expected 1 was " + conceptschemes.size)
273
+ else
274
+ @log.info("Concept scheme count wrong. Expected 1 was " + conceptschemes.size)
275
+ end
276
+
270
277
  end
271
278
 
272
- end
273
279
 
274
280
 
281
+ def generate_concepts
282
+ concepts = RDF::Query.execute(@graph) do
283
+ pattern [:concept_uri, RDF.type, RDF::SKOS.Concept]
284
+ end
275
285
 
276
- def generate_concepts
277
- concepts = RDF::Query.execute(@graph) do
278
- pattern [:concept_uri, RDF.type, RDF::SKOS.Concept]
279
- end
286
+ @log.info("Concept count: #{concepts.size}")
280
287
 
281
- @log.info("Concept count: #{concepts.size}")
288
+ concepts.each do |concept|
289
+ generate_concept(concept.concept_uri)
290
+ end
282
291
 
283
- concepts.each do |concept|
284
- generate_concept(concept.concept_uri)
285
292
  end
286
293
 
287
- end
288
-
289
294
 
290
295
 
291
296
 
292
- # Get the title of this vocabulary for use in the HTML
293
- # title element
294
- def concept_scheme_title
297
+ # Get the title of this vocabulary for use in the HTML
298
+ # title element
299
+ def concept_scheme_title
295
300
 
296
- # Possible properties
297
- title_properties = ["http://purl.org/dc/terms/title",
298
- "http://www.w3.org/2000/01/rdf-schema#label",
299
- "http://www.w3.org/2004/02/skos/core#prefLabel"]
301
+ # Possible properties
302
+ title_properties = ["http://purl.org/dc/terms/title",
303
+ "http://www.w3.org/2000/01/rdf-schema#label",
304
+ "http://www.w3.org/2004/02/skos/core#prefLabel"]
300
305
 
301
- title = ""
306
+ title = ""
302
307
 
303
- conceptschemes = RDF::Query.execute(@graph) do
304
- pattern [:scheme, RDF.type, RDF::SKOS.ConceptScheme]
305
- end
308
+ conceptschemes = RDF::Query.execute(@graph) do
309
+ pattern [:scheme, RDF.type, RDF::SKOS.ConceptScheme]
310
+ end
306
311
 
307
- if conceptschemes.size == 1
312
+ if conceptschemes.size == 1
308
313
 
309
- scheme = conceptschemes[0]
310
- @log.info("Looking for title for " + scheme.scheme)
314
+ scheme = conceptschemes[0]
315
+ @log.info("Looking for title for " + scheme.scheme)
311
316
 
312
- scheme_info = RDF::Query.execute(@graph) do
313
- pattern [scheme.scheme, :predicate, :object]
314
- end
317
+ scheme_info = RDF::Query.execute(@graph) do
318
+ pattern [scheme.scheme, :predicate, :object]
319
+ end
315
320
 
316
- scheme_info.each do |solution|
321
+ scheme_info.each do |solution|
317
322
 
318
- case solution.predicate.to_s
319
- when *title_properties
320
- title = solution.object.value
323
+ case solution.predicate.to_s
324
+ when *title_properties
325
+ title = solution.object.value
326
+ end
321
327
  end
322
- end
323
328
 
324
- return title
329
+ return title
325
330
 
326
- end
331
+ end
327
332
 
328
- end
333
+ end
329
334
 
330
335
 
331
336
 
332
- def concept_preflabel(concept_uri)
337
+ def concept_preflabel(concept_uri)
333
338
 
334
- uri = RDF::URI.new(concept_uri)
339
+ uri = RDF::URI.new(concept_uri)
335
340
 
336
- labels = RDF::Query.execute(@graph) do
337
- pattern [uri, RDF::SKOS.prefLabel, :object]
338
- end
341
+ labels = RDF::Query.execute(@graph) do
342
+ pattern [uri, RDF::SKOS.prefLabel, :object]
343
+ end
339
344
 
340
- labels.filter { |label| label.object.language == @default_lang }
345
+ labels.filter { |label| label.object.language == @default_lang }
341
346
 
342
- if labels.size > 0
343
- return labels[0].object.value
344
- else
345
- @log.error("Preflabel missing for #{concept_uri}")
346
- return ""
347
+ if labels.size > 0
348
+ return labels[0].object.value
349
+ else
350
+ @log.error("Preflabel missing for #{concept_uri}")
351
+ return ""
352
+ end
347
353
  end
348
- end
349
354
 
350
355
 
351
356
 
352
- # Generate the HTML for an individual concept.
353
- def generate_concept(concept_uri)
357
+ # Generate the HTML for an individual concept.
358
+ def generate_concept(concept_uri)
354
359
 
355
- @log.info("Generate concept #{concept_uri}")
360
+ @log.info("Generate concept #{concept_uri}")
356
361
 
357
- concept_info = RDF::Query.execute(@graph) do
358
- pattern [concept_uri, :predicate, :object]
359
- end
362
+ concept_info = RDF::Query.execute(@graph) do
363
+ pattern [concept_uri, :predicate, :object]
364
+ end
360
365
 
361
- preflabels = []
362
- altlabels = []
363
- definition = ""
364
- has_broader = nil
365
- has_narrower = nil
366
+ preflabels = []
367
+ altlabels = []
368
+ definition = ""
369
+ has_broader = nil
370
+ has_narrower = nil
371
+ editorialNote = nil
366
372
 
367
- concept_info.each do |solution|
373
+ concept_info.each do |solution|
368
374
 
369
- case solution.predicate
370
- when "http://www.w3.org/2004/02/skos/core#prefLabel"
371
- if solution.object.language?
372
- preflabels << {"lang" => solution.object.language.to_sym, "val" => solution.object.to_s}
373
- else
374
- preflabels << {"lang" => nil, "val" => solution.object.to_s}
375
- end
376
- when "http://www.w3.org/2004/02/skos/core#altLabel"
377
- if solution.object.language?
378
- altlabels << {"lang" => solution.object.language.to_sym, "val" => solution.object.to_s}
379
- else
380
- altlabels << {"lang" => nil, "val" => solution.object.to_s}
375
+ case solution.predicate
376
+ when "http://www.w3.org/2004/02/skos/core#prefLabel"
377
+ if solution.object.language?
378
+ preflabels << {"lang" => solution.object.language.to_sym, "val" => solution.object.to_s}
379
+ else
380
+ preflabels << {"lang" => nil, "val" => solution.object.to_s}
381
+ end
382
+ when "http://www.w3.org/2004/02/skos/core#altLabel"
383
+ if solution.object.language?
384
+ altlabels << {"lang" => solution.object.language.to_sym, "val" => solution.object.to_s}
385
+ else
386
+ altlabels << {"lang" => nil, "val" => solution.object.to_s}
387
+ end
388
+ when "http://www.w3.org/2004/02/skos/core#definition"
389
+ definition = string_for(solution.object, @default_lang)
390
+ when "http://www.w3.org/2004/02/skos/core#editorialNote"
391
+ editorialNote = string_for(solution.object, @default_lang)
392
+ when "http://www.w3.org/2004/02/skos/core#broader"
393
+ has_broader = solution.object.value
394
+ when "http://www.w3.org/2004/02/skos/core#narrower"
395
+ has_narrower = solution.object.value
381
396
  end
382
- when "http://www.w3.org/2004/02/skos/core#definition"
383
- definition = string_for(solution.object, @default_lang)
384
- when "http://www.w3.org/2004/02/skos/core#broader"
385
- has_broader = solution.object.value
386
- when "http://www.w3.org/2004/02/skos/core#narrower"
387
- has_narrower = solution.object.value
397
+
388
398
  end
389
399
 
390
- end
391
400
 
401
+ @builder.div(:id => concept_uri.fragment, :class => "concept") { |html|
402
+ # preflabel in defaultlang
403
+ html.h2(preflabels.detect {|label| label["lang"] == @default_lang}["val"])
404
+ html.dl {
405
+ html.dt("Definition", :class => "definition")
406
+ html.dd(definition, :class => "definition")
392
407
 
393
- @builder.div(:id => concept_uri.fragment, :class => "concept") { |html|
394
- # preflabel in defaultlang
395
- html.h2(preflabels.detect {|label| label["lang"] == @default_lang}["val"])
396
- html.dl {
397
- html.dt("Definition", :class => "definition")
398
- html.dd(definition, :class => "definition")
408
+ if altlabels.size > 0
409
+ html.dt("Alternative labels", {:class => "altlabels"})
399
410
 
400
- if altlabels.size > 0
401
- html.dt("Alternative labels", {:class => "altlabels"})
411
+ altlabels.each do |label|
402
412
 
403
- altlabels.each do |label|
413
+ if label["lang"]
404
414
 
405
- if label["lang"]
415
+ if label["lang"] != @default_lang
416
+ html.dd(label["val"] + "(#{label['lang']})", :lang => label["lang"], :class => "altlabel")
417
+ else
418
+ html.dd(label["val"], :class => "altlabel")
419
+ end
406
420
 
407
- if label["lang"] != @default_lang
408
- html.dd(label["val"] + "(#{label['lang']})", :lang => label["lang"], :class => "altlabel")
409
421
  else
410
422
  html.dd(label["val"], :class => "altlabel")
411
423
  end
412
-
413
- else
414
- html.dd(label["val"], :class => "altlabel")
415
424
  end
416
425
  end
417
- end
418
426
 
419
427
 
420
- if has_broader
428
+ if has_broader
421
429
 
422
- has_broader_uri = has_broader
430
+ has_broader_uri = has_broader
431
+
432
+ unless has_broader.start_with?("http://")
433
+ r = RDF::URI.new(concept_uri)
434
+ r.fragment = has_broader[1..-1]
435
+ has_broader_uri = r.to_s
436
+ end
423
437
 
424
- unless has_broader.start_with?("http://")
425
- r = RDF::URI.new(concept_uri)
426
- r.fragment = has_broader[1..-1]
427
- has_broader_uri = r.to_s
438
+ html.dt("Has broader", :class => "broader")
439
+ html.dd(:class => "broader") {
440
+ html.a(concept_preflabel(has_broader_uri), :href => has_broader)
441
+ }
428
442
  end
429
443
 
430
- html.dt("Has broader", :class => "broader")
431
- html.dd(:class => "broader") {
432
- html.a(concept_preflabel(has_broader_uri), :href => has_broader)
433
- }
434
- end
435
444
 
445
+ if has_narrower
436
446
 
437
- if has_narrower
438
- html.dt("Has narrower", :class => "narrower")
439
- html.dd(:class => "narrower") {
440
- html.a(has_narrower, :href => has_narrower)
441
- }
442
- end
447
+ has_narrower_uri = has_narrower
443
448
 
449
+ unless has_narrower.start_with?("http://")
450
+ r = RDF::URI.new(concept_uri)
451
+ r.fragment = has_narrower[1..-1]
452
+ has_narrower_uri = r.to_s
453
+ end
454
+ html.dt("Has narrower", :class => "narrower")
455
+ html.dd(:class => "narrower") {
456
+ html.a(concept_preflabel(has_narrower_uri), :href => has_narrower)
457
+ }
458
+ end
444
459
 
445
- html.dt("Identifier", :class => "identifier")
446
- html.dd(concept_uri, :class => "identifier")
460
+ if editorialNote
461
+ html.dt(label_for(RDF::SKOS.editorialNote, @default_lang))
462
+ html.dd(editorialNote, :class => "editorial_note")
463
+ end
464
+
465
+ html.dt("Identifier", :class => "identifier")
466
+ html.dd(concept_uri, :class => "identifier")
467
+ }
447
468
  }
448
- }
449
469
 
450
- end
470
+ end
451
471
 
452
472
 
453
473
 
454
- # Write the output to disk as an UTF-8 encoded file.
455
- def write
474
+ # Write the output to disk as an UTF-8 encoded file.
475
+ def write
456
476
 
457
- # output to disk
458
- File.open(@outfile, 'w:UTF-8') { |file|
459
- file.write(@buffer)
460
- }
461
- end
477
+ # output to disk
478
+ File.open(@outfile, 'w:UTF-8') { |file|
479
+ file.write(@buffer)
480
+ }
481
+ end
462
482
 
483
+ end
463
484
  end
464
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skos2html
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: