Class: Pubid::Iso::Identifiers::Addendum

Inherits:
SupplementIdentifier show all
Defined in:
lib/pubid/iso/identifiers/addendum.rb

Constant Summary collapse

TYPED_STAGES =
[
  ::Pubid::Components::TypedStage.new(
    code: :pwi_add,
    abbr: ["PWI Add"],
    short_abbr: nil,
    long_abbr: nil,
    type_code: :add,
    stage_code: :proposal,
    name: "Proposed Work Item for Addendum",
    harmonized_stages: %w[00.00 00.20 00.60 00.92 00.93 00.98 00.99],
  ),
  ::Pubid::Components::TypedStage.new(
    code: :np_add,
    abbr: ["NP Add"],
    short_abbr: nil,
    long_abbr: nil,
    type_code: :add,
    stage_code: :proposal,
    name: "New Work Item Proposal for Addendum",
    harmonized_stages: %w[10.00 10.20 10.60 10.92 10.93 10.98],
  ),
  ::Pubid::Components::TypedStage.new(
    code: :awi_add,
    abbr: ["AWI Add"],
    short_abbr: nil,
    long_abbr: nil,
    type_code: :add,
    stage_code: :preliminary,
    name: "Approved Work Item for Addendum",
    harmonized_stages: %w[10.99 20.00],
  ),
  ::Pubid::Components::TypedStage.new(
    code: :wd_add,
    abbr: ["WD Add"],
    short_abbr: nil,
    long_abbr: nil,
    type_code: :add,
    stage_code: :working_draft,
    name: "Working Draft for Addendum",
    harmonized_stages: %w[20.20 20.60 20.92 20.93 20.98 20.99],
  ),
  ::Pubid::Components::TypedStage.new(
    code: :committee_draft_add,
    abbr: ["CD Add"],
    short_abbr: nil,
    long_abbr: nil,
    type_code: :add,
    stage_code: :cd,
    name: "Committee Draft for Addendum",
    harmonized_stages: %w[30.00 30.20 30.60 30.92 30.93 30.98 30.99],
  ),
  ::Pubid::Components::TypedStage.new(
    code: :dad,
    abbr: ["DAD", "DAdd", "D ADD", "Dad", "DIS Add"],
    short_abbr: "DAD",
    # "DAdd" stays in `abbr` so it still parses, but render the canonical
    # "DAD" (pubid v1 legacy_abbr parity). No long_abbr → no long render.
    long_abbr: nil,
    type_code: :add,
    stage_code: :dad,
    name: "Draft Addendum",
    harmonized_stages: %w[40.00 40.20 40.60 40.92 40.93 40.98 40.99],
  ),
  ::Pubid::Components::TypedStage.new(
    code: :fdad,
    abbr: ["FDAD", "FDAdd", "FD ADD", "FDad", "FDIS Add"],
    short_abbr: "FDAD",
    # See :dad — parse "FDAdd", render canonical "FDAD" (v1 parity).
    long_abbr: nil,
    type_code: :add,
    stage_code: :fdad,
    name: "Final Draft Addendum",
    harmonized_stages: %w[50.00 50.20 50.60 50.92 50.98 50.99],
  ),
  ::Pubid::Components::TypedStage.new(
    code: :published,
    abbr: ["Add", "ADD", "Add.", "Addendum"],
    short_abbr: "ADD",
    long_abbr: "Add",
    type_code: :add,
    stage_code: :published,
    name: "Addendum",
    harmonized_stages: %w[60.00 60.60],
  ),
].freeze

Constants inherited from Pubid::Iso::Identifier

Pubid::Iso::Identifier::ISO_TYPE_MAP

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SupplementIdentifier

#copublishers, #publisher, #to_s

Methods inherited from SingleIdentifier

#to_s

Methods inherited from Pubid::Iso::Identifier

#all_parts_from_kv, #all_parts_to_kv, #build_code, build_type_map, #copublishers_from_kv, #copublishers_to_kv, #date_for, #day_from_kv, #day_to_kv, default_publisher, #emit_code, #emit_date_part, from_hash, #month_from_kv, #month_to_kv, #number_from_kv, #number_to_kv, parse, #part_from_kv, #part_to_kv, published_typed_stage, #publisher_for, #publisher_from_kv, #publisher_to_kv, #stage, #stage_from_kv, #stage_iteration_from_kv, #stage_iteration_to_kv, #stage_to_kv, #subpart_from_kv, #subpart_to_kv, #type, #with_harmonized_stage, #year_from_kv, #year_to_kv

Methods inherited from Pubid::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_type_code, #year

Constructor Details

This class inherits a constructor from Pubid::Identifier

Class Method Details

.typeObject



100
101
102
103
# File 'lib/pubid/iso/identifiers/addendum.rb', line 100

def self.type
  { key: :add,
    web: :addendum, title: "Addendum", short: "ADD" }
end

Instance Method Details

#urn_supplement_typeObject

Override URN supplement type to use generic “sup” instead of “add” This matches the ISO URN specification where addendums use “sup”



10
11
12
# File 'lib/pubid/iso/identifiers/addendum.rb', line 10

def urn_supplement_type
  "sup"
end