Class: Idml::Parts::XmpRdf
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Idml::Parts::XmpRdf
- Defined in:
- lib/idml/parts/xmp.rb
Overview
<rdf:RDF> — collection of <rdf:Description> siblings inside
an XMP packet. Per IDML's META-INF/metadata.xml, there is
typically one Description per schema group.
Instance Method Summary collapse
- #author ⇒ Object
- #create_date ⇒ Object
- #creator_tool ⇒ Object
- #description ⇒ Object
-
#first_description ⇒ Object
Merged view across all Descriptions.
- #keywords ⇒ Object
- #modify_date ⇒ Object
- #subject ⇒ Object
- #title ⇒ Object
Instance Method Details
#author ⇒ Object
261 262 263 |
# File 'lib/idml/parts/xmp.rb', line 261 def descriptions.filter_map(&:author).first end |
#create_date ⇒ Object
281 282 283 |
# File 'lib/idml/parts/xmp.rb', line 281 def create_date descriptions.filter_map(&:create_date).first&.value end |
#creator_tool ⇒ Object
277 278 279 |
# File 'lib/idml/parts/xmp.rb', line 277 def creator_tool descriptions.filter_map(&:creator_tool).first&.value end |
#description ⇒ Object
273 274 275 |
# File 'lib/idml/parts/xmp.rb', line 273 def description descriptions.map(&:description).find(&:itself)&.value end |
#first_description ⇒ Object
Merged view across all Descriptions. Each attribute returns the first non-nil value across the descriptions.
253 254 255 |
# File 'lib/idml/parts/xmp.rb', line 253 def first_description descriptions.first end |
#keywords ⇒ Object
269 270 271 |
# File 'lib/idml/parts/xmp.rb', line 269 def keywords subject&.join(", ") end |
#modify_date ⇒ Object
285 286 287 |
# File 'lib/idml/parts/xmp.rb', line 285 def modify_date descriptions.filter_map(&:modify_date).first&.value end |
#subject ⇒ Object
265 266 267 |
# File 'lib/idml/parts/xmp.rb', line 265 def subject descriptions.filter_map(&:subject).find(&:itself)&.values end |
#title ⇒ Object
257 258 259 |
# File 'lib/idml/parts/xmp.rb', line 257 def title descriptions.map(&:title).find(&:itself)&.value end |