Class: IIIFManifest::V3::AnnotationContent
- Inherits:
-
Object
- Object
- IIIFManifest::V3::AnnotationContent
- Defined in:
- lib/iiif_manifest/v3/annotation_content.rb
Instance Attribute Summary collapse
-
#annotation_id ⇒ Object
readonly
Returns the value of attribute annotation_id.
-
#body_id ⇒ Object
readonly
Returns the value of attribute body_id.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#media_fragment ⇒ Object
readonly
Returns the value of attribute media_fragment.
-
#motivation ⇒ Object
readonly
Returns the value of attribute motivation.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(type:, motivation:, **kwargs) ⇒ AnnotationContent
constructor
A new instance of AnnotationContent.
Constructor Details
#initialize(type:, motivation:, **kwargs) ⇒ AnnotationContent
Returns a new instance of AnnotationContent.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/iiif_manifest/v3/annotation_content.rb', line 6 def initialize(type:, motivation:, **kwargs) # If a user requires a specific ID at the annotation level, this attr overrides # the automatic ID creation. @annotation_id = kwargs[:annotation_id] # Body level ids are only required for annotations delivering content, # such as a transcript/caption file or an annotation containing an image. @body_id = kwargs[:body_id] @type = type @motivation = motivation @format = kwargs[:format] @language = kwargs[:language] @label = kwargs[:label] @value = kwargs[:value] @media_fragment = kwargs[:media_fragment] end |
Instance Attribute Details
#annotation_id ⇒ Object (readonly)
Returns the value of attribute annotation_id.
4 5 6 |
# File 'lib/iiif_manifest/v3/annotation_content.rb', line 4 def annotation_id @annotation_id end |
#body_id ⇒ Object (readonly)
Returns the value of attribute body_id.
4 5 6 |
# File 'lib/iiif_manifest/v3/annotation_content.rb', line 4 def body_id @body_id end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
4 5 6 |
# File 'lib/iiif_manifest/v3/annotation_content.rb', line 4 def format @format end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
4 5 6 |
# File 'lib/iiif_manifest/v3/annotation_content.rb', line 4 def label @label end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
4 5 6 |
# File 'lib/iiif_manifest/v3/annotation_content.rb', line 4 def language @language end |
#media_fragment ⇒ Object (readonly)
Returns the value of attribute media_fragment.
4 5 6 |
# File 'lib/iiif_manifest/v3/annotation_content.rb', line 4 def media_fragment @media_fragment end |
#motivation ⇒ Object (readonly)
Returns the value of attribute motivation.
4 5 6 |
# File 'lib/iiif_manifest/v3/annotation_content.rb', line 4 def motivation @motivation end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/iiif_manifest/v3/annotation_content.rb', line 4 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/iiif_manifest/v3/annotation_content.rb', line 4 def value @value end |