Class: Metanorma::Collection::Config::Manifest
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Metanorma::Collection::Config::Manifest
show all
- Includes:
- Converters
- Defined in:
- lib/metanorma/collection/config/manifest.rb
Constant Summary
Constants included
from Converters
Converters::V1_BIBDATA_KEYS
Instance Method Summary
collapse
Methods included from Converters
#add_raw_xml_element, #bibdata_from_xml, #bibdata_from_yaml, #bibdata_to_xml, #bibdata_to_yaml, #bibdata_yaml_v1_format?, #force_primary_docidentifier_xml, #force_primary_docidentifier_yaml, #nop_to_xml, #nop_to_yaml
Instance Method Details
#docref_from_yaml(model, value) ⇒ Object
110
111
112
|
# File 'lib/metanorma/collection/config/manifest.rb', line 110
def docref_from_yaml(model, value)
model.entry = Manifest.from_yaml(value.to_yaml)
end
|
#entry_from_xml(model, node) ⇒ Object
84
85
86
|
# File 'lib/metanorma/collection/config/manifest.rb', line 84
def entry_from_xml(model, node)
model.entry = Manifest.from_xml(node.node.to_xml)
end
|
#entry_to_xml(model, _parent, doc) ⇒ Object
88
89
90
91
92
|
# File 'lib/metanorma/collection/config/manifest.rb', line 88
def entry_to_xml(model, _parent, doc)
Array(model.entry).each do |e|
add_raw_xml_element(doc, e.to_xml)
end
end
|
#fileref_from_yaml(model, value) ⇒ Object
106
107
108
|
# File 'lib/metanorma/collection/config/manifest.rb', line 106
def fileref_from_yaml(model, value)
model.file ||= value
end
|
#level_from_yaml(model, value) ⇒ Object
102
103
104
|
# File 'lib/metanorma/collection/config/manifest.rb', line 102
def level_from_yaml(model, value)
model.type ||= value
end
|
#output_filename_from_xml(model, node) ⇒ Object
94
95
96
|
# File 'lib/metanorma/collection/config/manifest.rb', line 94
def output_filename_from_xml(model, node)
model.output_filename ||= node.content
end
|
#sectionsplit_filename_from_xml(model, node) ⇒ Object
98
99
100
|
# File 'lib/metanorma/collection/config/manifest.rb', line 98
def sectionsplit_filename_from_xml(model, node)
model.sectionsplit_filename ||= node.content
end
|