Class: Pubid::Bipm::UrnGenerator
- Inherits:
-
UrnGenerator::Base
- Object
- UrnGenerator::Base
- Pubid::Bipm::UrnGenerator
- Defined in:
- lib/pubid/bipm/urn_generator.rb
Overview
Emits a URN carrying the canonical (language/form-neutral) document identity for each family:
committee: urn:bipm:<group>:<type>:<number>:<year> (empty number seg
when number-less)
meeting: urn:bipm:<group>:meeting:<number>:<year>
metrologia: urn:bipm:metrologia:<vol>[:<issue>[:<article>]]
brochure: urn:bipm:si-brochure:<lang>:<edition>:<version>:<years>
Instance Attribute Summary
Attributes inherited from UrnGenerator::Base
Instance Method Summary collapse
Methods inherited from UrnGenerator::Base
#initialize, #maybe, #urn_edition, #urn_language, #urn_namespace, #urn_number, #urn_part, #urn_publisher, #urn_subpart, #urn_type, #urn_year
Constructor Details
This class inherits a constructor from Pubid::UrnGenerator::Base
Instance Method Details
#generate ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pubid/bipm/urn_generator.rb', line 13 def generate case identifier when Identifiers::CommitteeDocument then committee when Identifiers::Meeting then meeting when Identifiers::MetrologiaArticle then metrologia when Identifiers::SiBrochure then si_brochure else raise "Cannot build URN for BIPM identifier: #{identifier.class}" end end |