Class: Pubid::Gost::Identifier
- Inherits:
-
Identifier
- Object
- Lutaml::Model::Serializable
- Identifier
- Pubid::Gost::Identifier
- Defined in:
- lib/pubid/gost/identifier.rb
Overview
Base class for all GOST identifiers.
GOST identifiers observed in the wild have the shape:
GOST [R ][<copublisher> ][<subtype> ]<number>[-<year>][/<adopted>][(<refs>)]
Where /
Direct Known Subclasses
Pubid::Gost::Identifiers::ForeignReference, Pubid::Gost::Identifiers::Harmonized, Pubid::Gost::Identifiers::IdenticalAdoption, Pubid::Gost::Identifiers::InterstateStandard, Pubid::Gost::Identifiers::NationalStandard
Constant Summary collapse
- GOST_TYPE_MAP =
{ "pubid:gost:interstate-standard" => "Pubid::Gost::Identifiers::InterstateStandard", "pubid:gost:national-standard" => "Pubid::Gost::Identifiers::NationalStandard", "pubid:gost:identical-adoption" => "Pubid::Gost::Identifiers::IdenticalAdoption", "pubid:gost:harmonized" => "Pubid::Gost::Identifiers::Harmonized", "pubid:gost:foreign-reference" => "Pubid::Gost::Identifiers::ForeignReference", }.freeze
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Identifier
apply_mappings, #base, #base_document, concrete_class_for, #dated_version_of?, #draft_of?, #drop_supplements, #edition_of?, #eql?, #exclude, from_hash, #has_supplement?, #hash, #includes?, #initialize, #matches?, #mr_all_parts, #mr_edition, #mr_languages, #mr_number, #mr_number_with_part, #mr_part, #mr_publisher, #mr_subpart, #mr_supplement_suffix, #mr_type, #mr_year, #new_edition_of?, polymorphic_name, polymorphic_type_map, #related_to?, #render, #resolve_urn_generator, #root, #sibling_of?, #supplement_of?, #to_hash, #to_mr_string, #to_s, #to_slug, #to_supplement_s, #urn_supplement_type, #urn_type_code, #year
Constructor Details
This class inherits a constructor from Pubid::Identifier
Class Method Details
Instance Method Details
#to_urn ⇒ Object
44 45 46 |
# File 'lib/pubid/gost/identifier.rb', line 44 def to_urn UrnGenerator.new(self).generate end |