Class: Pubid::Nist::Identifiers::SpecialPublication

Inherits:
Pubid::Nist::Identifier show all
Defined in:
lib/pubid/nist/identifiers/special_publication.rb

Overview

NIST Special Publication (SP) Examples:

  • "NIST SP 800-53" = Special Publication 800-53
  • "NIST SP 800-53r5" = Special Publication 800-53 revision 5
  • "NIST SP 800-57pt1r4" = Special Publication 800-57 part 1 revision 4

Constant Summary collapse

SP_SUBSERIES =

Per Appendix A.2 of the NIST PubID Syntax (April 2022), the SP series is subdivided into named subseries. The subseries number is the leading token of a report-num like "800-53" or "1190GB-12". The Builder exposes this as identifier.subseries so callers can query which subseries a document belongs to.

%w[
  250 260 300 400 480 500 700 800 823 960 1190GB 1200 1500 1800 1900 2000 2100
].freeze
TYPED_STAGES =
[
  Pubid::Components::TypedStage.new(
    abbr: ["SP", "NIST SP", "NBS SP"], # Compound series
    stage_code: "published",
    type_code: "sp",
  ),
].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

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_full_name, #supplement_short, #to_abbreviated_style, #to_full_style, #to_hash, #to_mr_string, #to_mr_style, #to_s, #to_short_style, #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

.typeObject



34
35
36
37
# File 'lib/pubid/nist/identifiers/special_publication.rb', line 34

def type
  { key: :sp,
  web: :special_publication, title: "NIST Special Publication", short: "SP" }
end

.typed_stagesObject



30
31
32
# File 'lib/pubid/nist/identifiers/special_publication.rb', line 30

def typed_stages
  TYPED_STAGES
end

Instance Method Details

#series_codeObject



40
41
42
# File 'lib/pubid/nist/identifiers/special_publication.rb', line 40

def series_code
  "SP"
end