pubid 2.0.0.alpha.10 → 2.0.0.pre.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +51 -54
- data/data/iec/update_codes.yaml +0 -3
- data/data/ieee/update_codes.yaml +1 -107
- data/data/nist/update_codes.yaml +0 -35
- data/lib/pubid/amca/builder.rb +6 -6
- data/lib/pubid/amca/identifier.rb +16 -2
- data/lib/pubid/amca/identifiers/base.rb +46 -74
- data/lib/pubid/amca/identifiers/interpretation.rb +30 -17
- data/lib/pubid/amca/identifiers/publication.rb +27 -14
- data/lib/pubid/amca/identifiers/standard.rb +5 -3
- data/lib/pubid/amca/identifiers.rb +1 -0
- data/lib/pubid/amca/parser.rb +1 -1
- data/lib/pubid/amca/scheme.rb +16 -0
- data/lib/pubid/amca/single_identifier.rb +24 -1
- data/lib/pubid/amca/urn_generator.rb +3 -4
- data/lib/pubid/amca.rb +3 -50
- data/lib/pubid/ansi/builder.rb +5 -7
- data/lib/pubid/ansi/identifier.rb +1 -19
- data/lib/pubid/ansi/identifiers/american_national_standard.rb +1 -2
- data/lib/pubid/ansi/identifiers/standard.rb +3 -2
- data/lib/pubid/ansi/parser.rb +1 -1
- data/lib/pubid/ansi/scheme.rb +15 -0
- data/lib/pubid/ansi/single_identifier.rb +31 -2
- data/lib/pubid/ansi/urn_generator.rb +38 -3
- data/lib/pubid/ansi.rb +6 -47
- data/lib/pubid/api/builder.rb +72 -45
- data/lib/pubid/api/identifier.rb +9 -30
- data/lib/pubid/api/identifiers/base.rb +14 -2
- data/lib/pubid/api/identifiers/bulletin.rb +2 -0
- data/lib/pubid/api/identifiers/continuous_operations_standard.rb +2 -0
- data/lib/pubid/api/identifiers/mpms.rb +28 -10
- data/lib/pubid/api/identifiers/publication.rb +2 -0
- data/lib/pubid/api/identifiers/recommended_practice.rb +2 -0
- data/lib/pubid/api/identifiers/specification.rb +2 -0
- data/lib/pubid/api/identifiers/standard.rb +2 -0
- data/lib/pubid/api/identifiers/technical_report.rb +2 -0
- data/lib/pubid/api/identifiers/typeless_standard.rb +16 -0
- data/lib/pubid/api/parser.rb +1 -1
- data/lib/pubid/api/scheme.rb +66 -0
- data/lib/pubid/api/single_identifier.rb +32 -10
- data/lib/pubid/api/urn_generator.rb +18 -0
- data/lib/pubid/api.rb +5 -56
- data/lib/pubid/ashrae/builder.rb +35 -56
- data/lib/pubid/ashrae/identifier.rb +16 -6
- data/lib/pubid/ashrae/identifiers/addenda_package.rb +11 -7
- data/lib/pubid/ashrae/identifiers/addendum.rb +20 -9
- data/lib/pubid/ashrae/identifiers/base.rb +15 -111
- data/lib/pubid/ashrae/identifiers/combined_addenda.rb +16 -8
- data/lib/pubid/ashrae/identifiers/errata.rb +10 -9
- data/lib/pubid/ashrae/identifiers/guideline.rb +0 -3
- data/lib/pubid/ashrae/identifiers/interpretation.rb +10 -16
- data/lib/pubid/ashrae/identifiers/standard.rb +0 -3
- data/lib/pubid/ashrae/identifiers.rb +1 -0
- data/lib/pubid/ashrae/parser.rb +16 -40
- data/lib/pubid/ashrae/scheme.rb +53 -0
- data/lib/pubid/ashrae/single_identifier.rb +14 -1
- data/lib/pubid/ashrae/supplement_identifier.rb +6 -21
- data/lib/pubid/ashrae/urn_generator.rb +10 -8
- data/lib/pubid/ashrae.rb +2 -58
- data/lib/pubid/asme/builder.rb +2 -11
- data/lib/pubid/asme/components/code.rb +2 -10
- data/lib/pubid/asme/identifier.rb +0 -9
- data/lib/pubid/asme/identifiers/base.rb +60 -0
- data/lib/pubid/asme/identifiers/standard.rb +2 -86
- data/lib/pubid/asme/parser.rb +1 -1
- data/lib/pubid/asme/scheme.rb +37 -0
- data/lib/pubid/asme/single_identifier.rb +2 -11
- data/lib/pubid/asme/urn_generator.rb +2 -2
- data/lib/pubid/asme.rb +1 -47
- data/lib/pubid/astm/builder.rb +3 -10
- data/lib/pubid/astm/components/code.rb +0 -9
- data/lib/pubid/astm/identifier.rb +0 -9
- data/lib/pubid/astm/identifiers/adjunct.rb +9 -16
- data/lib/pubid/astm/identifiers/data_series.rb +14 -2
- data/lib/pubid/astm/identifiers/iso_dual_published.rb +34 -25
- data/lib/pubid/astm/identifiers/manual.rb +25 -8
- data/lib/pubid/astm/identifiers/monograph.rb +14 -2
- data/lib/pubid/astm/identifiers/research_report.rb +5 -8
- data/lib/pubid/astm/identifiers/standard.rb +37 -8
- data/lib/pubid/astm/identifiers/technical_report.rb +13 -2
- data/lib/pubid/astm/identifiers/work_in_progress.rb +10 -1
- data/lib/pubid/astm/parser.rb +1 -1
- data/lib/pubid/astm/scheme.rb +55 -0
- data/lib/pubid/astm/single_identifier.rb +10 -32
- data/lib/pubid/astm/urn_generator.rb +5 -7
- data/lib/pubid/astm.rb +27 -44
- data/lib/pubid/bsi/builder.rb +107 -119
- data/lib/pubid/bsi/identifier.rb +25 -4
- data/lib/pubid/bsi/identifiers/addendum_document.rb +37 -3
- data/lib/pubid/bsi/identifiers/adopted_european_norm.rb +47 -19
- data/lib/pubid/bsi/identifiers/adopted_international_standard.rb +39 -8
- data/lib/pubid/bsi/identifiers/aerospace_standard.rb +55 -2
- data/lib/pubid/bsi/identifiers/amendment.rb +22 -30
- data/lib/pubid/bsi/identifiers/base.rb +11 -0
- data/lib/pubid/bsi/identifiers/british_industrial_practice.rb +7 -1
- data/lib/pubid/bsi/identifiers/british_standard.rb +1 -2
- data/lib/pubid/bsi/identifiers/bundled_identifier.rb +87 -13
- data/lib/pubid/bsi/identifiers/committee_document.rb +17 -10
- data/lib/pubid/bsi/identifiers/consolidated_identifier.rb +87 -19
- data/lib/pubid/bsi/identifiers/corrigendum.rb +10 -26
- data/lib/pubid/bsi/identifiers/detailed_specification.rb +36 -0
- data/lib/pubid/bsi/identifiers/disc.rb +29 -0
- data/lib/pubid/bsi/identifiers/draft_document.rb +46 -2
- data/lib/pubid/bsi/identifiers/electronic_book.rb +38 -2
- data/lib/pubid/bsi/identifiers/expert_commentary.rb +21 -10
- data/lib/pubid/bsi/identifiers/explanatory_supplement.rb +47 -0
- data/lib/pubid/bsi/identifiers/flex.rb +34 -3
- data/lib/pubid/bsi/identifiers/handbook.rb +17 -1
- data/lib/pubid/bsi/identifiers/index.rb +32 -0
- data/lib/pubid/bsi/identifiers/method.rb +41 -0
- data/lib/pubid/bsi/identifiers/national_annex.rb +29 -4
- data/lib/pubid/bsi/identifiers/practice_guide.rb +7 -1
- data/lib/pubid/bsi/identifiers/publicly_available_specification.rb +54 -2
- data/lib/pubid/bsi/identifiers/published_document.rb +54 -2
- data/lib/pubid/bsi/identifiers/section.rb +30 -0
- data/lib/pubid/bsi/identifiers/set.rb +20 -14
- data/lib/pubid/bsi/identifiers/standalone_amendment.rb +10 -10
- data/lib/pubid/bsi/identifiers/supplement_document.rb +25 -3
- data/lib/pubid/bsi/identifiers/supplementary_index.rb +46 -0
- data/lib/pubid/bsi/identifiers/technical_specification.rb +47 -2
- data/lib/pubid/bsi/identifiers/test_method.rb +32 -0
- data/lib/pubid/bsi/identifiers/value_added_publication.rb +22 -7
- data/lib/pubid/bsi/identifiers.rb +1 -0
- data/lib/pubid/bsi/parser.rb +6 -20
- data/lib/pubid/bsi/scheme.rb +243 -0
- data/lib/pubid/bsi/single_identifier.rb +82 -94
- data/lib/pubid/bsi/urn_generator.rb +5 -13
- data/lib/pubid/bsi.rb +2 -252
- data/lib/pubid/builder/base.rb +13 -62
- data/lib/pubid/bundled_identifier.rb +10 -18
- data/lib/pubid/ccsds/builder.rb +4 -5
- data/lib/pubid/ccsds/identifier.rb +3 -63
- data/lib/pubid/ccsds/identifiers/base.rb +51 -14
- data/lib/pubid/ccsds/identifiers/corrigendum.rb +8 -9
- data/lib/pubid/ccsds/parser.rb +3 -5
- data/lib/pubid/ccsds/scheme.rb +57 -0
- data/lib/pubid/ccsds/single_identifier.rb +3 -6
- data/lib/pubid/ccsds/supplement_identifier.rb +13 -17
- data/lib/pubid/ccsds/urn_generator.rb +6 -6
- data/lib/pubid/ccsds.rb +1 -44
- data/lib/pubid/cen_cenelec/builder.rb +29 -61
- data/lib/pubid/cen_cenelec/identifier.rb +5 -28
- data/lib/pubid/cen_cenelec/identifiers/adopted_european_norm.rb +4 -9
- data/lib/pubid/cen_cenelec/identifiers/amendment.rb +12 -2
- data/lib/pubid/cen_cenelec/identifiers/base.rb +46 -5
- data/lib/pubid/cen_cenelec/identifiers/cen_report.rb +1 -2
- data/lib/pubid/cen_cenelec/identifiers/cen_workshop_agreement.rb +1 -2
- data/lib/pubid/cen_cenelec/identifiers/consolidated_identifier.rb +27 -6
- data/lib/pubid/cen_cenelec/identifiers/corrigendum.rb +17 -2
- data/lib/pubid/cen_cenelec/identifiers/european_norm.rb +4 -62
- data/lib/pubid/cen_cenelec/identifiers/european_prestandard.rb +7 -20
- data/lib/pubid/cen_cenelec/identifiers/european_specification.rb +1 -2
- data/lib/pubid/cen_cenelec/identifiers/fragment.rb +6 -2
- data/lib/pubid/cen_cenelec/identifiers/harmonization_document.rb +1 -2
- data/lib/pubid/cen_cenelec/identifiers/technical_report.rb +1 -2
- data/lib/pubid/cen_cenelec/identifiers/technical_specification.rb +1 -2
- data/lib/pubid/cen_cenelec/parser.rb +1 -1
- data/lib/pubid/cen_cenelec/scheme.rb +164 -0
- data/lib/pubid/cen_cenelec/single_identifier.rb +91 -10
- data/lib/pubid/cen_cenelec/supplement_identifier.rb +7 -6
- data/lib/pubid/cen_cenelec/urn_generator.rb +7 -7
- data/lib/pubid/cen_cenelec.rb +1 -188
- data/lib/pubid/cie/builder.rb +24 -149
- data/lib/pubid/cie/components/code.rb +72 -0
- data/lib/pubid/cie/identifier.rb +5 -20
- data/lib/pubid/cie/identifiers/bundle.rb +5 -35
- data/lib/pubid/cie/identifiers/conference.rb +6 -11
- data/lib/pubid/cie/identifiers/corrigendum.rb +23 -17
- data/lib/pubid/cie/identifiers/dual_published.rb +6 -6
- data/lib/pubid/cie/identifiers/identical.rb +9 -9
- data/lib/pubid/cie/identifiers/joint_published.rb +10 -10
- data/lib/pubid/cie/identifiers/standard.rb +8 -43
- data/lib/pubid/cie/identifiers/supplement.rb +25 -27
- data/lib/pubid/cie/identifiers/tutorial_bundle.rb +3 -7
- data/lib/pubid/cie/identifiers.rb +0 -2
- data/lib/pubid/cie/parser.rb +6 -55
- data/lib/pubid/cie/scheme.rb +64 -0
- data/lib/pubid/cie/single_identifier.rb +5 -44
- data/lib/pubid/cie/supplement_identifier.rb +16 -29
- data/lib/pubid/cie/urn_generator.rb +8 -11
- data/lib/pubid/cie.rb +2 -57
- data/lib/pubid/components/code.rb +8 -22
- data/lib/pubid/components/date.rb +18 -41
- data/lib/pubid/components/edition.rb +6 -9
- data/lib/pubid/components/language.rb +4 -6
- data/lib/pubid/components/locality.rb +1 -10
- data/lib/pubid/components/publisher.rb +6 -9
- data/lib/pubid/components/stage.rb +14 -5
- data/lib/pubid/components/type.rb +15 -5
- data/lib/pubid/components/typed_stage.rb +8 -11
- data/lib/pubid/components.rb +0 -4
- data/lib/pubid/core/update_codes.rb +7 -28
- data/lib/pubid/csa/builder.rb +48 -48
- data/lib/pubid/csa/composite_identifier.rb +7 -18
- data/lib/pubid/csa/identifier.rb +78 -191
- data/lib/pubid/csa/identifiers/base.rb +123 -0
- data/lib/pubid/csa/identifiers/bundled.rb +9 -25
- data/lib/pubid/csa/identifiers/canadian_adopted.rb +13 -13
- data/lib/pubid/csa/identifiers/cec.rb +103 -40
- data/lib/pubid/csa/identifiers/combined.rb +69 -97
- data/lib/pubid/csa/identifiers/csa_adopted.rb +4 -4
- data/lib/pubid/csa/identifiers/package.rb +4 -4
- data/lib/pubid/csa/identifiers/series.rb +104 -0
- data/lib/pubid/csa/parser.rb +8 -12
- data/lib/pubid/csa/scheme.rb +44 -0
- data/lib/pubid/csa/single_identifier.rb +5 -94
- data/lib/pubid/csa/urn_generator.rb +2 -9
- data/lib/pubid/csa/wrapper_identifier.rb +10 -43
- data/lib/pubid/csa.rb +1 -56
- data/lib/pubid/etsi/builder.rb +4 -13
- data/lib/pubid/etsi/components/code.rb +9 -10
- data/lib/pubid/etsi/components/version.rb +5 -0
- data/lib/pubid/etsi/identifier.rb +12 -2
- data/lib/pubid/etsi/identifiers/base.rb +24 -60
- data/lib/pubid/etsi/identifiers/etsi_standard.rb +4 -207
- data/lib/pubid/etsi/identifiers/supplement_identifier.rb +14 -46
- data/lib/pubid/etsi/identifiers.rb +1 -0
- data/lib/pubid/etsi/parser.rb +3 -9
- data/lib/pubid/etsi/scheme.rb +42 -0
- data/lib/pubid/etsi.rb +2 -52
- data/lib/pubid/export/data_class_exporter.rb +59 -0
- data/lib/pubid/export/exporter.rb +47 -6
- data/lib/pubid/export/flavor_exporter.rb +276 -124
- data/lib/pubid/export/ieee_exporter.rb +78 -0
- data/lib/pubid/export/itu_exporter.rb +66 -0
- data/lib/pubid/export/nist_exporter.rb +64 -0
- data/lib/pubid/export/registry_exporter.rb +90 -0
- data/lib/pubid/export/scheme_exporter.rb +70 -0
- data/lib/pubid/export.rb +6 -0
- data/lib/pubid/identifier.rb +37 -920
- data/lib/pubid/identifier_metadata.rb +1 -1
- data/lib/pubid/identifier_registry.rb +198 -0
- data/lib/pubid/idf/builder.rb +7 -7
- data/lib/pubid/idf/identifier.rb +13 -23
- data/lib/pubid/idf/identifiers/amendment.rb +1 -2
- data/lib/pubid/idf/identifiers/corrigendum.rb +1 -2
- data/lib/pubid/idf/identifiers/international_standard.rb +1 -2
- data/lib/pubid/idf/identifiers/reviewed_method.rb +1 -2
- data/lib/pubid/idf/parser.rb +5 -6
- data/lib/pubid/idf/scheme.rb +61 -0
- data/lib/pubid/idf/supplement_identifier.rb +13 -5
- data/lib/pubid/idf/urn_generator.rb +39 -4
- data/lib/pubid/idf.rb +1 -65
- data/lib/pubid/iec/builder.rb +91 -92
- data/lib/pubid/iec/components/code.rb +32 -9
- data/lib/pubid/iec/components/publisher.rb +1 -1
- data/lib/pubid/iec/identifier.rb +8 -328
- data/lib/pubid/iec/identifiers/amendment.rb +5 -8
- data/lib/pubid/iec/identifiers/base.rb +31 -7
- data/lib/pubid/iec/identifiers/component_specification.rb +13 -3
- data/lib/pubid/iec/identifiers/conformity_assessment.rb +12 -1
- data/lib/pubid/iec/identifiers/consolidated_identifier.rb +30 -29
- data/lib/pubid/iec/identifiers/corrigendum.rb +5 -4
- data/lib/pubid/iec/identifiers/fragment_identifier.rb +36 -43
- data/lib/pubid/iec/identifiers/guide.rb +18 -0
- data/lib/pubid/iec/identifiers/international_standard.rb +9 -24
- data/lib/pubid/iec/identifiers/interpretation_sheet.rb +3 -2
- data/lib/pubid/iec/identifiers/operational_document.rb +13 -3
- data/lib/pubid/iec/identifiers/publicly_available_specification.rb +15 -2
- data/lib/pubid/iec/identifiers/sheet_identifier.rb +24 -26
- data/lib/pubid/iec/identifiers/societal_technology_trend_report.rb +13 -3
- data/lib/pubid/iec/identifiers/systems_reference_document.rb +13 -2
- data/lib/pubid/iec/identifiers/technical_report.rb +21 -3
- data/lib/pubid/iec/identifiers/technical_specification.rb +21 -3
- data/lib/pubid/iec/identifiers/technology_report.rb +12 -1
- data/lib/pubid/iec/identifiers/test_report_form.rb +46 -3
- data/lib/pubid/iec/identifiers/vap_identifier.rb +34 -33
- data/lib/pubid/iec/identifiers/white_paper.rb +13 -3
- data/lib/pubid/iec/identifiers/working_document.rb +60 -26
- data/lib/pubid/iec/parser.rb +42 -73
- data/lib/pubid/iec/scheme.rb +71 -0
- data/lib/pubid/iec/single_identifier.rb +23 -15
- data/lib/pubid/iec/supplement_identifier.rb +67 -84
- data/lib/pubid/iec/urn_generator.rb +143 -195
- data/lib/pubid/iec/urn_parser.rb +246 -85
- data/lib/pubid/iec.rb +66 -45
- data/lib/pubid/ieee/aiee/builder.rb +3 -17
- data/lib/pubid/ieee/aiee/identifier.rb +62 -46
- data/lib/pubid/ieee/aiee/parser.rb +1 -1
- data/lib/pubid/ieee/builder.rb +81 -398
- data/lib/pubid/ieee/components/code.rb +0 -8
- data/lib/pubid/ieee/components/draft.rb +0 -54
- data/lib/pubid/ieee/components/relationship.rb +149 -5
- data/lib/pubid/ieee/identifier.rb +11 -3
- data/lib/pubid/ieee/identifiers/adopted_standard.rb +14 -62
- data/lib/pubid/ieee/identifiers/base.rb +547 -340
- data/lib/pubid/ieee/identifiers/conformance_identifier.rb +12 -6
- data/lib/pubid/ieee/identifiers/corrigendum.rb +12 -15
- data/lib/pubid/ieee/identifiers/csa_dual_published.rb +13 -24
- data/lib/pubid/ieee/identifiers/dual_identifier.rb +7 -3
- data/lib/pubid/ieee/identifiers/dual_published.rb +7 -58
- data/lib/pubid/ieee/identifiers/iec_ieee_copublished.rb +11 -99
- data/lib/pubid/ieee/identifiers/interpretation_identifier.rb +11 -25
- data/lib/pubid/ieee/identifiers/joint_development.rb +15 -66
- data/lib/pubid/ieee/identifiers/multi_numbered_identifier.rb +24 -58
- data/lib/pubid/ieee/identifiers/nesc/base.rb +19 -90
- data/lib/pubid/ieee/identifiers/nesc/draft.rb +5 -20
- data/lib/pubid/ieee/identifiers/nesc/handbook.rb +5 -16
- data/lib/pubid/ieee/identifiers/nesc/redline.rb +2 -11
- data/lib/pubid/ieee/identifiers/nesc/standard.rb +3 -18
- data/lib/pubid/ieee/identifiers/nesc.rb +0 -1
- data/lib/pubid/ieee/identifiers/parenthetical_identifier.rb +9 -3
- data/lib/pubid/ieee/identifiers/project_draft_identifier.rb +6 -29
- data/lib/pubid/ieee/identifiers/redlined_standard.rb +11 -4
- data/lib/pubid/ieee/identifiers/si_standard.rb +39 -4
- data/lib/pubid/ieee/identifiers/standard.rb +2 -5
- data/lib/pubid/ieee/identifiers/supplement_identifier.rb +7 -26
- data/lib/pubid/ieee/identifiers.rb +1 -2
- data/lib/pubid/ieee/ire/builder.rb +6 -7
- data/lib/pubid/ieee/ire/identifier.rb +33 -48
- data/lib/pubid/ieee/ire/parser.rb +1 -1
- data/lib/pubid/ieee/nesc/builder.rb +20 -33
- data/lib/pubid/ieee/nesc/parser.rb +15 -16
- data/lib/pubid/ieee/parser.rb +44 -462
- data/lib/pubid/ieee/scheme.rb +90 -0
- data/lib/pubid/ieee/typed_stages.rb +1 -12
- data/lib/pubid/ieee/urn_generator.rb +8 -35
- data/lib/pubid/ieee.rb +2 -133
- data/lib/pubid/ieee_debug.rb +1 -0
- data/lib/pubid/iho/builder.rb +2 -2
- data/lib/pubid/iho/identifier.rb +17 -5
- data/lib/pubid/iho/identifiers/base.rb +30 -64
- data/lib/pubid/iho/identifiers/bibliographic.rb +5 -1
- data/lib/pubid/iho/identifiers/circular_letter.rb +5 -1
- data/lib/pubid/iho/identifiers/miscellaneous.rb +5 -1
- data/lib/pubid/iho/identifiers/publication.rb +5 -1
- data/lib/pubid/iho/identifiers/standard.rb +5 -1
- data/lib/pubid/iho/identifiers.rb +1 -0
- data/lib/pubid/iho/parser.rb +4 -4
- data/lib/pubid/iho/scheme.rb +29 -0
- data/lib/pubid/iho/urn_generator.rb +3 -3
- data/lib/pubid/iho.rb +3 -59
- data/lib/pubid/iso/builder.rb +57 -68
- data/lib/pubid/iso/bundled_identifier.rb +3 -56
- data/lib/pubid/iso/combined_identifier.rb +4 -6
- data/lib/pubid/iso/components/code.rb +19 -7
- data/lib/pubid/iso/components/publisher.rb +8 -10
- data/lib/pubid/iso/components.rb +4 -2
- data/lib/pubid/iso/identifier.rb +11 -260
- data/lib/pubid/iso/identifiers/addendum.rb +6 -9
- data/lib/pubid/iso/identifiers/amendment.rb +4 -8
- data/lib/pubid/iso/identifiers/base.rb +115 -0
- data/lib/pubid/iso/identifiers/corrigendum.rb +4 -4
- data/lib/pubid/iso/identifiers/data.rb +1 -0
- data/lib/pubid/iso/identifiers/directives.rb +2 -8
- data/lib/pubid/iso/identifiers/directives_supplement.rb +26 -55
- data/lib/pubid/iso/identifiers/extract.rb +2 -2
- data/lib/pubid/iso/identifiers/guide.rb +1 -0
- data/lib/pubid/iso/identifiers/international_standard.rb +4 -4
- data/lib/pubid/iso/identifiers/international_standardized_profile.rb +4 -4
- data/lib/pubid/iso/identifiers/international_workshop_agreement.rb +4 -10
- data/lib/pubid/iso/identifiers/pas.rb +2 -2
- data/lib/pubid/iso/identifiers/recommendation.rb +2 -2
- data/lib/pubid/iso/identifiers/supplement.rb +3 -11
- data/lib/pubid/iso/identifiers/tc_document.rb +15 -44
- data/lib/pubid/iso/identifiers/technical_report.rb +4 -4
- data/lib/pubid/iso/identifiers/technical_specification.rb +2 -2
- data/lib/pubid/iso/identifiers/technology_trends_assessments.rb +2 -2
- data/lib/pubid/iso/identifiers.rb +1 -0
- data/lib/pubid/iso/parser.rb +19 -43
- data/lib/pubid/iso/scheme.rb +187 -0
- data/lib/pubid/iso/single_identifier.rb +7 -6
- data/lib/pubid/iso/supplement_identifier.rb +3 -29
- data/lib/pubid/iso/urn_generator.rb +177 -78
- data/lib/pubid/iso/urn_parser.rb +10 -29
- data/lib/pubid/iso.rb +2 -188
- data/lib/pubid/itu/builder.rb +41 -230
- data/lib/pubid/itu/components/code.rb +12 -57
- data/lib/pubid/itu/components/sector.rb +4 -15
- data/lib/pubid/itu/components/series.rb +4 -0
- data/lib/pubid/itu/identifier.rb +51 -2
- data/lib/pubid/itu/identifiers/amendment.rb +31 -7
- data/lib/pubid/itu/identifiers/annex.rb +4 -13
- data/lib/pubid/itu/identifiers/base.rb +128 -456
- data/lib/pubid/itu/identifiers/combined_identifier.rb +25 -99
- data/lib/pubid/itu/identifiers/corrigendum.rb +25 -16
- data/lib/pubid/itu/identifiers/recommendation.rb +4 -3
- data/lib/pubid/itu/identifiers/special_publication.rb +3 -3
- data/lib/pubid/itu/identifiers/supplement.rb +16 -119
- data/lib/pubid/itu/identifiers.rb +1 -10
- data/lib/pubid/itu/model.rb +1 -1
- data/lib/pubid/itu/parser.rb +27 -481
- data/lib/pubid/itu/scheme.rb +174 -0
- data/lib/pubid/itu/urn_generator.rb +6 -36
- data/lib/pubid/itu.rb +2 -58
- data/lib/pubid/jcgm/builder.rb +19 -37
- data/lib/pubid/jcgm/identifier.rb +0 -10
- data/lib/pubid/jcgm/identifiers/amendment.rb +11 -0
- data/lib/pubid/jcgm/identifiers/gum_guide.rb +15 -3
- data/lib/pubid/jcgm/identifiers.rb +0 -2
- data/lib/pubid/jcgm/parser.rb +7 -74
- data/lib/pubid/jcgm/scheme.rb +60 -0
- data/lib/pubid/jcgm/single_identifier.rb +14 -84
- data/lib/pubid/jcgm/supplement_identifier.rb +4 -39
- data/lib/pubid/jcgm/urn_generator.rb +19 -25
- data/lib/pubid/jcgm.rb +2 -57
- data/lib/pubid/jis/builder.rb +52 -44
- data/lib/pubid/jis/components/code.rb +59 -0
- data/lib/pubid/{astm → jis}/components.rb +1 -1
- data/lib/pubid/jis/identifier.rb +5 -181
- data/lib/pubid/jis/identifiers/amendment.rb +1 -1
- data/lib/pubid/jis/identifiers/base.rb +72 -0
- data/lib/pubid/jis/identifiers/standard.rb +1 -2
- data/lib/pubid/jis/identifiers/technical_report.rb +1 -2
- data/lib/pubid/jis/identifiers/technical_specification.rb +1 -2
- data/lib/pubid/jis/identifiers.rb +1 -1
- data/lib/pubid/jis/parser.rb +6 -32
- data/lib/pubid/jis/scheme.rb +49 -0
- data/lib/pubid/jis/single_identifier.rb +12 -6
- data/lib/pubid/jis/supplement_identifier.rb +14 -17
- data/lib/pubid/jis.rb +2 -48
- data/lib/pubid/nist/builder.rb +1765 -146
- data/lib/pubid/nist/components/code.rb +20 -9
- data/lib/pubid/nist/components/edition.rb +0 -16
- data/lib/pubid/nist/components/publisher.rb +24 -0
- data/lib/pubid/nist/components/supplement.rb +21 -91
- data/lib/pubid/nist/components.rb +1 -0
- data/lib/pubid/nist/configuration.rb +2 -12
- data/lib/pubid/nist/identifiers/base.rb +417 -662
- data/lib/pubid/nist/identifiers/circular.rb +5 -17
- data/lib/pubid/nist/identifiers/circular_supplement.rb +6 -16
- data/lib/pubid/nist/identifiers/commercial_standard.rb +2 -3
- data/lib/pubid/nist/identifiers/commercial_standard_emergency.rb +5 -7
- data/lib/pubid/nist/identifiers/commercial_standards_monthly.rb +5 -18
- data/lib/pubid/nist/identifiers/crpl_report.rb +13 -16
- data/lib/pubid/nist/identifiers/federal_information_processing_standards.rb +17 -18
- data/lib/pubid/nist/identifiers/grant_contractor_report.rb +2 -3
- data/lib/pubid/nist/identifiers/handbook.rb +4 -12
- data/lib/pubid/nist/identifiers/internal_report.rb +7 -15
- data/lib/pubid/nist/identifiers/letter_circular.rb +2 -3
- data/lib/pubid/nist/identifiers/miscellaneous_publication.rb +11 -20
- data/lib/pubid/nist/identifiers/monograph.rb +11 -22
- data/lib/pubid/nist/identifiers/ncstar.rb +2 -2
- data/lib/pubid/nist/identifiers/nsrds.rb +1 -1
- data/lib/pubid/nist/identifiers/owmwp.rb +1 -1
- data/lib/pubid/nist/identifiers/report.rb +10 -19
- data/lib/pubid/nist/identifiers/special_publication.rb +2 -12
- data/lib/pubid/nist/identifiers/technical_note.rb +3 -4
- data/lib/pubid/nist/identifiers.rb +1 -1
- data/lib/pubid/nist/parser.rb +429 -97
- data/lib/pubid/nist/scheme.rb +199 -0
- data/lib/pubid/nist/supplement_identifier.rb +34 -35
- data/lib/pubid/nist/urn_generator.rb +8 -14
- data/lib/pubid/nist.rb +5 -107
- data/lib/pubid/oiml/builder.rb +10 -91
- data/lib/pubid/oiml/components/code.rb +0 -17
- data/lib/pubid/oiml/identifier.rb +0 -53
- data/lib/pubid/oiml/identifiers/annex.rb +46 -13
- data/lib/pubid/oiml/identifiers/base.rb +36 -0
- data/lib/pubid/oiml/identifiers/basic_publication.rb +0 -2
- data/lib/pubid/oiml/identifiers/document.rb +0 -2
- data/lib/pubid/oiml/identifiers/expert_report.rb +0 -2
- data/lib/pubid/oiml/identifiers/guide.rb +0 -2
- data/lib/pubid/oiml/identifiers/recommendation.rb +0 -2
- data/lib/pubid/oiml/identifiers/seminar_report.rb +0 -2
- data/lib/pubid/oiml/identifiers/vocabulary.rb +0 -2
- data/lib/pubid/oiml/identifiers.rb +1 -3
- data/lib/pubid/oiml/parser.rb +17 -118
- data/lib/pubid/oiml/scheme.rb +46 -0
- data/lib/pubid/oiml/single_identifier.rb +43 -66
- data/lib/pubid/oiml/supplement_identifier.rb +17 -62
- data/lib/pubid/oiml/urn_generator.rb +8 -22
- data/lib/pubid/oiml.rb +1 -56
- data/lib/pubid/parser.rb +0 -1
- data/lib/pubid/parsers/mr_string.rb +7 -120
- data/lib/pubid/plateau/builder.rb +4 -8
- data/lib/pubid/plateau/identifiers/base.rb +36 -40
- data/lib/pubid/plateau/identifiers/handbook.rb +7 -1
- data/lib/pubid/plateau/identifiers/technical_report.rb +5 -1
- data/lib/pubid/plateau/identifiers.rb +1 -0
- data/lib/pubid/plateau/parser.rb +6 -16
- data/lib/pubid/plateau/scheme.rb +45 -0
- data/lib/pubid/plateau/supplement_identifier.rb +15 -11
- data/lib/pubid/plateau.rb +1 -58
- data/lib/pubid/renderers/base.rb +0 -47
- data/lib/pubid/renderers/directives_renderer.rb +14 -27
- data/lib/pubid/renderers/guide_renderer.rb +1 -7
- data/lib/pubid/renderers/human_readable.rb +9 -34
- data/lib/pubid/renderers/iwa_renderer.rb +1 -5
- data/lib/pubid/renderers/mr_string.rb +6 -54
- data/lib/pubid/renderers/supplement_renderer.rb +2 -5
- data/lib/pubid/renderers.rb +0 -1
- data/lib/pubid/rendering/base.rb +73 -0
- data/lib/pubid/rendering/common.rb +211 -0
- data/lib/pubid/rendering/context.rb +21 -33
- data/lib/pubid/rendering/format.rb +25 -0
- data/lib/pubid/rendering/numbering.rb +7 -25
- data/lib/pubid/rendering/supplement.rb +4 -4
- data/lib/pubid/rendering.rb +3 -0
- data/lib/pubid/sae/builder.rb +1 -1
- data/lib/pubid/sae/components/date.rb +0 -8
- data/lib/pubid/sae/components/type.rb +1 -5
- data/lib/pubid/sae/identifier.rb +12 -2
- data/lib/pubid/sae/identifiers/base.rb +28 -33
- data/lib/pubid/sae/identifiers.rb +1 -0
- data/lib/pubid/sae/parser.rb +1 -1
- data/lib/pubid/sae/scheme.rb +47 -0
- data/lib/pubid/sae/urn_generator.rb +10 -2
- data/lib/pubid/sae.rb +2 -49
- data/lib/pubid/scheme.rb +207 -0
- data/lib/pubid/urn_generator/base.rb +12 -12
- data/lib/pubid/version.rb +1 -1
- data/lib/pubid.rb +10 -424
- data/lib/tasks/export.rake +5 -6
- data/lib/tasks/website-data.json +1796 -1854
- metadata +45 -307
- data/data/bipm/update_codes.yaml +0 -9
- data/data/nist/series.yaml +0 -155
- data/lib/pubid/adobe/builder.rb +0 -52
- data/lib/pubid/adobe/identifier.rb +0 -47
- data/lib/pubid/adobe/identifiers/publication.rb +0 -31
- data/lib/pubid/adobe/identifiers/tech_note.rb +0 -32
- data/lib/pubid/adobe/identifiers.rb +0 -10
- data/lib/pubid/adobe/parser.rb +0 -136
- data/lib/pubid/adobe/renderer.rb +0 -39
- data/lib/pubid/adobe/urn_generator.rb +0 -42
- data/lib/pubid/adobe/urn_parser.rb +0 -69
- data/lib/pubid/adobe.rb +0 -60
- data/lib/pubid/amca/renderer.rb +0 -82
- data/lib/pubid/amca/urn_parser.rb +0 -28
- data/lib/pubid/ansi/renderer.rb +0 -53
- data/lib/pubid/ansi/urn_parser.rb +0 -23
- data/lib/pubid/api/identifiers.rb +0 -18
- data/lib/pubid/api/renderer.rb +0 -98
- data/lib/pubid/api/urn_parser.rb +0 -35
- data/lib/pubid/ashrae/renderer.rb +0 -117
- data/lib/pubid/ashrae/urn_parser.rb +0 -27
- data/lib/pubid/asme/renderer.rb +0 -66
- data/lib/pubid/asme/urn_parser.rb +0 -31
- data/lib/pubid/astm/identifiers/code_number.rb +0 -81
- data/lib/pubid/astm/identifiers.rb +0 -19
- data/lib/pubid/astm/renderer.rb +0 -172
- data/lib/pubid/astm/urn_parser.rb +0 -30
- data/lib/pubid/bipm/builder.rb +0 -163
- data/lib/pubid/bipm/identifier.rb +0 -285
- data/lib/pubid/bipm/identifiers/committee_document.rb +0 -36
- data/lib/pubid/bipm/identifiers/guide.rb +0 -35
- data/lib/pubid/bipm/identifiers/meeting.rb +0 -53
- data/lib/pubid/bipm/identifiers/mep.rb +0 -33
- data/lib/pubid/bipm/identifiers/metrologia_article.rb +0 -48
- data/lib/pubid/bipm/identifiers/si_brochure.rb +0 -33
- data/lib/pubid/bipm/identifiers.rb +0 -15
- data/lib/pubid/bipm/parser.rb +0 -237
- data/lib/pubid/bipm/renderer.rb +0 -118
- data/lib/pubid/bipm/urn_generator.rb +0 -58
- data/lib/pubid/bipm/urn_parser.rb +0 -60
- data/lib/pubid/bipm.rb +0 -91
- data/lib/pubid/bsi/renderer.rb +0 -1064
- data/lib/pubid/bsi/urn_parser.rb +0 -52
- data/lib/pubid/calconnect/builder.rb +0 -38
- data/lib/pubid/calconnect/identifier.rb +0 -121
- data/lib/pubid/calconnect/identifiers/standard.rb +0 -29
- data/lib/pubid/calconnect/identifiers.rb +0 -9
- data/lib/pubid/calconnect/parser.rb +0 -54
- data/lib/pubid/calconnect/renderer.rb +0 -36
- data/lib/pubid/calconnect/urn_generator.rb +0 -33
- data/lib/pubid/calconnect/urn_parser.rb +0 -34
- data/lib/pubid/calconnect.rb +0 -82
- data/lib/pubid/ccsds/urn_parser.rb +0 -20
- data/lib/pubid/cen_cenelec/renderer.rb +0 -261
- data/lib/pubid/cen_cenelec/urn_parser.rb +0 -28
- data/lib/pubid/cie/identifiers/code_attributes.rb +0 -52
- data/lib/pubid/cie/identifiers/proceedings.rb +0 -41
- data/lib/pubid/cie/urn_parser.rb +0 -28
- data/lib/pubid/components/adoption.rb +0 -104
- data/lib/pubid/components/iteration.rb +0 -32
- data/lib/pubid/components/relationship.rb +0 -151
- data/lib/pubid/components/supplement.rb +0 -184
- data/lib/pubid/csa/renderer.rb +0 -300
- data/lib/pubid/csa/urn_parser.rb +0 -33
- data/lib/pubid/doi/builder.rb +0 -18
- data/lib/pubid/doi/identifier.rb +0 -49
- data/lib/pubid/doi/identifiers/resource.rb +0 -30
- data/lib/pubid/doi/identifiers.rb +0 -9
- data/lib/pubid/doi/parser.rb +0 -52
- data/lib/pubid/doi/renderer.rb +0 -13
- data/lib/pubid/doi.rb +0 -55
- data/lib/pubid/easc/builder.rb +0 -55
- data/lib/pubid/easc/identifier.rb +0 -59
- data/lib/pubid/easc/identifiers/pmg.rb +0 -20
- data/lib/pubid/easc/identifiers/rmg.rb +0 -19
- data/lib/pubid/easc/identifiers.rb +0 -10
- data/lib/pubid/easc/parser.rb +0 -88
- data/lib/pubid/easc/renderer.rb +0 -48
- data/lib/pubid/easc/urn_generator.rb +0 -46
- data/lib/pubid/easc/urn_parser.rb +0 -57
- data/lib/pubid/easc.rb +0 -52
- data/lib/pubid/ecma/builder.rb +0 -45
- data/lib/pubid/ecma/identifier.rb +0 -147
- data/lib/pubid/ecma/identifiers/memento.rb +0 -30
- data/lib/pubid/ecma/identifiers/standard.rb +0 -31
- data/lib/pubid/ecma/identifiers/technical_report.rb +0 -31
- data/lib/pubid/ecma/identifiers.rb +0 -11
- data/lib/pubid/ecma/parser.rb +0 -76
- data/lib/pubid/ecma/renderer.rb +0 -67
- data/lib/pubid/ecma/urn_generator.rb +0 -46
- data/lib/pubid/ecma/urn_parser.rb +0 -51
- data/lib/pubid/ecma.rb +0 -67
- data/lib/pubid/errors.rb +0 -79
- data/lib/pubid/etsi/renderer.rb +0 -48
- data/lib/pubid/etsi/urn_parser.rb +0 -34
- data/lib/pubid/gb/builder.rb +0 -45
- data/lib/pubid/gb/identifier.rb +0 -67
- data/lib/pubid/gb/identifiers/standard.rb +0 -34
- data/lib/pubid/gb/identifiers.rb +0 -9
- data/lib/pubid/gb/parser.rb +0 -63
- data/lib/pubid/gb/renderer.rb +0 -35
- data/lib/pubid/gb.rb +0 -87
- data/lib/pubid/gost/builder.rb +0 -148
- data/lib/pubid/gost/identifier.rb +0 -47
- data/lib/pubid/gost/identifiers/foreign_reference.rb +0 -25
- data/lib/pubid/gost/identifiers/harmonized.rb +0 -39
- data/lib/pubid/gost/identifiers/identical_adoption.rb +0 -39
- data/lib/pubid/gost/identifiers/interstate_standard.rb +0 -20
- data/lib/pubid/gost/identifiers/national_standard.rb +0 -19
- data/lib/pubid/gost/identifiers.rb +0 -13
- data/lib/pubid/gost/parser.rb +0 -105
- data/lib/pubid/gost/renderer.rb +0 -48
- data/lib/pubid/gost/urn_generator.rb +0 -46
- data/lib/pubid/gost/urn_parser.rb +0 -52
- data/lib/pubid/gost.rb +0 -49
- data/lib/pubid/iala/builder.rb +0 -102
- data/lib/pubid/iala/identifier.rb +0 -90
- data/lib/pubid/iala/identifiers/advice.rb +0 -15
- data/lib/pubid/iala/identifiers/annex.rb +0 -57
- data/lib/pubid/iala/identifiers/general_assembly.rb +0 -19
- data/lib/pubid/iala/identifiers/guideline.rb +0 -17
- data/lib/pubid/iala/identifiers/letter.rb +0 -16
- data/lib/pubid/iala/identifiers/manual.rb +0 -18
- data/lib/pubid/iala/identifiers/model_course.rb +0 -17
- data/lib/pubid/iala/identifiers/recommendation.rb +0 -17
- data/lib/pubid/iala/identifiers/report.rb +0 -16
- data/lib/pubid/iala/identifiers/resolution.rb +0 -16
- data/lib/pubid/iala/identifiers/standard.rb +0 -17
- data/lib/pubid/iala/identifiers.rb +0 -19
- data/lib/pubid/iala/parser.rb +0 -138
- data/lib/pubid/iala/renderer.rb +0 -36
- data/lib/pubid/iala/urn_generator.rb +0 -49
- data/lib/pubid/iala/urn_parser.rb +0 -67
- data/lib/pubid/iala.rb +0 -71
- data/lib/pubid/iana/builder.rb +0 -22
- data/lib/pubid/iana/identifier.rb +0 -140
- data/lib/pubid/iana/identifiers/registry.rb +0 -69
- data/lib/pubid/iana/identifiers.rb +0 -9
- data/lib/pubid/iana/parser.rb +0 -38
- data/lib/pubid/iana/renderer.rb +0 -32
- data/lib/pubid/iana/urn_generator.rb +0 -19
- data/lib/pubid/iana/urn_parser.rb +0 -24
- data/lib/pubid/iana.rb +0 -69
- data/lib/pubid/idf/renderer.rb +0 -84
- data/lib/pubid/idf/urn_parser.rb +0 -25
- data/lib/pubid/iec/components.rb +0 -14
- data/lib/pubid/iec/identifiers/technical_group.rb +0 -30
- data/lib/pubid/iec/identifiers.rb +0 -31
- data/lib/pubid/iec/renderer.rb +0 -267
- data/lib/pubid/ieee/compaction.rb +0 -121
- data/lib/pubid/ieee/identifiers/amendment.rb +0 -40
- data/lib/pubid/ieee/identifiers/code_number.rb +0 -82
- data/lib/pubid/ieee/identifiers/nesc/edition.rb +0 -32
- data/lib/pubid/ieee/pre_parser.rb +0 -301
- data/lib/pubid/ieee/renderer.rb +0 -408
- data/lib/pubid/ieee/urn_parser.rb +0 -34
- data/lib/pubid/ietf/builder.rb +0 -78
- data/lib/pubid/ietf/identifier.rb +0 -5
- data/lib/pubid/ietf/identifiers/base.rb +0 -72
- data/lib/pubid/ietf/identifiers/bcp.rb +0 -36
- data/lib/pubid/ietf/identifiers/fyi.rb +0 -36
- data/lib/pubid/ietf/identifiers/internet_draft.rb +0 -45
- data/lib/pubid/ietf/identifiers/rfc.rb +0 -27
- data/lib/pubid/ietf/identifiers/serialization.rb +0 -51
- data/lib/pubid/ietf/identifiers/std.rb +0 -36
- data/lib/pubid/ietf/identifiers.rb +0 -14
- data/lib/pubid/ietf/parser.rb +0 -61
- data/lib/pubid/ietf/renderer.rb +0 -64
- data/lib/pubid/ietf/urn_generator.rb +0 -37
- data/lib/pubid/ietf/urn_parser.rb +0 -43
- data/lib/pubid/ietf.rb +0 -85
- data/lib/pubid/iho/renderer.rb +0 -30
- data/lib/pubid/iho/urn_parser.rb +0 -58
- data/lib/pubid/isbn/builder.rb +0 -44
- data/lib/pubid/isbn/check_digit.rb +0 -53
- data/lib/pubid/isbn/identifier.rb +0 -81
- data/lib/pubid/isbn/identifiers/book.rb +0 -30
- data/lib/pubid/isbn/identifiers.rb +0 -9
- data/lib/pubid/isbn/parser.rb +0 -45
- data/lib/pubid/isbn/renderer.rb +0 -16
- data/lib/pubid/isbn.rb +0 -52
- data/lib/pubid/iso/normalizer.rb +0 -89
- data/lib/pubid/itu/components/designation.rb +0 -35
- data/lib/pubid/itu/components.rb +0 -12
- data/lib/pubid/itu/identifiers/addendum.rb +0 -15
- data/lib/pubid/itu/identifiers/annex_of_recommendation.rb +0 -87
- data/lib/pubid/itu/identifiers/appendix_of_recommendation.rb +0 -92
- data/lib/pubid/itu/identifiers/errata.rb +0 -15
- data/lib/pubid/itu/identifiers/handbook.rb +0 -38
- data/lib/pubid/itu/identifiers/question.rb +0 -63
- data/lib/pubid/itu/identifiers/report.rb +0 -39
- data/lib/pubid/itu/identifiers/standard_serialization.rb +0 -58
- data/lib/pubid/itu/urn_parser.rb +0 -31
- data/lib/pubid/jcgm/identifiers/corrigendum.rb +0 -34
- data/lib/pubid/jcgm/identifiers/meeting.rb +0 -47
- data/lib/pubid/jcgm/renderer.rb +0 -89
- data/lib/pubid/jcgm/urn_parser.rb +0 -177
- data/lib/pubid/jis/identifiers/corrigendum.rb +0 -16
- data/lib/pubid/jis/renderer.rb +0 -69
- data/lib/pubid/jis/urn_parser.rb +0 -23
- data/lib/pubid/nist/caster.rb +0 -1234
- data/lib/pubid/nist/circular_supplement_builder.rb +0 -293
- data/lib/pubid/nist/identifier.rb +0 -8
- data/lib/pubid/nist/identifiers/dated_document.rb +0 -49
- data/lib/pubid/nist/parser_output_normalizer.rb +0 -233
- data/lib/pubid/nist/preprocessor.rb +0 -443
- data/lib/pubid/nist/renderer.rb +0 -43
- data/lib/pubid/nist/router.rb +0 -149
- data/lib/pubid/nist/series/base.rb +0 -58
- data/lib/pubid/nist/series/crpl.rb +0 -13
- data/lib/pubid/nist/series/fips.rb +0 -14
- data/lib/pubid/nist/series/ir.rb +0 -57
- data/lib/pubid/nist/series/letter_preserving.rb +0 -15
- data/lib/pubid/nist/series/mono.rb +0 -19
- data/lib/pubid/nist/series/ncstar.rb +0 -20
- data/lib/pubid/nist/series.rb +0 -49
- data/lib/pubid/nist/urn_parser.rb +0 -67
- data/lib/pubid/oasis/builder.rb +0 -79
- data/lib/pubid/oasis/identifier.rb +0 -160
- data/lib/pubid/oasis/identifiers/standard.rb +0 -29
- data/lib/pubid/oasis/identifiers.rb +0 -9
- data/lib/pubid/oasis/parser.rb +0 -34
- data/lib/pubid/oasis/renderer.rb +0 -29
- data/lib/pubid/oasis/urn_generator.rb +0 -25
- data/lib/pubid/oasis/urn_parser.rb +0 -22
- data/lib/pubid/oasis.rb +0 -79
- data/lib/pubid/ogc/builder.rb +0 -33
- data/lib/pubid/ogc/identifier.rb +0 -81
- data/lib/pubid/ogc/identifiers/document.rb +0 -26
- data/lib/pubid/ogc/identifiers.rb +0 -10
- data/lib/pubid/ogc/parser.rb +0 -40
- data/lib/pubid/ogc/renderer.rb +0 -33
- data/lib/pubid/ogc/urn_generator.rb +0 -14
- data/lib/pubid/ogc/urn_parser.rb +0 -22
- data/lib/pubid/ogc.rb +0 -71
- data/lib/pubid/oiml/identifiers/bulletin.rb +0 -137
- data/lib/pubid/oiml/identifiers/code_number.rb +0 -90
- data/lib/pubid/oiml/identifiers/errata.rb +0 -15
- data/lib/pubid/oiml/renderer.rb +0 -232
- data/lib/pubid/oiml/urn_parser.rb +0 -39
- data/lib/pubid/omg/builder.rb +0 -19
- data/lib/pubid/omg/identifier.rb +0 -47
- data/lib/pubid/omg/identifiers/specification.rb +0 -32
- data/lib/pubid/omg/identifiers.rb +0 -9
- data/lib/pubid/omg/parser.rb +0 -40
- data/lib/pubid/omg/renderer.rb +0 -19
- data/lib/pubid/omg.rb +0 -51
- data/lib/pubid/parser/grammar.rb +0 -74
- data/lib/pubid/plateau/identifier.rb +0 -4
- data/lib/pubid/plateau/renderer.rb +0 -51
- data/lib/pubid/plateau/urn_parser.rb +0 -43
- data/lib/pubid/prefixes_support.rb +0 -51
- data/lib/pubid/renderers/annotator.rb +0 -233
- data/lib/pubid/sae/renderer.rb +0 -36
- data/lib/pubid/sae/urn_parser.rb +0 -36
- data/lib/pubid/tgpp/builder.rb +0 -41
- data/lib/pubid/tgpp/identifier.rb +0 -107
- data/lib/pubid/tgpp/identifiers/technical_report.rb +0 -32
- data/lib/pubid/tgpp/identifiers/technical_specification.rb +0 -33
- data/lib/pubid/tgpp/identifiers.rb +0 -11
- data/lib/pubid/tgpp/parser.rb +0 -78
- data/lib/pubid/tgpp/renderer.rb +0 -52
- data/lib/pubid/tgpp/urn_generator.rb +0 -39
- data/lib/pubid/tgpp/urn_parser.rb +0 -30
- data/lib/pubid/tgpp.rb +0 -83
- data/lib/pubid/type_resolver.rb +0 -59
- data/lib/pubid/un/builder.rb +0 -42
- data/lib/pubid/un/identifier.rb +0 -40
- data/lib/pubid/un/identifiers/document.rb +0 -24
- data/lib/pubid/un/identifiers.rb +0 -9
- data/lib/pubid/un/parser.rb +0 -25
- data/lib/pubid/un/renderer.rb +0 -11
- data/lib/pubid/un.rb +0 -46
- data/lib/pubid/urn_parser/base.rb +0 -81
- data/lib/pubid/urn_parser/errors.rb +0 -16
- data/lib/pubid/urn_parser.rb +0 -14
- data/lib/pubid/w3c/builder.rb +0 -55
- data/lib/pubid/w3c/identifier.rb +0 -130
- data/lib/pubid/w3c/identifiers/candidate_recommendation.rb +0 -31
- data/lib/pubid/w3c/identifiers/candidate_recommendation_draft.rb +0 -31
- data/lib/pubid/w3c/identifiers/draft_note.rb +0 -31
- data/lib/pubid/w3c/identifiers/note.rb +0 -30
- data/lib/pubid/w3c/identifiers/obsolete_recommendation.rb +0 -31
- data/lib/pubid/w3c/identifiers/proposed_edited_recommendation.rb +0 -31
- data/lib/pubid/w3c/identifiers/proposed_recommendation.rb +0 -31
- data/lib/pubid/w3c/identifiers/recommendation.rb +0 -31
- data/lib/pubid/w3c/identifiers/standard.rb +0 -12
- data/lib/pubid/w3c/identifiers/superseded_recommendation.rb +0 -31
- data/lib/pubid/w3c/identifiers/working_draft.rb +0 -30
- data/lib/pubid/w3c/identifiers.rb +0 -25
- data/lib/pubid/w3c/parser.rb +0 -43
- data/lib/pubid/w3c/renderer.rb +0 -35
- data/lib/pubid/w3c/urn_generator.rb +0 -18
- data/lib/pubid/w3c/urn_parser.rb +0 -36
- data/lib/pubid/w3c.rb +0 -67
- data/lib/pubid/xsf/builder.rb +0 -17
- data/lib/pubid/xsf/identifier.rb +0 -66
- data/lib/pubid/xsf/identifiers/xep.rb +0 -31
- data/lib/pubid/xsf/identifiers.rb +0 -9
- data/lib/pubid/xsf/parser.rb +0 -25
- data/lib/pubid/xsf/renderer.rb +0 -23
- data/lib/pubid/xsf/urn_generator.rb +0 -13
- data/lib/pubid/xsf/urn_parser.rb +0 -18
- data/lib/pubid/xsf.rb +0 -81
|
@@ -7,7 +7,7 @@ module Pubid
|
|
|
7
7
|
# Examples:
|
|
8
8
|
# - "NBS CIRC 13e2revJune1908" = Circular 13, edition 2, revised June 1908
|
|
9
9
|
# - "NBS CIRC 13" = Circular 13
|
|
10
|
-
class Circular <
|
|
10
|
+
class Circular < Base
|
|
11
11
|
TYPED_STAGES = [
|
|
12
12
|
Pubid::Components::TypedStage.new(
|
|
13
13
|
abbr: ["CIRC", "NBS CIRC"],
|
|
@@ -22,8 +22,7 @@ module Pubid
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def type
|
|
25
|
-
{ key: :circ,
|
|
26
|
-
web: :circular, title: "NBS Circular", short: "CIRC" }
|
|
25
|
+
{ key: :circ, title: "NBS Circular", short: "CIRC" }
|
|
27
26
|
end
|
|
28
27
|
end
|
|
29
28
|
|
|
@@ -42,25 +41,14 @@ module Pubid
|
|
|
42
41
|
super&.to_s || default_publisher
|
|
43
42
|
end
|
|
44
43
|
|
|
45
|
-
# Return the stored Code, or a default Code built from series_code when
|
|
46
|
-
# unset. Must return Components::Code (not a String): the lutaml-model
|
|
47
|
-
# key-value serializer reads attributes through this public getter, so a
|
|
48
|
-
# String here breaks to_hash for the Code-typed :series attribute.
|
|
49
44
|
def series
|
|
50
|
-
super ||
|
|
45
|
+
super&.to_s || series_code
|
|
51
46
|
end
|
|
52
47
|
|
|
53
48
|
# Override to_s for CIRC-specific edition+year rendering
|
|
54
49
|
# CIRC uses dot notation: "NBS CIRC 11e2.1915" instead of "NBS CIRC 11e2-1915"
|
|
55
50
|
def to_s(format = nil)
|
|
56
|
-
|
|
57
|
-
# string: with the flag set, `super` returns a string ending in
|
|
58
|
-
# "</span>" and the anchor no longer matches. Render plain, rewrite,
|
|
59
|
-
# then annotate.
|
|
60
|
-
annotated = format.is_a?(Hash) ? format[:annotated] : nil
|
|
61
|
-
format = format[:format] if format.is_a?(Hash)
|
|
62
|
-
|
|
63
|
-
result = super(format)
|
|
51
|
+
result = super
|
|
64
52
|
|
|
65
53
|
# For CIRC edition patterns with additional_text (year), render with dot notation
|
|
66
54
|
# "11e2-1915" format: edition.id="2", additional_text="1915" → render as "11e2.1915"
|
|
@@ -72,7 +60,7 @@ module Pubid
|
|
|
72
60
|
"e#{edition.id || '?'}.#{edition.additional_text}")
|
|
73
61
|
end
|
|
74
62
|
|
|
75
|
-
|
|
63
|
+
result
|
|
76
64
|
end
|
|
77
65
|
end
|
|
78
66
|
end
|
|
@@ -27,8 +27,7 @@ module Pubid
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def type
|
|
30
|
-
{ key: :circ_supp,
|
|
31
|
-
web: :circular_supplement, title: "NBS Circular Supplement", short: "CIRC" }
|
|
30
|
+
{ key: :circ_supp, title: "NBS Circular Supplement", short: "CIRC" }
|
|
32
31
|
end
|
|
33
32
|
end
|
|
34
33
|
|
|
@@ -37,22 +36,13 @@ module Pubid
|
|
|
37
36
|
attribute :implicit_supplement, :boolean # true for implicit supplements (e.g., "145r11/1925")
|
|
38
37
|
|
|
39
38
|
def to_s(format = :short)
|
|
40
|
-
# A caller passing `annotated:` reaches this positional parameter as a
|
|
41
|
-
# Hash. Normalise it away before `super`, so the annotation is applied
|
|
42
|
-
# once, here, and covers the date-range branch too — that branch
|
|
43
|
-
# returns a hand-composed string and never reached `super` at all.
|
|
44
|
-
annotated = format.is_a?(Hash) ? format[:annotated] : nil
|
|
45
|
-
format = format[:format] || :short if format.is_a?(Hash)
|
|
46
|
-
|
|
47
39
|
# Handle date range supplements (no base identifier)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
# Use parent's rendering for base + supplement
|
|
52
|
-
super(format)
|
|
53
|
-
end
|
|
40
|
+
if supplement_date_range_start && supplement_date_range_end
|
|
41
|
+
return "NBS CIRC supp#{supplement_date_range_start}-#{supplement_date_range_end}"
|
|
42
|
+
end
|
|
54
43
|
|
|
55
|
-
|
|
44
|
+
# Use parent's rendering for base + supplement
|
|
45
|
+
super
|
|
56
46
|
end
|
|
57
47
|
end
|
|
58
48
|
end
|
|
@@ -9,7 +9,7 @@ module Pubid
|
|
|
9
9
|
# - "NBS CS 102" - Basic commercial standard
|
|
10
10
|
# - "NBS CS 102E-42" - With letter suffix and number
|
|
11
11
|
# - "CS 190-58" - With year
|
|
12
|
-
class CommercialStandard <
|
|
12
|
+
class CommercialStandard < Base
|
|
13
13
|
TYPED_STAGES = [
|
|
14
14
|
Pubid::Components::TypedStage.new(
|
|
15
15
|
abbr: ["CS", "NBS CS"],
|
|
@@ -24,8 +24,7 @@ module Pubid
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def type
|
|
27
|
-
{ key: :cs,
|
|
28
|
-
web: :commercial_standard, title: "Commercial Standard", short: "CS" }
|
|
27
|
+
{ key: :cs, title: "Commercial Standard", short: "CS" }
|
|
29
28
|
end
|
|
30
29
|
end
|
|
31
30
|
|
|
@@ -6,7 +6,7 @@ module Pubid
|
|
|
6
6
|
# NBS Commercial Standard (Emergency) Identifier
|
|
7
7
|
# Format: NBS CS eNNN-YY where NNN is edition number, YY is 2-digit year
|
|
8
8
|
# Example: "NBS CS e104-43" = Commercial Standard Emergency edition 104, year 1943
|
|
9
|
-
class CommercialStandardEmergency <
|
|
9
|
+
class CommercialStandardEmergency < Base
|
|
10
10
|
TYPED_STAGES = [
|
|
11
11
|
Pubid::Components::TypedStage.new(
|
|
12
12
|
abbr: ["CS-E", "NBS CS-E"],
|
|
@@ -21,8 +21,7 @@ module Pubid
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def type
|
|
24
|
-
{ key: :cse,
|
|
25
|
-
web: :commercial_standard_emergency, title: "NBS Commercial Standard Emergency",
|
|
24
|
+
{ key: :cse, title: "NBS Commercial Standard Emergency",
|
|
26
25
|
short: "CS-E" }
|
|
27
26
|
end
|
|
28
27
|
end
|
|
@@ -31,7 +30,7 @@ module Pubid
|
|
|
31
30
|
"CS-E"
|
|
32
31
|
end
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
private
|
|
35
34
|
|
|
36
35
|
def to_short_style
|
|
37
36
|
result = ""
|
|
@@ -46,9 +45,8 @@ module Pubid
|
|
|
46
45
|
# Number (already extracted from e104 → 104 in builder)
|
|
47
46
|
result += " #{number.value}" if number
|
|
48
47
|
|
|
49
|
-
# Edition (e1943 for e104-43 pattern)
|
|
50
|
-
|
|
51
|
-
result += append_short_components
|
|
48
|
+
# Edition (e1943 for e104-43 pattern)
|
|
49
|
+
result += edition.to_s if edition
|
|
52
50
|
|
|
53
51
|
result
|
|
54
52
|
end
|
|
@@ -6,7 +6,7 @@ module Pubid
|
|
|
6
6
|
# NBS Commercial Standards Monthly Identifier
|
|
7
7
|
# Format: NBS CSM N where N is simple number
|
|
8
8
|
# Example: "NBS CSM 1", "NBS CSM 40"
|
|
9
|
-
class CommercialStandardsMonthly <
|
|
9
|
+
class CommercialStandardsMonthly < Base
|
|
10
10
|
TYPED_STAGES = [
|
|
11
11
|
Pubid::Components::TypedStage.new(
|
|
12
12
|
abbr: ["CSM", "NBS CSM"],
|
|
@@ -21,8 +21,7 @@ module Pubid
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def type
|
|
24
|
-
{ key: :csm,
|
|
25
|
-
web: :commercial_standards_monthly, title: "Commercial Standards Monthly", short: "CSM" }
|
|
24
|
+
{ key: :csm, title: "Commercial Standards Monthly", short: "CSM" }
|
|
26
25
|
end
|
|
27
26
|
end
|
|
28
27
|
|
|
@@ -30,23 +29,11 @@ module Pubid
|
|
|
30
29
|
"NBS"
|
|
31
30
|
end
|
|
32
31
|
|
|
33
|
-
# Always the normalized "CSM" code, regardless of the parsed series
|
|
34
|
-
# (CS vNnN variants are routed here and stored with series "CS", but
|
|
35
|
-
# must still render/serialize as CSM). Returns a Components::Code (not a
|
|
36
|
-
# bare String): the lutaml-model key-value serializer reads attributes
|
|
37
|
-
# through this public getter, so a String breaks to_hash for the
|
|
38
|
-
# Code-typed :series attribute.
|
|
39
32
|
def series
|
|
40
|
-
|
|
33
|
+
"CSM"
|
|
41
34
|
end
|
|
42
35
|
|
|
43
|
-
def to_s
|
|
44
|
-
# A caller passing `annotated:` reaches this positional parameter as
|
|
45
|
-
# a Hash — Ruby converts keywords for a method that accepts none.
|
|
46
|
-
# The same idiom `Identifiers::Base#to_s` uses. This renderer
|
|
47
|
-
# ignores `format`, so only the flag is read.
|
|
48
|
-
annotated = format.is_a?(Hash) ? format[:annotated] : nil
|
|
49
|
-
|
|
36
|
+
def to_s
|
|
50
37
|
result = "#{publisher} #{series}"
|
|
51
38
|
|
|
52
39
|
# Proper Volume and Part components
|
|
@@ -61,7 +48,7 @@ module Pubid
|
|
|
61
48
|
result += " #{vol_str}n#{issue_number.number}"
|
|
62
49
|
end
|
|
63
50
|
|
|
64
|
-
|
|
51
|
+
result
|
|
65
52
|
end
|
|
66
53
|
end
|
|
67
54
|
end
|
|
@@ -8,7 +8,7 @@ module Pubid
|
|
|
8
8
|
# - "NBS CRPL 1-2_3-1" = Reports 1-2 and 3-1 jointly
|
|
9
9
|
# - "NBS CRPL 4-m-5" = Report 4, month m, issue 5
|
|
10
10
|
# - "NBS CRPL c4-4" = Report c4, issue 4
|
|
11
|
-
class CrplReport <
|
|
11
|
+
class CrplReport < Base
|
|
12
12
|
TYPED_STAGES = [
|
|
13
13
|
Pubid::Components::TypedStage.new(
|
|
14
14
|
abbr: ["CRPL", "NBS CRPL", "CRPL-F-B", "CRPL-F-A", "NBS CRPL-F-B",
|
|
@@ -24,8 +24,7 @@ module Pubid
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def type
|
|
27
|
-
{ key: :crpl,
|
|
28
|
-
web: :crpl_report, title: "NBS CRPL Report", short: "CRPL" }
|
|
27
|
+
{ key: :crpl, title: "NBS CRPL Report", short: "CRPL" }
|
|
29
28
|
end
|
|
30
29
|
end
|
|
31
30
|
|
|
@@ -84,16 +83,10 @@ module Pubid
|
|
|
84
83
|
end
|
|
85
84
|
|
|
86
85
|
# Return new Code object with normalized value
|
|
87
|
-
Components::Code.new(
|
|
86
|
+
Components::Code.new(number: num_value)
|
|
88
87
|
end
|
|
89
88
|
|
|
90
|
-
def to_s
|
|
91
|
-
# A caller passing `annotated:` reaches this positional parameter as
|
|
92
|
-
# a Hash — Ruby converts keywords for a method that accepts none.
|
|
93
|
-
# The same idiom `Identifiers::Base#to_s` uses. This renderer
|
|
94
|
-
# ignores `format`, so only the flag is read.
|
|
95
|
-
annotated = format.is_a?(Hash) ? format[:annotated] : nil
|
|
96
|
-
|
|
89
|
+
def to_s
|
|
97
90
|
# Use actual series attribute if it contains subseries (e.g., "CRPL-F-B")
|
|
98
91
|
# Otherwise use default series_code ("CRPL")
|
|
99
92
|
series_to_render = if series&.value&.include?("CRPL-F-")
|
|
@@ -124,13 +117,17 @@ module Pubid
|
|
|
124
117
|
result += " #{num_value}"
|
|
125
118
|
end
|
|
126
119
|
|
|
127
|
-
#
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
120
|
+
# Add part component (pt3-1)
|
|
121
|
+
result += part.to_s if part
|
|
122
|
+
|
|
123
|
+
# Add supplement with "sup" prefix for CRPL identifiers
|
|
124
|
+
if supplement
|
|
125
|
+
# Check if supplement already has "sup" prefix (for backward compatibility)
|
|
126
|
+
result += (supplement.start_with?("sup") ? supplement : "sup#{supplement}")
|
|
127
|
+
end
|
|
131
128
|
|
|
132
129
|
result += range_notation if range_notation
|
|
133
|
-
|
|
130
|
+
result
|
|
134
131
|
end
|
|
135
132
|
end
|
|
136
133
|
end
|
|
@@ -7,7 +7,7 @@ module Pubid
|
|
|
7
7
|
# Examples:
|
|
8
8
|
# - "FIPS 140-3" (no NIST prefix)
|
|
9
9
|
# - "NIST FIPS 140-3" (also accepted, normalizes to FIPS 140-3)
|
|
10
|
-
class FederalInformationProcessingStandards <
|
|
10
|
+
class FederalInformationProcessingStandards < Base
|
|
11
11
|
TYPED_STAGES = [
|
|
12
12
|
Pubid::Components::TypedStage.new(
|
|
13
13
|
abbr: ["FIPS", "NIST FIPS"],
|
|
@@ -22,8 +22,7 @@ module Pubid
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def type
|
|
25
|
-
{ key: :fips,
|
|
26
|
-
web: :federal_information_processing_standards, title: "Federal Information Processing Standards",
|
|
25
|
+
{ key: :fips, title: "Federal Information Processing Standards",
|
|
27
26
|
short: "FIPS" }
|
|
28
27
|
end
|
|
29
28
|
end
|
|
@@ -42,20 +41,21 @@ module Pubid
|
|
|
42
41
|
# "FIPS.46e1977" (machine-readable with dots, no publisher prefix)
|
|
43
42
|
# Note: edition is appended directly to number without dot for FIPS
|
|
44
43
|
result = series_code
|
|
45
|
-
result += ".#{number}" if number
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
if number
|
|
46
|
+
result += ".#{number}"
|
|
47
|
+
# Append edition directly to number (no dot) for FIPS MR format
|
|
48
|
+
if edition
|
|
49
|
+
result += edition.to_s
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
52
|
|
|
53
|
-
result +=
|
|
53
|
+
result += parts.map { |p| "-#{p}" }.join if parts&.any?
|
|
54
54
|
|
|
55
55
|
result
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
private
|
|
59
59
|
|
|
60
60
|
def to_short_style
|
|
61
61
|
# FIPS format: "FIPS 14e1971" or "NIST FIPS 140-3" (preserve publisher if set)
|
|
@@ -77,16 +77,15 @@ module Pubid
|
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
-
# FIPS uses dash notation for parts: -1, -2, -3 (not pt1, pt2, pt3)
|
|
81
|
-
# so render the part here and skip the generic part rendering in the
|
|
82
|
-
# shared tail. The tail still appends volume, edition, version,
|
|
83
|
-
# supplement, update, etc. — components FIPS previously dropped.
|
|
80
|
+
# FIPS uses dash notation for parts: -1, -2, -3 (not pt1, pt2, pt3)
|
|
84
81
|
if part.is_a?(Components::Part)
|
|
85
82
|
result += "-#{part.value}"
|
|
86
83
|
end
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
# Render edition for FIPS
|
|
85
|
+
# FIPS editions use "e" prefix: e1971, e198503, e19770930
|
|
86
|
+
if edition
|
|
87
|
+
result += "#{edition.type}#{edition.id}"
|
|
88
|
+
end
|
|
90
89
|
result
|
|
91
90
|
end
|
|
92
91
|
end
|
|
@@ -7,7 +7,7 @@ module Pubid
|
|
|
7
7
|
# Examples:
|
|
8
8
|
# - "NIST GCR 17-917-45" - Basic 3-part number
|
|
9
9
|
# - "NIST GCR 21-917-48v3B" - With volume and letter suffix
|
|
10
|
-
class GrantContractorReport <
|
|
10
|
+
class GrantContractorReport < Base
|
|
11
11
|
TYPED_STAGES = [
|
|
12
12
|
Pubid::Components::TypedStage.new(
|
|
13
13
|
abbr: ["GCR", "NIST GCR"],
|
|
@@ -22,8 +22,7 @@ module Pubid
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def type
|
|
25
|
-
{ key: :gcr,
|
|
26
|
-
web: :grant_contractor_report, title: "NIST Grant/Contractor Report", short: "GCR" }
|
|
25
|
+
{ key: :gcr, title: "NIST Grant/Contractor Report", short: "GCR" }
|
|
27
26
|
end
|
|
28
27
|
end
|
|
29
28
|
|
|
@@ -7,7 +7,7 @@ module Pubid
|
|
|
7
7
|
# Examples:
|
|
8
8
|
# - "NIST HB 130" = Handbook 130
|
|
9
9
|
# - "NBS HB 133" = NBS Handbook 133
|
|
10
|
-
class Handbook <
|
|
10
|
+
class Handbook < Base
|
|
11
11
|
TYPED_STAGES = [
|
|
12
12
|
Pubid::Components::TypedStage.new(
|
|
13
13
|
abbr: ["HB", "NIST HB", "NBS HB"],
|
|
@@ -22,8 +22,7 @@ module Pubid
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def type
|
|
25
|
-
{ key: :hb,
|
|
26
|
-
web: :handbook, title: "NIST Handbook", short: "HB" }
|
|
25
|
+
{ key: :hb, title: "NIST Handbook", short: "HB" }
|
|
27
26
|
end
|
|
28
27
|
end
|
|
29
28
|
|
|
@@ -34,15 +33,8 @@ module Pubid
|
|
|
34
33
|
# Override to_s to handle edition+year pattern with dash instead of dot
|
|
35
34
|
# Pattern: "44e2-1955" (dash separator) not "44e2.1955" (dot separator)
|
|
36
35
|
def to_s(format = nil)
|
|
37
|
-
# The rewrite below is `$`-anchored, so it has to run on the PLAIN
|
|
38
|
-
# string: with the flag set, `super` returns a string ending in
|
|
39
|
-
# "</span>" and the anchor no longer matches. Render plain, rewrite,
|
|
40
|
-
# then annotate.
|
|
41
|
-
annotated = format.is_a?(Hash) ? format[:annotated] : nil
|
|
42
|
-
format = format[:format] if format.is_a?(Hash)
|
|
43
|
-
|
|
44
36
|
# Use the base to_s method first
|
|
45
|
-
result = super
|
|
37
|
+
result = super
|
|
46
38
|
|
|
47
39
|
# If edition has additional_text (year), replace dot with dash
|
|
48
40
|
if edition&.additional_text && !edition.additional_text.empty?
|
|
@@ -50,7 +42,7 @@ module Pubid
|
|
|
50
42
|
"#{edition.type}#{edition.id}-#{edition.additional_text}")
|
|
51
43
|
end
|
|
52
44
|
|
|
53
|
-
|
|
45
|
+
result
|
|
54
46
|
end
|
|
55
47
|
end
|
|
56
48
|
end
|
|
@@ -8,7 +8,7 @@ module Pubid
|
|
|
8
8
|
# - "NIST IR 8115" = Interagency Report 8115
|
|
9
9
|
# - "NIST IR 8115r1" = Interagency Report 8115 revision 1
|
|
10
10
|
# - "NBS IR 73-197" = NBS Interagency Report 73-197
|
|
11
|
-
class InteragencyReport <
|
|
11
|
+
class InteragencyReport < Base
|
|
12
12
|
TYPED_STAGES = [
|
|
13
13
|
Pubid::Components::TypedStage.new(
|
|
14
14
|
abbr: ["IR", "NIST IR", "NBS IR"],
|
|
@@ -23,8 +23,7 @@ module Pubid
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def type
|
|
26
|
-
{ key: :ir,
|
|
27
|
-
web: :interagency_report, title: "NIST Interagency Report", short: "IR" }
|
|
26
|
+
{ key: :ir, title: "NIST Interagency Report", short: "IR" }
|
|
28
27
|
end
|
|
29
28
|
end
|
|
30
29
|
|
|
@@ -37,11 +36,6 @@ module Pubid
|
|
|
37
36
|
# @param format [Symbol, Hash, nil] output format
|
|
38
37
|
# @return [String] formatted identifier
|
|
39
38
|
def to_s(format = nil)
|
|
40
|
-
# `super` is handed a SYMBOL below, so the base's annotation hook
|
|
41
|
-
# never sees the flag. Capture it here and wrap what comes back —
|
|
42
|
-
# exactly once, because the base returned plain text.
|
|
43
|
-
annotated = format.is_a?(Hash) ? format[:annotated] : nil
|
|
44
|
-
|
|
45
39
|
# Handle both keyword argument (hash) and positional argument (symbol/string)
|
|
46
40
|
effective_format = if format.is_a?(Hash)
|
|
47
41
|
format[:format]
|
|
@@ -50,13 +44,11 @@ module Pubid
|
|
|
50
44
|
end
|
|
51
45
|
|
|
52
46
|
# If explicit format is specified, use it. Otherwise, default to short.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
annotate_plain_render(rendered, annotated: annotated)
|
|
47
|
+
if effective_format.nil?
|
|
48
|
+
super(:short)
|
|
49
|
+
else
|
|
50
|
+
super(effective_format)
|
|
51
|
+
end
|
|
60
52
|
end
|
|
61
53
|
end
|
|
62
54
|
end
|
|
@@ -11,7 +11,7 @@ module Pubid
|
|
|
11
11
|
# - "NBS LC 378sup12/1926" - With supplement date
|
|
12
12
|
# - "NBS LC 378r11/1925" - With revision date
|
|
13
13
|
# - "NBS LC 378(sp)" - With language code
|
|
14
|
-
class LetterCircular <
|
|
14
|
+
class LetterCircular < Base
|
|
15
15
|
TYPED_STAGES = [
|
|
16
16
|
Pubid::Components::TypedStage.new(
|
|
17
17
|
abbr: ["LCIRC"], # Single definition of truth
|
|
@@ -26,8 +26,7 @@ module Pubid
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def type
|
|
29
|
-
{ key: :lc,
|
|
30
|
-
web: :letter_circular, title: "Letter Circular", short: "LCIRC" }
|
|
29
|
+
{ key: :lc, title: "Letter Circular", short: "LCIRC" }
|
|
31
30
|
end
|
|
32
31
|
end
|
|
33
32
|
|
|
@@ -8,7 +8,7 @@ module Pubid
|
|
|
8
8
|
# - "NBS MP 39e1" - Edition with "e" notation
|
|
9
9
|
# - "NBS MP 260e1965" - Edition with year as edition ID
|
|
10
10
|
# NOTE: Parenthetical edition format (e.g., "39(1)") does NOT exist for MP identifiers
|
|
11
|
-
class MiscellaneousPublication <
|
|
11
|
+
class MiscellaneousPublication < Base
|
|
12
12
|
TYPED_STAGES = [
|
|
13
13
|
Pubid::Components::TypedStage.new(
|
|
14
14
|
abbr: ["MP", "NBS MP"],
|
|
@@ -23,8 +23,7 @@ module Pubid
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def type
|
|
26
|
-
{ key: :mp,
|
|
27
|
-
web: :miscellaneous_publication, title: "Miscellaneous Publication", short: "MP" }
|
|
26
|
+
{ key: :mp, title: "Miscellaneous Publication", short: "MP" }
|
|
28
27
|
end
|
|
29
28
|
end
|
|
30
29
|
|
|
@@ -36,36 +35,28 @@ module Pubid
|
|
|
36
35
|
"MP"
|
|
37
36
|
end
|
|
38
37
|
|
|
39
|
-
# A caller passing `annotated:` reaches this positional parameter as a
|
|
40
|
-
# Hash — Ruby converts keywords for a method that accepts none. The same
|
|
41
|
-
# idiom `Identifiers::Base#to_s` uses.
|
|
42
38
|
def to_s(format = :short)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
else
|
|
50
|
-
to_short_style
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
annotate_plain_render(rendered, annotated: annotated)
|
|
39
|
+
case format
|
|
40
|
+
when :mr
|
|
41
|
+
to_mr_style
|
|
42
|
+
else
|
|
43
|
+
to_short_style
|
|
44
|
+
end
|
|
54
45
|
end
|
|
55
46
|
|
|
56
|
-
|
|
47
|
+
private
|
|
57
48
|
|
|
58
49
|
def to_short_style
|
|
59
50
|
result = "#{default_publisher} #{series_code}"
|
|
60
51
|
result += " #{number.value}" if number
|
|
61
|
-
result +=
|
|
52
|
+
result += edition.to_s if edition
|
|
62
53
|
result
|
|
63
54
|
end
|
|
64
55
|
|
|
65
56
|
def to_mr_style
|
|
66
57
|
result = "#{default_publisher}.#{series_code}"
|
|
67
58
|
result += ".#{number.value}" if number
|
|
68
|
-
result +=
|
|
59
|
+
result += edition.to_s if edition
|
|
69
60
|
result
|
|
70
61
|
end
|
|
71
62
|
end
|
|
@@ -10,7 +10,7 @@ module Pubid
|
|
|
10
10
|
# - "NBS MONO 128pt1" - Monograph with part
|
|
11
11
|
# - "NIST MONO 1-1F" - Monograph with letter suffix
|
|
12
12
|
# - "NIST MONO 1-2Bv1" - Monograph with letter suffix and volume
|
|
13
|
-
class Monograph <
|
|
13
|
+
class Monograph < Base
|
|
14
14
|
TYPED_STAGES = [
|
|
15
15
|
Pubid::Components::TypedStage.new(
|
|
16
16
|
abbr: ["MONO", "NBS MONO", "NIST MONO"],
|
|
@@ -25,8 +25,7 @@ module Pubid
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def type
|
|
28
|
-
{ key: :mono,
|
|
29
|
-
web: :monograph, title: "Monograph", short: "MONO" }
|
|
28
|
+
{ key: :mono, title: "Monograph", short: "MONO" }
|
|
30
29
|
end
|
|
31
30
|
end
|
|
32
31
|
|
|
@@ -35,11 +34,6 @@ module Pubid
|
|
|
35
34
|
end
|
|
36
35
|
|
|
37
36
|
def to_s(format = nil)
|
|
38
|
-
# `super` is handed a SYMBOL below, so the base's annotation hook
|
|
39
|
-
# never sees the flag. Capture it here and wrap what comes back —
|
|
40
|
-
# exactly once, because the base returned plain text.
|
|
41
|
-
annotated = format.is_a?(Hash) ? format[:annotated] : nil
|
|
42
|
-
|
|
43
37
|
# Handle both keyword argument (hash) and positional argument (symbol/string)
|
|
44
38
|
effective_format = if format.is_a?(Hash)
|
|
45
39
|
format[:format]
|
|
@@ -48,15 +42,13 @@ module Pubid
|
|
|
48
42
|
end
|
|
49
43
|
|
|
50
44
|
# If explicit format is specified, use it. Otherwise, default to short.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
annotate_plain_render(rendered, annotated: annotated)
|
|
45
|
+
if effective_format.nil?
|
|
46
|
+
super(:short)
|
|
47
|
+
elsif effective_format == :mr
|
|
48
|
+
to_mr_style
|
|
49
|
+
else
|
|
50
|
+
super(effective_format)
|
|
51
|
+
end
|
|
60
52
|
end
|
|
61
53
|
|
|
62
54
|
private
|
|
@@ -67,11 +59,8 @@ module Pubid
|
|
|
67
59
|
result = (publisher || default_publisher).to_s
|
|
68
60
|
result += ".MN" # MR format uses MN per spec
|
|
69
61
|
result += ".#{number}" if number
|
|
70
|
-
#
|
|
71
|
-
|
|
72
|
-
# variants (e.g. "1-1F") carry the letter inside the compound number
|
|
73
|
-
# and have no separate Part component, so this does not double them.
|
|
74
|
-
result += append_mr_components
|
|
62
|
+
# Part is already included in compound number (e.g., "1-1B")
|
|
63
|
+
result += "v#{volume}" if volume
|
|
75
64
|
result
|
|
76
65
|
end
|
|
77
66
|
end
|
|
@@ -8,7 +8,7 @@ module Pubid
|
|
|
8
8
|
# - "NIST NCSTAR 1-1Cv1" → "NIST NCSTAR 1-1Cv1" (round-trips)
|
|
9
9
|
# - "NIST NCSTAR 1-1b" → "NIST NCSTAR 1-1B" (normalizes letter)
|
|
10
10
|
# - "NIST NCSTAR 1-1cv1" → "NIST NCSTAR 1-1Cv1" (normalizes letter, keeps v1 format)
|
|
11
|
-
class Ncstar <
|
|
11
|
+
class Ncstar < Base
|
|
12
12
|
TYPED_STAGES = [
|
|
13
13
|
Pubid::Components::TypedStage.new(
|
|
14
14
|
abbr: ["NCSTAR", "NIST NCSTAR"],
|
|
@@ -34,7 +34,7 @@ module Pubid
|
|
|
34
34
|
|
|
35
35
|
# NCSTAR-specific: do NOT expand Cv patterns to ", Volume" format
|
|
36
36
|
# The base class would render "1-1Cv1" as is, which is correct for NCSTAR
|
|
37
|
-
# No custom rendering needed - just inherit from
|
|
37
|
+
# No custom rendering needed - just inherit from Base
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
end
|
|
@@ -8,7 +8,7 @@ module Pubid
|
|
|
8
8
|
# - "NBS NSRDS 1" - Basic NSRDS
|
|
9
9
|
# - "NSRDS-NBS 1" - With hyphen prefix
|
|
10
10
|
# - "NBS NSRDS 1p1" - With part notation
|
|
11
|
-
class Nsrds <
|
|
11
|
+
class Nsrds < Base
|
|
12
12
|
TYPED_STAGES = [
|
|
13
13
|
Pubid::Components::TypedStage.new(
|
|
14
14
|
abbr: ["NSRDS", "NBS NSRDS"],
|
|
@@ -6,7 +6,7 @@ module Pubid
|
|
|
6
6
|
# NIST OWMWP (Office of Weights and Measures Workshop Proceedings)
|
|
7
7
|
# Examples:
|
|
8
8
|
# - "NIST OWMWP 06-13-2018" - Date-based format MM-DD-YYYY
|
|
9
|
-
class Owmwp <
|
|
9
|
+
class Owmwp < Base
|
|
10
10
|
TYPED_STAGES = [
|
|
11
11
|
Pubid::Components::TypedStage.new(
|
|
12
12
|
abbr: ["OWMWP", "NIST OWMWP"],
|