Class: Pubid::Nist::Identifiers::DatedDocument
- Inherits:
-
Pubid::Nist::Identifier
- Object
- Lutaml::Model::Serializable
- Identifier
- Pubid::Nist::Identifier
- Pubid::Nist::Identifiers::DatedDocument
- Defined in:
- lib/pubid/nist/identifiers/dated_document.rb
Overview
NIST date-style identifier with no series. Examples:
- "NIST 2022-04-15 001" (short) / "NIST.2022-04-15.001" (mr/doi) DOI 10.6028/NIST.2022-04-15.001
Constant Summary collapse
- TYPED_STAGES =
Empty so the bare "NIST" abbr never shadows a series lookup; the Router guard (parsed_hash && :dated_seq) is the dispatch path.
[].freeze
Constants inherited from Pubid::Nist::Identifier
Pubid::Nist::Identifier::COMPACT_DROP_ATTRS, Pubid::Nist::Identifier::COMPACT_FLAT_CODES, Pubid::Nist::Identifier::COMPACT_FLAT_VALUES, Pubid::Nist::Identifier::EQUALITY_IGNORED_ATTRS
Class Method Summary collapse
Instance Method Summary collapse
- #to_abbreviated_style ⇒ Object
-
#to_full_style ⇒ Object
No series/number to expand; non-default formats fall back to short.
- #to_mr_style ⇒ Object
- #to_short_style ⇒ Object
Methods inherited from Pubid::Nist::Identifier
#==, #append_mr_components, #append_short_components, #default_publisher, #edition_greater?, expand_code, expand_compact_hash, #extract_edition_number, from_hash, #hash, #initialize, #language, #matches?, #merge, parse, #publisher_abbreviated_name, #publisher_full_name, #render, #revision, #series_abbreviated_name, #series_code, #series_full_name, #supplement_short, #to_hash, #to_mr_string, #to_s, #to_slug, #translation, #weight
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, #to_urn, #urn_supplement_type, #urn_type_code, #year
Constructor Details
This class inherits a constructor from Pubid::Nist::Identifier
Class Method Details
.type ⇒ Object
25 26 27 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 25 def type { key: :dated, title: "NIST Dated Document" } end |
.typed_stages ⇒ Object
21 22 23 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 21 def typed_stages TYPED_STAGES end |
Instance Method Details
#to_abbreviated_style ⇒ Object
43 44 45 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 43 def to_abbreviated_style to_short_style end |
#to_full_style ⇒ Object
No series/number to expand; non-default formats fall back to short.
39 40 41 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 39 def to_full_style to_short_style end |
#to_mr_style ⇒ Object
34 35 36 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 34 def to_mr_style "#{publisher || 'NIST'}.#{date_year}-#{date_month}-#{date_day}.#{dated_seq}" end |
#to_short_style ⇒ Object
30 31 32 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 30 def to_short_style "#{publisher || 'NIST'} #{date_year}-#{date_month}-#{date_day} #{dated_seq}" end |