Class: IIIFManifest::V3::ManifestBuilder::IIIFManifest
- Inherits:
-
IIIFService
show all
- Defined in:
- lib/iiif_manifest/v3/manifest_builder/iiif_service.rb
Defined Under Namespace
Classes: Annotation, AnnotationPage, AutocompleteService, Body, Canvas, Choice, Collection, Range, SearchService, Thumbnail
Instance Attribute Summary
#inner_hash
Instance Method Summary
collapse
#initialize
Instance Method Details
#behavior=(behavior) ⇒ Object
25
26
27
28
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 25
def behavior=(behavior)
return unless behavior.present?
inner_hash['behavior'] = behavior
end
|
#homepage=(homepage) ⇒ Object
71
72
73
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 71
def homepage=(homepage)
inner_hash['homepage'] = homepage
end
|
#initial_attributes ⇒ Object
79
80
81
82
83
84
85
86
87
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 79
def initial_attributes
{
'@context' => [
'http://www.w3.org/ns/anno.jsonld',
'http://iiif.io/api/presentation/3/context.json'
],
'type' => 'Manifest'
}
end
|
#items ⇒ Object
39
40
41
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 39
def items
inner_hash['items'] ||= []
end
|
#items=(items) ⇒ Object
43
44
45
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 43
def items=(items)
inner_hash['items'] = items
end
|
#label ⇒ Object
8
9
10
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 8
def label
inner_hash['label']
end
|
#label=(label) ⇒ Object
12
13
14
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 12
def label=(label)
inner_hash['label'] = label
end
|
47
48
49
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 47
def metadata=(metadata)
inner_hash['metadata'] = metadata
end
|
#rendering=(rendering) ⇒ Object
63
64
65
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 63
def rendering=(rendering)
inner_hash['rendering'] = rendering
end
|
#rights=(rights) ⇒ Object
67
68
69
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 67
def rights=(rights)
inner_hash['rights'] = Array(rights).first
end
|
#see_also=(see_also) ⇒ Object
59
60
61
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 59
def see_also=(see_also)
inner_hash['seeAlso'] = see_also
end
|
#service ⇒ Object
51
52
53
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 51
def service
inner_hash['service'] || []
end
|
#service=(service) ⇒ Object
55
56
57
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 55
def service=(service)
inner_hash['service'] = service
end
|
#summary ⇒ Object
16
17
18
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 16
def summary
inner_hash['summary']
end
|
#summary=(summary) ⇒ Object
20
21
22
23
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 20
def summary=(summary)
return unless summary.present?
inner_hash['summary'] = summary
end
|
#thumbnail=(thumbnail) ⇒ Object
75
76
77
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 75
def thumbnail=(thumbnail)
inner_hash['thumbnail'] = thumbnail
end
|
#viewing_direction=(viewing_direction) ⇒ Object
30
31
32
33
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 30
def viewing_direction=(viewing_direction)
return unless viewing_direction.present?
inner_hash['viewingDirection'] = viewing_direction
end
|
#viewingDirection ⇒ Object
35
36
37
|
# File 'lib/iiif_manifest/v3/manifest_builder/iiif_service.rb', line 35
def viewingDirection
inner_hash['viewingDirection']
end
|