Class: Pubid::Nist::Identifiers::DatedDocument
- Inherits:
-
Base
- Object
- Lutaml::Model::Serializable
- Identifier
- Base
- 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 Base
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 Base
#==, #append_mr_components, #append_short_components, #default_publisher, #edition_greater?, #exclude, #extract_edition_number, #hash, #initialize, #language, #matches?, #merge, #publisher_abbreviated_name, #publisher_full_name, #render, #revision, #series_abbreviated_name, #series_code, #series_full_name, #supplement_short, #to_s, #translation, #weight
Methods included from Pubid::Nist::Identifier
Methods included from IdentifierFacade
#from_hash, #polymorphic_type_map
Methods inherited from Identifier
#base_identifier, #eql?, #exclude, #hash, #initialize, #mr_number, #mr_number_with_part, #mr_part, #mr_publisher, #mr_type, #mr_year, #new_edition_of?, polymorphic_name, #render, #resolve_urn_generator, #root, #to_mr_string, #to_s, #to_supplement_s, #to_urn, #urn_supplement_type, #urn_type_code, #year
Constructor Details
This class inherits a constructor from Pubid::Nist::Identifiers::Base
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 |