pubid 1.15.21 → 2.0.0.alpha.10
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/LICENSE.txt +1 -1
- data/README.adoc +2044 -53
- data/archived-gems/pubid-ccsds/update_codes.yaml +1 -0
- data/archived-gems/pubid-iec/stages.yaml +129 -0
- data/archived-gems/pubid-iec/update_codes.yaml +67 -0
- data/archived-gems/pubid-ieee/update_codes.yaml +104 -0
- data/archived-gems/pubid-iso/stages.yaml +106 -0
- data/archived-gems/pubid-iso/update_codes.yaml +4 -0
- data/archived-gems/pubid-itu/i18n.yaml +13 -0
- data/archived-gems/pubid-itu/series.yaml +42 -0
- data/archived-gems/pubid-nist/publishers.yaml +6 -0
- data/archived-gems/pubid-nist/series.yaml +121 -0
- data/archived-gems/pubid-nist/stages.yaml +16 -0
- data/archived-gems/pubid-nist/update_codes.yaml +93 -0
- data/archived-gems/pubid-plateau/update_codes.yaml +6 -0
- data/data/bipm/update_codes.yaml +9 -0
- data/data/ccsds/update_codes.yaml +1 -0
- data/data/iec/update_codes.yaml +70 -0
- data/data/ieee/update_codes.yaml +210 -0
- data/data/iso/update_codes.yaml +21 -0
- data/data/nist/series.yaml +155 -0
- data/data/nist/update_codes.yaml +122 -0
- data/data/plateau/update_codes.yaml +6 -0
- data/lib/pubid/adobe/builder.rb +52 -0
- data/lib/pubid/adobe/identifier.rb +47 -0
- data/lib/pubid/adobe/identifiers/publication.rb +31 -0
- data/lib/pubid/adobe/identifiers/tech_note.rb +32 -0
- data/lib/pubid/adobe/identifiers.rb +10 -0
- data/lib/pubid/adobe/parser.rb +136 -0
- data/lib/pubid/adobe/renderer.rb +39 -0
- data/lib/pubid/adobe/urn_generator.rb +42 -0
- data/lib/pubid/adobe/urn_parser.rb +69 -0
- data/lib/pubid/adobe.rb +60 -0
- data/lib/pubid/amca/builder.rb +176 -0
- data/lib/pubid/amca/identifier.rb +4 -0
- data/lib/pubid/amca/identifiers/base.rb +92 -0
- data/lib/pubid/amca/identifiers/interpretation.rb +38 -0
- data/lib/pubid/amca/identifiers/publication.rb +34 -0
- data/lib/pubid/amca/identifiers/standard.rb +20 -0
- data/lib/pubid/amca/identifiers.rb +11 -0
- data/lib/pubid/amca/parser.rb +153 -0
- data/lib/pubid/amca/renderer.rb +82 -0
- data/lib/pubid/amca/single_identifier.rb +10 -0
- data/lib/pubid/amca/urn_generator.rb +51 -0
- data/lib/pubid/amca/urn_parser.rb +28 -0
- data/lib/pubid/amca.rb +73 -0
- data/lib/pubid/ansi/builder.rb +54 -0
- data/lib/pubid/ansi/identifier.rb +31 -0
- data/lib/pubid/ansi/identifiers/american_national_standard.rb +13 -0
- data/lib/pubid/ansi/identifiers/standard.rb +15 -0
- data/lib/pubid/ansi/identifiers.rb +11 -0
- data/lib/pubid/ansi/parser.rb +91 -0
- data/lib/pubid/ansi/renderer.rb +53 -0
- data/lib/pubid/ansi/single_identifier.rb +16 -0
- data/lib/pubid/ansi/urn_generator.rb +41 -0
- data/lib/pubid/ansi/urn_parser.rb +23 -0
- data/lib/pubid/ansi.rb +68 -0
- data/lib/pubid/api/builder.rb +58 -0
- data/lib/pubid/api/components/code.rb +9 -0
- data/lib/pubid/api/identifier.rb +42 -0
- data/lib/pubid/api/identifiers/base.rb +12 -0
- data/lib/pubid/api/identifiers/bulletin.rb +13 -0
- data/lib/pubid/api/identifiers/continuous_operations_standard.rb +13 -0
- data/lib/pubid/api/identifiers/mpms.rb +26 -0
- data/lib/pubid/api/identifiers/publication.rb +13 -0
- data/lib/pubid/api/identifiers/recommended_practice.rb +13 -0
- data/lib/pubid/api/identifiers/specification.rb +13 -0
- data/lib/pubid/api/identifiers/standard.rb +13 -0
- data/lib/pubid/api/identifiers/technical_report.rb +13 -0
- data/lib/pubid/api/identifiers/typeless_standard.rb +11 -0
- data/lib/pubid/api/identifiers.rb +18 -0
- data/lib/pubid/api/parser.rb +140 -0
- data/lib/pubid/api/renderer.rb +98 -0
- data/lib/pubid/api/single_identifier.rb +24 -0
- data/lib/pubid/api/urn_generator.rb +23 -0
- data/lib/pubid/api/urn_parser.rb +35 -0
- data/lib/pubid/api.rb +68 -0
- data/lib/pubid/ashrae/builder.rb +519 -0
- data/lib/pubid/ashrae/identifier.rb +8 -0
- data/lib/pubid/ashrae/identifiers/addenda_package.rb +42 -0
- data/lib/pubid/ashrae/identifiers/addendum.rb +44 -0
- data/lib/pubid/ashrae/identifiers/base.rb +119 -0
- data/lib/pubid/ashrae/identifiers/combined_addenda.rb +43 -0
- data/lib/pubid/ashrae/identifiers/errata.rb +39 -0
- data/lib/pubid/ashrae/identifiers/guideline.rb +41 -0
- data/lib/pubid/ashrae/identifiers/interpretation.rb +45 -0
- data/lib/pubid/ashrae/identifiers/standard.rb +41 -0
- data/lib/pubid/ashrae/identifiers.rb +15 -0
- data/lib/pubid/ashrae/parser.rb +748 -0
- data/lib/pubid/ashrae/renderer.rb +117 -0
- data/lib/pubid/ashrae/single_identifier.rb +10 -0
- data/lib/pubid/ashrae/supplement_identifier.rb +38 -0
- data/lib/pubid/ashrae/urn_generator.rb +57 -0
- data/lib/pubid/ashrae/urn_parser.rb +27 -0
- data/lib/pubid/ashrae.rb +77 -0
- data/lib/pubid/asme/builder.rb +162 -0
- data/lib/pubid/asme/components/code.rb +26 -0
- data/lib/pubid/asme/identifier.rb +24 -0
- data/lib/pubid/asme/identifiers/base.rb +10 -0
- data/lib/pubid/asme/identifiers/standard.rb +96 -0
- data/lib/pubid/asme/identifiers.rb +10 -0
- data/lib/pubid/asme/parser.rb +308 -0
- data/lib/pubid/asme/renderer.rb +66 -0
- data/lib/pubid/asme/single_identifier.rb +38 -0
- data/lib/pubid/asme/urn_generator.rb +133 -0
- data/lib/pubid/asme/urn_parser.rb +31 -0
- data/lib/pubid/asme.rb +67 -0
- data/lib/pubid/astm/builder.rb +166 -0
- data/lib/pubid/astm/components/code.rb +42 -0
- data/lib/pubid/astm/components.rb +9 -0
- data/lib/pubid/astm/identifier.rb +24 -0
- data/lib/pubid/astm/identifiers/adjunct.rb +28 -0
- data/lib/pubid/astm/identifiers/base.rb +13 -0
- data/lib/pubid/astm/identifiers/code_number.rb +81 -0
- data/lib/pubid/astm/identifiers/data_series.rb +13 -0
- data/lib/pubid/astm/identifiers/iso_dual_published.rb +65 -0
- data/lib/pubid/astm/identifiers/manual.rb +23 -0
- data/lib/pubid/astm/identifiers/monograph.rb +13 -0
- data/lib/pubid/astm/identifiers/research_report.rb +21 -0
- data/lib/pubid/astm/identifiers/standard.rb +23 -0
- data/lib/pubid/astm/identifiers/technical_report.rb +12 -0
- data/lib/pubid/astm/identifiers/work_in_progress.rb +12 -0
- data/lib/pubid/astm/identifiers.rb +19 -0
- data/lib/pubid/astm/parser.rb +244 -0
- data/lib/pubid/astm/renderer.rb +172 -0
- data/lib/pubid/astm/single_identifier.rb +47 -0
- data/lib/pubid/astm/urn_generator.rb +101 -0
- data/lib/pubid/astm/urn_parser.rb +30 -0
- data/lib/pubid/astm.rb +55 -0
- data/lib/pubid/bipm/builder.rb +163 -0
- data/lib/pubid/bipm/identifier.rb +285 -0
- data/lib/pubid/bipm/identifiers/committee_document.rb +36 -0
- data/lib/pubid/bipm/identifiers/guide.rb +35 -0
- data/lib/pubid/bipm/identifiers/meeting.rb +53 -0
- data/lib/pubid/bipm/identifiers/mep.rb +33 -0
- data/lib/pubid/bipm/identifiers/metrologia_article.rb +48 -0
- data/lib/pubid/bipm/identifiers/si_brochure.rb +33 -0
- data/lib/pubid/bipm/identifiers.rb +15 -0
- data/lib/pubid/bipm/parser.rb +237 -0
- data/lib/pubid/bipm/renderer.rb +118 -0
- data/lib/pubid/bipm/urn_generator.rb +58 -0
- data/lib/pubid/bipm/urn_parser.rb +60 -0
- data/lib/pubid/bipm.rb +91 -0
- data/lib/pubid/bsi/builder.rb +1495 -0
- data/lib/pubid/bsi/components/code.rb +11 -0
- data/lib/pubid/bsi/components/date.rb +11 -0
- data/lib/pubid/bsi/components/publisher.rb +11 -0
- data/lib/pubid/bsi/components/type.rb +11 -0
- data/lib/pubid/bsi/identifier.rb +6 -0
- data/lib/pubid/bsi/identifiers/addendum_document.rb +30 -0
- data/lib/pubid/bsi/identifiers/adopted_european_norm.rb +67 -0
- data/lib/pubid/bsi/identifiers/adopted_international_standard.rb +51 -0
- data/lib/pubid/bsi/identifiers/aerospace_standard.rb +65 -0
- data/lib/pubid/bsi/identifiers/amendment.rb +48 -0
- data/lib/pubid/bsi/identifiers/british_industrial_practice.rb +21 -0
- data/lib/pubid/bsi/identifiers/british_standard.rb +34 -0
- data/lib/pubid/bsi/identifiers/bundled_identifier.rb +40 -0
- data/lib/pubid/bsi/identifiers/committee_document.rb +44 -0
- data/lib/pubid/bsi/identifiers/consolidated_identifier.rb +84 -0
- data/lib/pubid/bsi/identifiers/corrigendum.rb +44 -0
- data/lib/pubid/bsi/identifiers/detailed_specification.rb +33 -0
- data/lib/pubid/bsi/identifiers/disc.rb +27 -0
- data/lib/pubid/bsi/identifiers/draft_document.rb +27 -0
- data/lib/pubid/bsi/identifiers/electronic_book.rb +16 -0
- data/lib/pubid/bsi/identifiers/expert_commentary.rb +36 -0
- data/lib/pubid/bsi/identifiers/explanatory_supplement.rb +35 -0
- data/lib/pubid/bsi/identifiers/flex.rb +30 -0
- data/lib/pubid/bsi/identifiers/handbook.rb +23 -0
- data/lib/pubid/bsi/identifiers/index.rb +30 -0
- data/lib/pubid/bsi/identifiers/method.rb +35 -0
- data/lib/pubid/bsi/identifiers/national_annex.rb +48 -0
- data/lib/pubid/bsi/identifiers/practice_guide.rb +21 -0
- data/lib/pubid/bsi/identifiers/publicly_available_specification.rb +27 -0
- data/lib/pubid/bsi/identifiers/published_document.rb +27 -0
- data/lib/pubid/bsi/identifiers/section.rb +32 -0
- data/lib/pubid/bsi/identifiers/set.rb +40 -0
- data/lib/pubid/bsi/identifiers/standalone_amendment.rb +40 -0
- data/lib/pubid/bsi/identifiers/supplement_document.rb +29 -0
- data/lib/pubid/bsi/identifiers/supplementary_index.rb +35 -0
- data/lib/pubid/bsi/identifiers/technical_specification.rb +34 -0
- data/lib/pubid/bsi/identifiers/test_method.rb +35 -0
- data/lib/pubid/bsi/identifiers/value_added_publication.rb +37 -0
- data/lib/pubid/bsi/identifiers.rb +51 -0
- data/lib/pubid/bsi/model.rb +196 -0
- data/lib/pubid/bsi/parser.rb +673 -0
- data/lib/pubid/bsi/renderer.rb +1064 -0
- data/lib/pubid/bsi/single_identifier.rb +141 -0
- data/lib/pubid/bsi/urn_generator.rb +92 -0
- data/lib/pubid/bsi/urn_parser.rb +52 -0
- data/lib/pubid/bsi.rb +282 -0
- data/lib/pubid/builder/base.rb +187 -0
- data/lib/pubid/bundled_identifier.rb +134 -0
- data/lib/pubid/calconnect/builder.rb +38 -0
- data/lib/pubid/calconnect/identifier.rb +121 -0
- data/lib/pubid/calconnect/identifiers/standard.rb +29 -0
- data/lib/pubid/calconnect/identifiers.rb +9 -0
- data/lib/pubid/calconnect/parser.rb +54 -0
- data/lib/pubid/calconnect/renderer.rb +36 -0
- data/lib/pubid/calconnect/urn_generator.rb +33 -0
- data/lib/pubid/calconnect/urn_parser.rb +34 -0
- data/lib/pubid/calconnect.rb +82 -0
- data/lib/pubid/ccsds/builder.rb +57 -0
- data/lib/pubid/ccsds/identifier.rb +76 -0
- data/lib/pubid/ccsds/identifiers/base.rb +41 -0
- data/lib/pubid/ccsds/identifiers/base_BASE_88929.rb +70 -0
- data/lib/pubid/ccsds/identifiers/corrigendum.rb +40 -0
- data/lib/pubid/ccsds/identifiers.rb +10 -0
- data/lib/pubid/ccsds/parser.rb +73 -0
- data/lib/pubid/ccsds/single_identifier.rb +77 -0
- data/lib/pubid/ccsds/supplement_identifier.rb +37 -0
- data/lib/pubid/ccsds/urn_generator.rb +115 -0
- data/lib/pubid/ccsds/urn_parser.rb +20 -0
- data/lib/pubid/ccsds.rb +64 -0
- data/lib/pubid/cen_cenelec/builder.rb +362 -0
- data/lib/pubid/cen_cenelec/identifier.rb +38 -0
- data/lib/pubid/cen_cenelec/identifiers/adopted_european_norm.rb +45 -0
- data/lib/pubid/cen_cenelec/identifiers/amendment.rb +19 -0
- data/lib/pubid/cen_cenelec/identifiers/base.rb +34 -0
- data/lib/pubid/cen_cenelec/identifiers/cen_report.rb +29 -0
- data/lib/pubid/cen_cenelec/identifiers/cen_workshop_agreement.rb +28 -0
- data/lib/pubid/cen_cenelec/identifiers/cenelec_harmonization_document.rb +28 -0
- data/lib/pubid/cen_cenelec/identifiers/consolidated_identifier.rb +40 -0
- data/lib/pubid/cen_cenelec/identifiers/corrigendum.rb +20 -0
- data/lib/pubid/cen_cenelec/identifiers/european_norm.rb +99 -0
- data/lib/pubid/cen_cenelec/identifiers/european_prestandard.rb +50 -0
- data/lib/pubid/cen_cenelec/identifiers/european_specification.rb +29 -0
- data/lib/pubid/cen_cenelec/identifiers/fragment.rb +18 -0
- data/lib/pubid/cen_cenelec/identifiers/guide.rb +27 -0
- data/lib/pubid/cen_cenelec/identifiers/harmonization_document.rb +28 -0
- data/lib/pubid/cen_cenelec/identifiers/technical_report.rb +28 -0
- data/lib/pubid/cen_cenelec/identifiers/technical_specification.rb +36 -0
- data/lib/pubid/cen_cenelec/identifiers.rb +32 -0
- data/lib/pubid/cen_cenelec/parser.rb +144 -0
- data/lib/pubid/cen_cenelec/renderer.rb +261 -0
- data/lib/pubid/cen_cenelec/single_identifier.rb +49 -0
- data/lib/pubid/cen_cenelec/supplement_identifier.rb +47 -0
- data/lib/pubid/cen_cenelec/urn_generator.rb +129 -0
- data/lib/pubid/cen_cenelec/urn_parser.rb +28 -0
- data/lib/pubid/cen_cenelec.rb +208 -0
- data/lib/pubid/cie/builder.rb +524 -0
- data/lib/pubid/cie/components/language.rb +58 -0
- data/lib/pubid/cie/identifier.rb +33 -0
- data/lib/pubid/cie/identifiers/bundle.rb +50 -0
- data/lib/pubid/cie/identifiers/code_attributes.rb +52 -0
- data/lib/pubid/cie/identifiers/conference.rb +37 -0
- data/lib/pubid/cie/identifiers/corrigendum.rb +34 -0
- data/lib/pubid/cie/identifiers/dual_published.rb +41 -0
- data/lib/pubid/cie/identifiers/identical.rb +64 -0
- data/lib/pubid/cie/identifiers/joint_published.rb +52 -0
- data/lib/pubid/cie/identifiers/proceedings.rb +41 -0
- data/lib/pubid/cie/identifiers/standard.rb +93 -0
- data/lib/pubid/cie/identifiers/supplement.rb +47 -0
- data/lib/pubid/cie/identifiers/tutorial_bundle.rb +24 -0
- data/lib/pubid/cie/identifiers.rb +19 -0
- data/lib/pubid/cie/parser.rb +396 -0
- data/lib/pubid/cie/single_identifier.rb +69 -0
- data/lib/pubid/cie/supplement_identifier.rb +39 -0
- data/lib/pubid/cie/urn_generator.rb +126 -0
- data/lib/pubid/cie/urn_parser.rb +28 -0
- data/lib/pubid/cie.rb +83 -0
- data/lib/pubid/components/adoption.rb +104 -0
- data/lib/pubid/components/code.rb +47 -0
- data/lib/pubid/components/date.rb +72 -0
- data/lib/pubid/components/edition.rb +35 -0
- data/lib/pubid/components/iteration.rb +32 -0
- data/lib/pubid/components/language.rb +39 -0
- data/lib/pubid/components/locality.rb +19 -0
- data/lib/pubid/components/publisher.rb +39 -0
- data/lib/pubid/components/relationship.rb +151 -0
- data/lib/pubid/components/stage.rb +45 -0
- data/lib/pubid/components/supplement.rb +184 -0
- data/lib/pubid/components/type.rb +48 -0
- data/lib/pubid/components/typed_stage.rb +58 -0
- data/lib/pubid/components.rb +19 -0
- data/lib/pubid/core/pattern_doc_generator.rb +272 -0
- data/lib/pubid/core/update_codes.rb +98 -0
- data/lib/pubid/core.rb +8 -0
- data/lib/pubid/csa/builder.rb +671 -0
- data/lib/pubid/csa/components/code.rb +9 -0
- data/lib/pubid/csa/components.rb +9 -0
- data/lib/pubid/csa/composite_identifier.rb +38 -0
- data/lib/pubid/csa/identifier.rb +570 -0
- data/lib/pubid/csa/identifiers/base.rb +10 -0
- data/lib/pubid/csa/identifiers/bundled.rb +141 -0
- data/lib/pubid/csa/identifiers/canadian_adopted.rb +82 -0
- data/lib/pubid/csa/identifiers/cec.rb +66 -0
- data/lib/pubid/csa/identifiers/combined.rb +158 -0
- data/lib/pubid/csa/identifiers/csa_adopted.rb +78 -0
- data/lib/pubid/csa/identifiers/package.rb +65 -0
- data/lib/pubid/csa/identifiers/series.rb +23 -0
- data/lib/pubid/csa/identifiers/standard.rb +10 -0
- data/lib/pubid/csa/identifiers.rb +17 -0
- data/lib/pubid/csa/parser.rb +449 -0
- data/lib/pubid/csa/renderer.rb +300 -0
- data/lib/pubid/csa/single_identifier.rb +119 -0
- data/lib/pubid/csa/urn_generator.rb +87 -0
- data/lib/pubid/csa/urn_parser.rb +33 -0
- data/lib/pubid/csa/wrapper_identifier.rb +64 -0
- data/lib/pubid/csa.rb +80 -0
- data/lib/pubid/doi/builder.rb +18 -0
- data/lib/pubid/doi/identifier.rb +49 -0
- data/lib/pubid/doi/identifiers/resource.rb +30 -0
- data/lib/pubid/doi/identifiers.rb +9 -0
- data/lib/pubid/doi/parser.rb +52 -0
- data/lib/pubid/doi/renderer.rb +13 -0
- data/lib/pubid/doi.rb +55 -0
- data/lib/pubid/easc/builder.rb +55 -0
- data/lib/pubid/easc/identifier.rb +59 -0
- data/lib/pubid/easc/identifiers/pmg.rb +20 -0
- data/lib/pubid/easc/identifiers/rmg.rb +19 -0
- data/lib/pubid/easc/identifiers.rb +10 -0
- data/lib/pubid/easc/parser.rb +88 -0
- data/lib/pubid/easc/renderer.rb +48 -0
- data/lib/pubid/easc/urn_generator.rb +46 -0
- data/lib/pubid/easc/urn_parser.rb +57 -0
- data/lib/pubid/easc.rb +52 -0
- data/lib/pubid/ecma/builder.rb +45 -0
- data/lib/pubid/ecma/identifier.rb +147 -0
- data/lib/pubid/ecma/identifiers/memento.rb +30 -0
- data/lib/pubid/ecma/identifiers/standard.rb +31 -0
- data/lib/pubid/ecma/identifiers/technical_report.rb +31 -0
- data/lib/pubid/ecma/identifiers.rb +11 -0
- data/lib/pubid/ecma/parser.rb +76 -0
- data/lib/pubid/ecma/renderer.rb +67 -0
- data/lib/pubid/ecma/urn_generator.rb +46 -0
- data/lib/pubid/ecma/urn_parser.rb +51 -0
- data/lib/pubid/ecma.rb +67 -0
- data/lib/pubid/errors.rb +79 -0
- data/lib/pubid/etsi/builder.rb +142 -0
- data/lib/pubid/etsi/components/code.rb +43 -0
- data/lib/pubid/etsi/components/version.rb +32 -0
- data/lib/pubid/etsi/components.rb +10 -0
- data/lib/pubid/etsi/identifier.rb +4 -0
- data/lib/pubid/etsi/identifiers/amendment.rb +15 -0
- data/lib/pubid/etsi/identifiers/base.rb +74 -0
- data/lib/pubid/etsi/identifiers/corrigendum.rb +15 -0
- data/lib/pubid/etsi/identifiers/etsi_standard.rb +222 -0
- data/lib/pubid/etsi/identifiers/supplement_identifier.rb +123 -0
- data/lib/pubid/etsi/identifiers.rb +13 -0
- data/lib/pubid/etsi/parser.rb +139 -0
- data/lib/pubid/etsi/renderer.rb +48 -0
- data/lib/pubid/etsi/urn_generator.rb +76 -0
- data/lib/pubid/etsi/urn_parser.rb +34 -0
- data/lib/pubid/etsi.rb +71 -0
- data/lib/pubid/export/auditor.rb +89 -0
- data/lib/pubid/export/exporter.rb +33 -0
- data/lib/pubid/export/flavor_exporter.rb +250 -0
- data/lib/pubid/export/result.rb +97 -0
- data/lib/pubid/export.rb +12 -0
- data/lib/pubid/format_detector.rb +16 -0
- data/lib/pubid/format_registry.rb +42 -0
- data/lib/pubid/gb/builder.rb +45 -0
- data/lib/pubid/gb/identifier.rb +67 -0
- data/lib/pubid/gb/identifiers/standard.rb +34 -0
- data/lib/pubid/gb/identifiers.rb +9 -0
- data/lib/pubid/gb/parser.rb +63 -0
- data/lib/pubid/gb/renderer.rb +35 -0
- data/lib/pubid/gb.rb +87 -0
- data/lib/pubid/gost/builder.rb +148 -0
- data/lib/pubid/gost/identifier.rb +47 -0
- data/lib/pubid/gost/identifiers/foreign_reference.rb +25 -0
- data/lib/pubid/gost/identifiers/harmonized.rb +39 -0
- data/lib/pubid/gost/identifiers/identical_adoption.rb +39 -0
- data/lib/pubid/gost/identifiers/interstate_standard.rb +20 -0
- data/lib/pubid/gost/identifiers/national_standard.rb +19 -0
- data/lib/pubid/gost/identifiers.rb +13 -0
- data/lib/pubid/gost/parser.rb +105 -0
- data/lib/pubid/gost/renderer.rb +48 -0
- data/lib/pubid/gost/urn_generator.rb +46 -0
- data/lib/pubid/gost/urn_parser.rb +52 -0
- data/lib/pubid/gost.rb +49 -0
- data/lib/pubid/iala/builder.rb +102 -0
- data/lib/pubid/iala/identifier.rb +90 -0
- data/lib/pubid/iala/identifiers/advice.rb +15 -0
- data/lib/pubid/iala/identifiers/annex.rb +57 -0
- data/lib/pubid/iala/identifiers/general_assembly.rb +19 -0
- data/lib/pubid/iala/identifiers/guideline.rb +17 -0
- data/lib/pubid/iala/identifiers/letter.rb +16 -0
- data/lib/pubid/iala/identifiers/manual.rb +18 -0
- data/lib/pubid/iala/identifiers/model_course.rb +17 -0
- data/lib/pubid/iala/identifiers/recommendation.rb +17 -0
- data/lib/pubid/iala/identifiers/report.rb +16 -0
- data/lib/pubid/iala/identifiers/resolution.rb +16 -0
- data/lib/pubid/iala/identifiers/standard.rb +17 -0
- data/lib/pubid/iala/identifiers.rb +19 -0
- data/lib/pubid/iala/parser.rb +138 -0
- data/lib/pubid/iala/renderer.rb +36 -0
- data/lib/pubid/iala/urn_generator.rb +49 -0
- data/lib/pubid/iala/urn_parser.rb +67 -0
- data/lib/pubid/iala.rb +71 -0
- data/lib/pubid/iana/builder.rb +22 -0
- data/lib/pubid/iana/identifier.rb +140 -0
- data/lib/pubid/iana/identifiers/registry.rb +69 -0
- data/lib/pubid/iana/identifiers.rb +9 -0
- data/lib/pubid/iana/parser.rb +38 -0
- data/lib/pubid/iana/renderer.rb +32 -0
- data/lib/pubid/iana/urn_generator.rb +19 -0
- data/lib/pubid/iana/urn_parser.rb +24 -0
- data/lib/pubid/iana.rb +69 -0
- data/lib/pubid/identifier.rb +1118 -0
- data/lib/pubid/identifier_metadata.rb +148 -0
- data/lib/pubid/idf/builder.rb +82 -0
- data/lib/pubid/idf/identifier.rb +79 -0
- data/lib/pubid/idf/identifiers/amendment.rb +28 -0
- data/lib/pubid/idf/identifiers/corrigendum.rb +28 -0
- data/lib/pubid/idf/identifiers/international_standard.rb +124 -0
- data/lib/pubid/idf/identifiers/reviewed_method.rb +101 -0
- data/lib/pubid/idf/identifiers.rb +13 -0
- data/lib/pubid/idf/parser.rb +144 -0
- data/lib/pubid/idf/renderer.rb +84 -0
- data/lib/pubid/idf/single_identifier.rb +19 -0
- data/lib/pubid/idf/supplement_identifier.rb +35 -0
- data/lib/pubid/idf/urn_generator.rb +49 -0
- data/lib/pubid/idf/urn_parser.rb +25 -0
- data/lib/pubid/idf.rb +89 -0
- data/lib/pubid/iec/builder.rb +458 -0
- data/lib/pubid/iec/components/code.rb +36 -0
- data/lib/pubid/iec/components/consolidated_amendment.rb +59 -0
- data/lib/pubid/iec/components/publisher.rb +35 -0
- data/lib/pubid/iec/components/sheet.rb +32 -0
- data/lib/pubid/iec/components/trf_info.rb +38 -0
- data/lib/pubid/iec/components/vap_suffix.rb +41 -0
- data/lib/pubid/iec/components.rb +14 -0
- data/lib/pubid/iec/identifier.rb +341 -0
- data/lib/pubid/iec/identifiers/amendment.rb +97 -0
- data/lib/pubid/iec/identifiers/base.rb +54 -0
- data/lib/pubid/iec/identifiers/component_specification.rb +29 -0
- data/lib/pubid/iec/identifiers/conformity_assessment.rb +28 -0
- data/lib/pubid/iec/identifiers/consolidated_identifier.rb +85 -0
- data/lib/pubid/iec/identifiers/corrigendum.rb +93 -0
- data/lib/pubid/iec/identifiers/fragment_identifier.rb +148 -0
- data/lib/pubid/iec/identifiers/guide.rb +86 -0
- data/lib/pubid/iec/identifiers/international_standard.rb +162 -0
- data/lib/pubid/iec/identifiers/interpretation_sheet.rb +103 -0
- data/lib/pubid/iec/identifiers/operational_document.rb +29 -0
- data/lib/pubid/iec/identifiers/publicly_available_specification.rb +88 -0
- data/lib/pubid/iec/identifiers/sheet_identifier.rb +68 -0
- data/lib/pubid/iec/identifiers/societal_technology_trend_report.rb +30 -0
- data/lib/pubid/iec/identifiers/systems_reference_document.rb +29 -0
- data/lib/pubid/iec/identifiers/technical_group.rb +30 -0
- data/lib/pubid/iec/identifiers/technical_report.rb +114 -0
- data/lib/pubid/iec/identifiers/technical_specification.rb +114 -0
- data/lib/pubid/iec/identifiers/technology_report.rb +28 -0
- data/lib/pubid/iec/identifiers/test_report_form.rb +35 -0
- data/lib/pubid/iec/identifiers/vap_identifier.rb +76 -0
- data/lib/pubid/iec/identifiers/white_paper.rb +29 -0
- data/lib/pubid/iec/identifiers/working_document.rb +62 -0
- data/lib/pubid/iec/identifiers.rb +31 -0
- data/lib/pubid/iec/parser.rb +443 -0
- data/lib/pubid/iec/renderer.rb +267 -0
- data/lib/pubid/iec/rendering_style.rb +113 -0
- data/lib/pubid/iec/single_identifier.rb +72 -0
- data/lib/pubid/iec/supplement_identifier.rb +178 -0
- data/lib/pubid/iec/urn_generator.rb +245 -0
- data/lib/pubid/iec/urn_parser.rb +128 -0
- data/lib/pubid/iec.rb +64 -0
- data/lib/pubid/ieee/aiee/builder.rb +85 -0
- data/lib/pubid/ieee/aiee/identifier.rb +89 -0
- data/lib/pubid/ieee/aiee/parser.rb +130 -0
- data/lib/pubid/ieee/aiee.rb +11 -0
- data/lib/pubid/ieee/builder.rb +1554 -0
- data/lib/pubid/ieee/compaction.rb +121 -0
- data/lib/pubid/ieee/components/code.rb +110 -0
- data/lib/pubid/ieee/components/draft.rb +147 -0
- data/lib/pubid/ieee/components/relationship.rb +13 -0
- data/lib/pubid/ieee/components/typed_stage.rb +100 -0
- data/lib/pubid/ieee/identifier.rb +5 -0
- data/lib/pubid/ieee/identifiers/adopted_standard.rb +81 -0
- data/lib/pubid/ieee/identifiers/amendment.rb +40 -0
- data/lib/pubid/ieee/identifiers/base.rb +384 -0
- data/lib/pubid/ieee/identifiers/code_number.rb +82 -0
- data/lib/pubid/ieee/identifiers/conformance_identifier.rb +29 -0
- data/lib/pubid/ieee/identifiers/corrigendum.rb +40 -0
- data/lib/pubid/ieee/identifiers/csa_dual_published.rb +62 -0
- data/lib/pubid/ieee/identifiers/dual_identifier.rb +14 -0
- data/lib/pubid/ieee/identifiers/dual_published.rb +79 -0
- data/lib/pubid/ieee/identifiers/iec_ieee_copublished.rb +115 -0
- data/lib/pubid/ieee/identifiers/interpretation_identifier.rb +48 -0
- data/lib/pubid/ieee/identifiers/joint_development.rb +223 -0
- data/lib/pubid/ieee/identifiers/multi_numbered_identifier.rb +85 -0
- data/lib/pubid/ieee/identifiers/nesc/base.rb +127 -0
- data/lib/pubid/ieee/identifiers/nesc/draft.rb +43 -0
- data/lib/pubid/ieee/identifiers/nesc/edition.rb +32 -0
- data/lib/pubid/ieee/identifiers/nesc/handbook.rb +43 -0
- data/lib/pubid/ieee/identifiers/nesc/redline.rb +35 -0
- data/lib/pubid/ieee/identifiers/nesc/standard.rb +41 -0
- data/lib/pubid/ieee/identifiers/nesc.rb +16 -0
- data/lib/pubid/ieee/identifiers/parenthetical_identifier.rb +14 -0
- data/lib/pubid/ieee/identifiers/project_draft_identifier.rb +49 -0
- data/lib/pubid/ieee/identifiers/redlined_standard.rb +26 -0
- data/lib/pubid/ieee/identifiers/si_standard.rb +38 -0
- data/lib/pubid/ieee/identifiers/standard.rb +44 -0
- data/lib/pubid/ieee/identifiers/supplement_identifier.rb +42 -0
- data/lib/pubid/ieee/identifiers.rb +34 -0
- data/lib/pubid/ieee/ire/builder.rb +62 -0
- data/lib/pubid/ieee/ire/identifier.rb +73 -0
- data/lib/pubid/ieee/ire/parser.rb +91 -0
- data/lib/pubid/ieee/ire.rb +11 -0
- data/lib/pubid/ieee/nesc/builder.rb +114 -0
- data/lib/pubid/ieee/nesc/parser.rb +155 -0
- data/lib/pubid/ieee/nesc.rb +10 -0
- data/lib/pubid/ieee/parser.rb +1644 -0
- data/lib/pubid/ieee/pre_parser.rb +301 -0
- data/lib/pubid/ieee/renderer.rb +408 -0
- data/lib/pubid/ieee/typed_stages.rb +183 -0
- data/lib/pubid/ieee/urn_generator.rb +215 -0
- data/lib/pubid/ieee/urn_parser.rb +34 -0
- data/lib/pubid/ieee.rb +163 -0
- data/lib/pubid/ieee_debug.rb +30 -0
- data/lib/pubid/ietf/builder.rb +78 -0
- data/lib/pubid/ietf/identifier.rb +5 -0
- data/lib/pubid/ietf/identifiers/base.rb +72 -0
- data/lib/pubid/ietf/identifiers/bcp.rb +36 -0
- data/lib/pubid/ietf/identifiers/fyi.rb +36 -0
- data/lib/pubid/ietf/identifiers/internet_draft.rb +45 -0
- data/lib/pubid/ietf/identifiers/rfc.rb +27 -0
- data/lib/pubid/ietf/identifiers/serialization.rb +51 -0
- data/lib/pubid/ietf/identifiers/std.rb +36 -0
- data/lib/pubid/ietf/identifiers.rb +14 -0
- data/lib/pubid/ietf/parser.rb +61 -0
- data/lib/pubid/ietf/renderer.rb +64 -0
- data/lib/pubid/ietf/urn_generator.rb +37 -0
- data/lib/pubid/ietf/urn_parser.rb +43 -0
- data/lib/pubid/ietf.rb +85 -0
- data/lib/pubid/iho/builder.rb +37 -0
- data/lib/pubid/iho/identifier.rb +7 -0
- data/lib/pubid/iho/identifiers/base.rb +75 -0
- data/lib/pubid/iho/identifiers/bibliographic.rb +16 -0
- data/lib/pubid/iho/identifiers/circular_letter.rb +15 -0
- data/lib/pubid/iho/identifiers/miscellaneous.rb +16 -0
- data/lib/pubid/iho/identifiers/publication.rb +15 -0
- data/lib/pubid/iho/identifiers/standard.rb +15 -0
- data/lib/pubid/iho/identifiers.rb +13 -0
- data/lib/pubid/iho/parser.rb +68 -0
- data/lib/pubid/iho/renderer.rb +30 -0
- data/lib/pubid/iho/urn_generator.rb +29 -0
- data/lib/pubid/iho/urn_parser.rb +58 -0
- data/lib/pubid/iho.rb +77 -0
- data/lib/pubid/isbn/builder.rb +44 -0
- data/lib/pubid/isbn/check_digit.rb +53 -0
- data/lib/pubid/isbn/identifier.rb +81 -0
- data/lib/pubid/isbn/identifiers/book.rb +30 -0
- data/lib/pubid/isbn/identifiers.rb +9 -0
- data/lib/pubid/isbn/parser.rb +45 -0
- data/lib/pubid/isbn/renderer.rb +16 -0
- data/lib/pubid/isbn.rb +52 -0
- data/lib/pubid/iso/builder.rb +316 -0
- data/lib/pubid/iso/bundled_identifier.rb +138 -0
- data/lib/pubid/iso/combined_identifier.rb +24 -0
- data/lib/pubid/iso/components/code.rb +24 -0
- data/lib/pubid/iso/components/publisher.rb +62 -0
- data/lib/pubid/iso/components.rb +10 -0
- data/lib/pubid/iso/format_resolver.rb +45 -0
- data/lib/pubid/iso/identifier.rb +318 -0
- data/lib/pubid/iso/identifiers/addendum.rb +107 -0
- data/lib/pubid/iso/identifiers/amendment.rb +132 -0
- data/lib/pubid/iso/identifiers/corrigendum.rb +108 -0
- data/lib/pubid/iso/identifiers/data.rb +75 -0
- data/lib/pubid/iso/identifiers/directives.rb +65 -0
- data/lib/pubid/iso/identifiers/directives_supplement.rb +148 -0
- data/lib/pubid/iso/identifiers/extract.rb +30 -0
- data/lib/pubid/iso/identifiers/guide.rb +99 -0
- data/lib/pubid/iso/identifiers/international_standard.rb +168 -0
- data/lib/pubid/iso/identifiers/international_standardized_profile.rb +94 -0
- data/lib/pubid/iso/identifiers/international_workshop_agreement.rb +95 -0
- data/lib/pubid/iso/identifiers/pas.rb +93 -0
- data/lib/pubid/iso/identifiers/recommendation.rb +45 -0
- data/lib/pubid/iso/identifiers/supplement.rb +95 -0
- data/lib/pubid/iso/identifiers/tc_document.rb +137 -0
- data/lib/pubid/iso/identifiers/technical_report.rb +103 -0
- data/lib/pubid/iso/identifiers/technical_specification.rb +102 -0
- data/lib/pubid/iso/identifiers/technology_trends_assessments.rb +95 -0
- data/lib/pubid/iso/identifiers.rb +32 -0
- data/lib/pubid/iso/normalizer.rb +89 -0
- data/lib/pubid/iso/parser.rb +534 -0
- data/lib/pubid/iso/rendering_style.rb +120 -0
- data/lib/pubid/iso/single_identifier.rb +60 -0
- data/lib/pubid/iso/supplement_identifier.rb +53 -0
- data/lib/pubid/iso/urn_generator.rb +313 -0
- data/lib/pubid/iso/urn_parser.rb +442 -0
- data/lib/pubid/iso/utilities.rb +86 -0
- data/lib/pubid/iso.rb +236 -0
- data/lib/pubid/itu/builder.rb +360 -0
- data/lib/pubid/itu/components/code.rb +84 -0
- data/lib/pubid/itu/components/designation.rb +35 -0
- data/lib/pubid/itu/components/sector.rb +46 -0
- data/lib/pubid/itu/components/series.rb +25 -0
- data/lib/pubid/itu/components.rb +12 -0
- data/lib/pubid/itu/i18n.rb +9 -0
- data/lib/pubid/itu/i18n.yaml +30 -0
- data/lib/pubid/itu/identifier.rb +4 -0
- data/lib/pubid/itu/identifiers/addendum.rb +15 -0
- data/lib/pubid/itu/identifiers/amendment.rb +19 -0
- data/lib/pubid/itu/identifiers/annex.rb +83 -0
- data/lib/pubid/itu/identifiers/annex_of_recommendation.rb +87 -0
- data/lib/pubid/itu/identifiers/appendix_of_recommendation.rb +92 -0
- data/lib/pubid/itu/identifiers/base.rb +482 -0
- data/lib/pubid/itu/identifiers/combined_identifier.rb +121 -0
- data/lib/pubid/itu/identifiers/corrigendum.rb +35 -0
- data/lib/pubid/itu/identifiers/errata.rb +15 -0
- data/lib/pubid/itu/identifiers/handbook.rb +38 -0
- data/lib/pubid/itu/identifiers/question.rb +63 -0
- data/lib/pubid/itu/identifiers/recommendation.rb +15 -0
- data/lib/pubid/itu/identifiers/report.rb +39 -0
- data/lib/pubid/itu/identifiers/special_publication.rb +31 -0
- data/lib/pubid/itu/identifiers/standard_serialization.rb +58 -0
- data/lib/pubid/itu/identifiers/supplement.rb +149 -0
- data/lib/pubid/itu/identifiers.rb +25 -0
- data/lib/pubid/itu/model.rb +111 -0
- data/lib/pubid/itu/parser.rb +679 -0
- data/lib/pubid/itu/urn_generator.rb +135 -0
- data/lib/pubid/itu/urn_parser.rb +31 -0
- data/lib/pubid/itu.rb +78 -0
- data/lib/pubid/jcgm/builder.rb +106 -0
- data/lib/pubid/jcgm/components/publisher.rb +20 -0
- data/lib/pubid/jcgm/components.rb +9 -0
- data/lib/pubid/jcgm/identifier.rb +21 -0
- data/lib/pubid/jcgm/identifiers/amendment.rb +24 -0
- data/lib/pubid/jcgm/identifiers/corrigendum.rb +34 -0
- data/lib/pubid/jcgm/identifiers/guide.rb +21 -0
- data/lib/pubid/jcgm/identifiers/gum_guide.rb +39 -0
- data/lib/pubid/jcgm/identifiers/meeting.rb +47 -0
- data/lib/pubid/jcgm/identifiers.rb +13 -0
- data/lib/pubid/jcgm/parser.rb +151 -0
- data/lib/pubid/jcgm/renderer.rb +89 -0
- data/lib/pubid/jcgm/single_identifier.rb +118 -0
- data/lib/pubid/jcgm/supplement_identifier.rb +51 -0
- data/lib/pubid/jcgm/urn_generator.rb +116 -0
- data/lib/pubid/jcgm/urn_parser.rb +177 -0
- data/lib/pubid/jcgm.rb +86 -0
- data/lib/pubid/jis/builder.rb +116 -0
- data/lib/pubid/jis/identifier.rb +194 -0
- data/lib/pubid/jis/identifiers/amendment.rb +16 -0
- data/lib/pubid/jis/identifiers/corrigendum.rb +16 -0
- data/lib/pubid/jis/identifiers/explanation.rb +22 -0
- data/lib/pubid/jis/identifiers/japanese_industrial_standard.rb +16 -0
- data/lib/pubid/jis/identifiers/standard.rb +28 -0
- data/lib/pubid/jis/identifiers/technical_report.rb +32 -0
- data/lib/pubid/jis/identifiers/technical_specification.rb +32 -0
- data/lib/pubid/jis/identifiers.rb +17 -0
- data/lib/pubid/jis/parser.rb +135 -0
- data/lib/pubid/jis/renderer.rb +69 -0
- data/lib/pubid/jis/single_identifier.rb +31 -0
- data/lib/pubid/jis/supplement_identifier.rb +50 -0
- data/lib/pubid/jis/urn_generator.rb +25 -0
- data/lib/pubid/jis/urn_parser.rb +23 -0
- data/lib/pubid/jis.rb +69 -0
- data/lib/pubid/lutaml/no_store_registration.rb +30 -0
- data/lib/pubid/nist/builder.rb +481 -0
- data/lib/pubid/nist/caster.rb +1234 -0
- data/lib/pubid/nist/circular_supplement_builder.rb +293 -0
- data/lib/pubid/nist/components/code.rb +27 -0
- data/lib/pubid/nist/components/edition.rb +134 -0
- data/lib/pubid/nist/components/issue_number.rb +28 -0
- data/lib/pubid/nist/components/part.rb +77 -0
- data/lib/pubid/nist/components/stage.rb +53 -0
- data/lib/pubid/nist/components/supplement.rb +191 -0
- data/lib/pubid/nist/components/translation.rb +42 -0
- data/lib/pubid/nist/components/update.rb +103 -0
- data/lib/pubid/nist/components/version.rb +35 -0
- data/lib/pubid/nist/components/volume.rb +32 -0
- data/lib/pubid/nist/components.rb +18 -0
- data/lib/pubid/nist/configuration.rb +87 -0
- data/lib/pubid/nist/identifier.rb +8 -0
- data/lib/pubid/nist/identifiers/base.rb +744 -0
- data/lib/pubid/nist/identifiers/circular.rb +80 -0
- data/lib/pubid/nist/identifiers/circular_supplement.rb +60 -0
- data/lib/pubid/nist/identifiers/commercial_standard.rb +42 -0
- data/lib/pubid/nist/identifiers/commercial_standard_emergency.rb +58 -0
- data/lib/pubid/nist/identifiers/commercial_standards_monthly.rb +69 -0
- data/lib/pubid/nist/identifiers/crpl_report.rb +138 -0
- data/lib/pubid/nist/identifiers/dated_document.rb +49 -0
- data/lib/pubid/nist/identifiers/federal_information_processing_standards.rb +95 -0
- data/lib/pubid/nist/identifiers/grant_contractor_report.rb +36 -0
- data/lib/pubid/nist/identifiers/handbook.rb +58 -0
- data/lib/pubid/nist/identifiers/internal_report.rb +64 -0
- data/lib/pubid/nist/identifiers/letter_circular.rb +46 -0
- data/lib/pubid/nist/identifiers/miscellaneous_publication.rb +74 -0
- data/lib/pubid/nist/identifiers/monograph.rb +80 -0
- data/lib/pubid/nist/identifiers/ncstar.rb +41 -0
- data/lib/pubid/nist/identifiers/nsrds.rb +41 -0
- data/lib/pubid/nist/identifiers/owmwp.rb +35 -0
- data/lib/pubid/nist/identifiers/report.rb +77 -0
- data/lib/pubid/nist/identifiers/special_publication.rb +46 -0
- data/lib/pubid/nist/identifiers/technical_note.rb +91 -0
- data/lib/pubid/nist/identifiers.rb +33 -0
- data/lib/pubid/nist/parser.rb +752 -0
- data/lib/pubid/nist/parser_output_normalizer.rb +233 -0
- data/lib/pubid/nist/preprocessor.rb +443 -0
- data/lib/pubid/nist/renderer.rb +43 -0
- data/lib/pubid/nist/router.rb +149 -0
- data/lib/pubid/nist/series/base.rb +58 -0
- data/lib/pubid/nist/series/crpl.rb +13 -0
- data/lib/pubid/nist/series/fips.rb +14 -0
- data/lib/pubid/nist/series/ir.rb +57 -0
- data/lib/pubid/nist/series/letter_preserving.rb +15 -0
- data/lib/pubid/nist/series/mono.rb +19 -0
- data/lib/pubid/nist/series/ncstar.rb +20 -0
- data/lib/pubid/nist/series.rb +49 -0
- data/lib/pubid/nist/supplement_identifier.rb +84 -0
- data/lib/pubid/nist/urn_generator.rb +133 -0
- data/lib/pubid/nist/urn_parser.rb +67 -0
- data/lib/pubid/nist.rb +138 -0
- data/lib/pubid/oasis/builder.rb +79 -0
- data/lib/pubid/oasis/identifier.rb +160 -0
- data/lib/pubid/oasis/identifiers/standard.rb +29 -0
- data/lib/pubid/oasis/identifiers.rb +9 -0
- data/lib/pubid/oasis/parser.rb +34 -0
- data/lib/pubid/oasis/renderer.rb +29 -0
- data/lib/pubid/oasis/urn_generator.rb +25 -0
- data/lib/pubid/oasis/urn_parser.rb +22 -0
- data/lib/pubid/oasis.rb +79 -0
- data/lib/pubid/ogc/builder.rb +33 -0
- data/lib/pubid/ogc/identifier.rb +81 -0
- data/lib/pubid/ogc/identifiers/document.rb +26 -0
- data/lib/pubid/ogc/identifiers.rb +10 -0
- data/lib/pubid/ogc/parser.rb +40 -0
- data/lib/pubid/ogc/renderer.rb +33 -0
- data/lib/pubid/ogc/urn_generator.rb +14 -0
- data/lib/pubid/ogc/urn_parser.rb +22 -0
- data/lib/pubid/ogc.rb +71 -0
- data/lib/pubid/oiml/builder.rb +270 -0
- data/lib/pubid/oiml/components/code.rb +37 -0
- data/lib/pubid/oiml/components.rb +9 -0
- data/lib/pubid/oiml/identifier.rb +64 -0
- data/lib/pubid/oiml/identifiers/amendment.rb +13 -0
- data/lib/pubid/oiml/identifiers/annex.rb +29 -0
- data/lib/pubid/oiml/identifiers/basic_publication.rb +15 -0
- data/lib/pubid/oiml/identifiers/bulletin.rb +137 -0
- data/lib/pubid/oiml/identifiers/code_number.rb +90 -0
- data/lib/pubid/oiml/identifiers/document.rb +15 -0
- data/lib/pubid/oiml/identifiers/errata.rb +15 -0
- data/lib/pubid/oiml/identifiers/expert_report.rb +15 -0
- data/lib/pubid/oiml/identifiers/guide.rb +15 -0
- data/lib/pubid/oiml/identifiers/recommendation.rb +15 -0
- data/lib/pubid/oiml/identifiers/seminar_report.rb +15 -0
- data/lib/pubid/oiml/identifiers/vocabulary.rb +15 -0
- data/lib/pubid/oiml/identifiers.rb +20 -0
- data/lib/pubid/oiml/parser.rb +274 -0
- data/lib/pubid/oiml/renderer.rb +232 -0
- data/lib/pubid/oiml/single_identifier.rb +113 -0
- data/lib/pubid/oiml/supplement_identifier.rb +88 -0
- data/lib/pubid/oiml/urn_generator.rb +78 -0
- data/lib/pubid/oiml/urn_parser.rb +39 -0
- data/lib/pubid/oiml.rb +81 -0
- data/lib/pubid/omg/builder.rb +19 -0
- data/lib/pubid/omg/identifier.rb +47 -0
- data/lib/pubid/omg/identifiers/specification.rb +32 -0
- data/lib/pubid/omg/identifiers.rb +9 -0
- data/lib/pubid/omg/parser.rb +40 -0
- data/lib/pubid/omg/renderer.rb +19 -0
- data/lib/pubid/omg.rb +51 -0
- data/lib/pubid/parser/common_parse_methods.rb +13 -0
- data/lib/pubid/parser/common_parse_rules.rb +56 -0
- data/lib/pubid/parser/grammar.rb +74 -0
- data/lib/pubid/parser.rb +9 -0
- data/lib/pubid/parsers/base.rb +11 -0
- data/lib/pubid/parsers/mr_string.rb +206 -0
- data/lib/pubid/plateau/builder.rb +54 -0
- data/lib/pubid/plateau/identifier.rb +4 -0
- data/lib/pubid/plateau/identifiers/annex.rb +16 -0
- data/lib/pubid/plateau/identifiers/base.rb +55 -0
- data/lib/pubid/plateau/identifiers/handbook.rb +28 -0
- data/lib/pubid/plateau/identifiers/technical_report.rb +16 -0
- data/lib/pubid/plateau/identifiers.rb +11 -0
- data/lib/pubid/plateau/parser.rb +73 -0
- data/lib/pubid/plateau/renderer.rb +51 -0
- data/lib/pubid/plateau/supplement_identifier.rb +68 -0
- data/lib/pubid/plateau/urn_generator.rb +29 -0
- data/lib/pubid/plateau/urn_parser.rb +43 -0
- data/lib/pubid/plateau.rb +82 -0
- data/lib/pubid/prefixes_support.rb +51 -0
- data/lib/pubid/renderers/annotator.rb +233 -0
- data/lib/pubid/renderers/base.rb +66 -0
- data/lib/pubid/renderers/directives_renderer.rb +75 -0
- data/lib/pubid/renderers/guide_renderer.rb +26 -0
- data/lib/pubid/renderers/human_readable.rb +83 -0
- data/lib/pubid/renderers/iwa_renderer.rb +20 -0
- data/lib/pubid/renderers/mr_string.rb +64 -0
- data/lib/pubid/renderers/supplement_renderer.rb +36 -0
- data/lib/pubid/renderers/urn.rb +11 -0
- data/lib/pubid/renderers.rb +15 -0
- data/lib/pubid/rendering/context.rb +168 -0
- data/lib/pubid/rendering/date.rb +27 -0
- data/lib/pubid/rendering/language.rb +21 -0
- data/lib/pubid/rendering/numbering.rb +42 -0
- data/lib/pubid/rendering/publisher.rb +25 -0
- data/lib/pubid/rendering/stage.rb +38 -0
- data/lib/pubid/rendering/supplement.rb +46 -0
- data/lib/pubid/rendering.rb +13 -0
- data/lib/pubid/sae/builder.rb +32 -0
- data/lib/pubid/sae/components/code.rb +9 -0
- data/lib/pubid/sae/components/date.rb +27 -0
- data/lib/pubid/sae/components/type.rb +23 -0
- data/lib/pubid/sae/components.rb +11 -0
- data/lib/pubid/sae/identifier.rb +4 -0
- data/lib/pubid/sae/identifiers/base.rb +47 -0
- data/lib/pubid/sae/identifiers.rb +8 -0
- data/lib/pubid/sae/parser.rb +55 -0
- data/lib/pubid/sae/renderer.rb +36 -0
- data/lib/pubid/sae/urn_generator.rb +30 -0
- data/lib/pubid/sae/urn_parser.rb +36 -0
- data/lib/pubid/sae.rb +66 -0
- data/lib/pubid/tgpp/builder.rb +41 -0
- data/lib/pubid/tgpp/identifier.rb +107 -0
- data/lib/pubid/tgpp/identifiers/technical_report.rb +32 -0
- data/lib/pubid/tgpp/identifiers/technical_specification.rb +33 -0
- data/lib/pubid/tgpp/identifiers.rb +11 -0
- data/lib/pubid/tgpp/parser.rb +78 -0
- data/lib/pubid/tgpp/renderer.rb +52 -0
- data/lib/pubid/tgpp/urn_generator.rb +39 -0
- data/lib/pubid/tgpp/urn_parser.rb +30 -0
- data/lib/pubid/tgpp.rb +83 -0
- data/lib/pubid/type_resolver.rb +59 -0
- data/lib/pubid/un/builder.rb +42 -0
- data/lib/pubid/un/identifier.rb +40 -0
- data/lib/pubid/un/identifiers/document.rb +24 -0
- data/lib/pubid/un/identifiers.rb +9 -0
- data/lib/pubid/un/parser.rb +25 -0
- data/lib/pubid/un/renderer.rb +11 -0
- data/lib/pubid/un.rb +46 -0
- data/lib/pubid/urn_generator/base.rb +110 -0
- data/lib/pubid/urn_parser/base.rb +81 -0
- data/lib/pubid/urn_parser/errors.rb +16 -0
- data/lib/pubid/urn_parser.rb +14 -0
- data/lib/pubid/utils/string_normalizer.rb +196 -0
- data/lib/pubid/utils.rb +7 -0
- data/lib/pubid/version.rb +3 -1
- data/lib/pubid/w3c/builder.rb +55 -0
- data/lib/pubid/w3c/identifier.rb +130 -0
- data/lib/pubid/w3c/identifiers/candidate_recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/candidate_recommendation_draft.rb +31 -0
- data/lib/pubid/w3c/identifiers/draft_note.rb +31 -0
- data/lib/pubid/w3c/identifiers/note.rb +30 -0
- data/lib/pubid/w3c/identifiers/obsolete_recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/proposed_edited_recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/proposed_recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/standard.rb +12 -0
- data/lib/pubid/w3c/identifiers/superseded_recommendation.rb +31 -0
- data/lib/pubid/w3c/identifiers/working_draft.rb +30 -0
- data/lib/pubid/w3c/identifiers.rb +25 -0
- data/lib/pubid/w3c/parser.rb +43 -0
- data/lib/pubid/w3c/renderer.rb +35 -0
- data/lib/pubid/w3c/urn_generator.rb +18 -0
- data/lib/pubid/w3c/urn_parser.rb +36 -0
- data/lib/pubid/w3c.rb +67 -0
- data/lib/pubid/xsf/builder.rb +17 -0
- data/lib/pubid/xsf/identifier.rb +66 -0
- data/lib/pubid/xsf/identifiers/xep.rb +31 -0
- data/lib/pubid/xsf/identifiers.rb +9 -0
- data/lib/pubid/xsf/parser.rb +25 -0
- data/lib/pubid/xsf/renderer.rb +23 -0
- data/lib/pubid/xsf/urn_generator.rb +13 -0
- data/lib/pubid/xsf/urn_parser.rb +18 -0
- data/lib/pubid/xsf.rb +81 -0
- data/lib/pubid.rb +551 -13
- data/lib/tasks/docs.rake +37 -0
- data/lib/tasks/export.rake +39 -0
- data/lib/tasks/website-data.json +7546 -0
- metadata +875 -171
- data/lib/pubid/registry.rb +0 -30
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Bipm
|
|
5
|
+
# Turns the parse tree into the matching concrete identifier. Each root
|
|
6
|
+
# branch tags its subtree with a distinct key, so dispatch is a lookup on
|
|
7
|
+
# which key the parser produced.
|
|
8
|
+
class Builder
|
|
9
|
+
def self.build(parsed_data)
|
|
10
|
+
new.build(parsed_data)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build(data)
|
|
14
|
+
if data[:committee_short]
|
|
15
|
+
build_committee(data[:committee_short], form: "short")
|
|
16
|
+
elsif data[:committee_long_en]
|
|
17
|
+
build_committee(data[:committee_long_en], form: "long", language: "E")
|
|
18
|
+
elsif data[:committee_bare]
|
|
19
|
+
# Bare MRA form: no type word, so build_committee yields nil type.
|
|
20
|
+
build_committee(data[:committee_bare], form: "short")
|
|
21
|
+
elsif data[:committee_long_fr]
|
|
22
|
+
build_committee(data[:committee_long_fr], form: "long", language: "F")
|
|
23
|
+
elsif data[:meeting_en]
|
|
24
|
+
build_meeting(data[:meeting_en])
|
|
25
|
+
elsif data[:meeting_fr]
|
|
26
|
+
build_meeting(data[:meeting_fr], language: "F")
|
|
27
|
+
elsif data.key?(:metrologia)
|
|
28
|
+
build_metrologia(data[:metrologia])
|
|
29
|
+
elsif data[:si_brochure]
|
|
30
|
+
build_si_brochure(data[:si_brochure])
|
|
31
|
+
elsif data[:si_brochure_variant]
|
|
32
|
+
build_si_brochure_variant(data[:si_brochure_variant])
|
|
33
|
+
elsif data.key?(:si_brochure_section)
|
|
34
|
+
build_si_brochure_section(data[:si_brochure_section])
|
|
35
|
+
elsif data[:mep]
|
|
36
|
+
build_mep(data[:mep])
|
|
37
|
+
elsif data[:guide]
|
|
38
|
+
build_guide(data[:guide])
|
|
39
|
+
else
|
|
40
|
+
raise "Unrecognized BIPM parse tree: #{data.inspect}"
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
private
|
|
45
|
+
|
|
46
|
+
# `group` and `language` are normalized here, so a historic committee
|
|
47
|
+
# name (CCDS) and a two-letter language code (EN/FR) never reach an
|
|
48
|
+
# attribute — the index stores only the current name and the one-letter
|
|
49
|
+
# code BIPM prints.
|
|
50
|
+
def build_committee(node, form:, language: nil)
|
|
51
|
+
Identifiers::CommitteeDocument.new(
|
|
52
|
+
group: Identifier.normalize_group(node[:group]),
|
|
53
|
+
type_code: Identifier::TYPE_WORD_TO_CODE[node[:type_word].to_s],
|
|
54
|
+
number: node[:number]&.to_s,
|
|
55
|
+
year: node[:year]&.to_s&.to_i,
|
|
56
|
+
language: Identifier.normalize_language(language || node[:language]),
|
|
57
|
+
form: form,
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def build_meeting(node, language: nil)
|
|
62
|
+
Identifiers::Meeting.new(
|
|
63
|
+
group: Identifier.normalize_group(node[:group]),
|
|
64
|
+
number: node[:number].to_s,
|
|
65
|
+
year: node[:year]&.to_s&.to_i,
|
|
66
|
+
language: Identifier.normalize_language(language || node[:language]),
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# `number` is the volume, so every article of a volume clusters into one
|
|
71
|
+
# relaton-index bucket (the IETF draft-slug / IANA registry-slug
|
|
72
|
+
# convention). It is nil only for the journal-level record, which carries
|
|
73
|
+
# no volume at all.
|
|
74
|
+
#
|
|
75
|
+
# It is deliberately redundant with `volume`, which stays because the
|
|
76
|
+
# renderer and the URN generator read it. Two limits of that redundancy,
|
|
77
|
+
# both accepted rather than engineered around (see the note above
|
|
78
|
+
# NUMBER_SOURCE_ATTRIBUTES in identifier.rb for the half that IS
|
|
79
|
+
# handled):
|
|
80
|
+
#
|
|
81
|
+
# * THE BUILDER IS THE CONSTRUCTOR OF RECORD. A caller that bypasses it
|
|
82
|
+
# — `MetrologiaArticle.new(volume: 51, …)` — gets a nil `number` and
|
|
83
|
+
# so an empty index key. Deriving it in `initialize` instead would
|
|
84
|
+
# cover that, but `#exclude` rebuilds through `self.class.new`, so it
|
|
85
|
+
# would also silently re-fill a `number` the caller just excluded.
|
|
86
|
+
# * NO SELF-HEALING ACROSS from_hash. lutaml assigns attributes AFTER
|
|
87
|
+
# `initialize`, so a legacy pre-`number` index row (one carrying only
|
|
88
|
+
# `volume`) deserializes with `number` nil and no error at all —
|
|
89
|
+
# lutaml ignores unknown keys and relaton's `id_supported?` skips its
|
|
90
|
+
# round-trip check for concrete subclasses, which every BIPM id is.
|
|
91
|
+
# relaton-data-bipm must regenerate index-v2 to gain the key. This is
|
|
92
|
+
# weaker than the IEEE `CodeNumber` mixin, which rebuilds `code_obj`
|
|
93
|
+
# from its split columns after `from_hash`.
|
|
94
|
+
def build_metrologia(node)
|
|
95
|
+
node = {} unless node.is_a?(Hash)
|
|
96
|
+
Identifiers::MetrologiaArticle.new(
|
|
97
|
+
number: node[:volume]&.to_s,
|
|
98
|
+
issue: node[:issue]&.to_s,
|
|
99
|
+
article: node[:article]&.to_s,
|
|
100
|
+
)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# The SI Brochure has no document number of its own, so the edition is
|
|
104
|
+
# the index key — it clusters the English and French records of one
|
|
105
|
+
# edition. The grammar makes `edition` mandatory here, so it is never nil.
|
|
106
|
+
def build_si_brochure(node)
|
|
107
|
+
Identifiers::SiBrochure.new(
|
|
108
|
+
number: node[:edition].to_s,
|
|
109
|
+
edition: node[:edition].to_s,
|
|
110
|
+
version: node[:version].to_s,
|
|
111
|
+
years: node[:years].to_s,
|
|
112
|
+
language: Identifier.normalize_language(node[:language]),
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# The derived products (Appendix N, Concise, FAQ) carry no edition, so
|
|
117
|
+
# the variant name is their key. The grammar makes it mandatory here.
|
|
118
|
+
def build_si_brochure_variant(node)
|
|
119
|
+
variant = node[:variant].to_s
|
|
120
|
+
Identifiers::SiBrochure.new(number: variant, variant: variant)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# A bare or sectioned reference names no edition, so it gets no key: it is
|
|
124
|
+
# a partial reference that wildcards every edition. The bare form captures
|
|
125
|
+
# nothing, so the parser hands back a slice rather than a hash.
|
|
126
|
+
def build_si_brochure_section(node)
|
|
127
|
+
node = {} unless node.is_a?(Hash)
|
|
128
|
+
Identifiers::SiBrochure.new(part: node[:part]&.to_s)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# The Appendix/Annex/Part tail is the full-content spelling of the SAME
|
|
132
|
+
# document, so it stays out of the key.
|
|
133
|
+
def build_mep(node)
|
|
134
|
+
Identifiers::Mep.new(
|
|
135
|
+
**mep_codes(node),
|
|
136
|
+
appendix: node[:appendix]&.to_s,
|
|
137
|
+
annex: node[:annex]&.to_s,
|
|
138
|
+
part: node[:part]&.to_s,
|
|
139
|
+
)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# A MEP is identified by its unit code, or by the report code for the
|
|
143
|
+
# `Rapport BIPM-YYYY/NN` variant; exactly one of the two is set, and
|
|
144
|
+
# whichever it is becomes the relaton index key.
|
|
145
|
+
def mep_codes(node)
|
|
146
|
+
mep_code = node[:mep_code]&.to_s
|
|
147
|
+
report_code = node[:report_code]&.to_s
|
|
148
|
+
{ number: mep_code || report_code, mep_code: mep_code,
|
|
149
|
+
report_code: report_code }
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def build_guide(node)
|
|
153
|
+
Identifiers::Guide.new(
|
|
154
|
+
group: Identifier.normalize_group(node[:group]),
|
|
155
|
+
guide_kind: node[:guide_kind].to_s,
|
|
156
|
+
number: node[:number].to_s,
|
|
157
|
+
appendix: node[:appendix]&.to_s,
|
|
158
|
+
part: node[:part]&.to_s,
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
end
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Bipm
|
|
5
|
+
# Base class for every BIPM identifier AND the flavor's parse/create entry
|
|
6
|
+
# point — mirrors Pubid::Jis::Identifier. Concrete identifiers under
|
|
7
|
+
# Pubid::Bipm::Identifiers descend from this class.
|
|
8
|
+
#
|
|
9
|
+
# BIPM has several unrelated document families (committee documents,
|
|
10
|
+
# meetings, the Metrologia journal, the SI Brochure and its appendices,
|
|
11
|
+
# mises en pratique, and Consultative-Committee guides) with no shared
|
|
12
|
+
# numbering, so every family-specific attribute lives here as a flat,
|
|
13
|
+
# nil-defaulted attribute and is used only by the classes that need it. The
|
|
14
|
+
# canonical `to_hash` drops any attribute at its default/empty value, so an
|
|
15
|
+
# unused attribute never appears in a family's serialized hash.
|
|
16
|
+
class Identifier < ::Pubid::Identifier
|
|
17
|
+
# Committee acronyms BIPM owns (JCGM excluded — see Pubid::Jcgm).
|
|
18
|
+
GROUPS = %w[
|
|
19
|
+
CIPM CGPM JCRB CCTF CCQM CCT CCL CCAUV CCU CCM CCEM CCPR CCRI
|
|
20
|
+
].freeze
|
|
21
|
+
|
|
22
|
+
# Historic committee names consumer references still use. BIPM renamed the
|
|
23
|
+
# CCDS (Comité Consultatif pour la Définition de la Seconde) to CCTF in
|
|
24
|
+
# 1997 and the index keys the current name, so an alias is resolved at
|
|
25
|
+
# parse time and never stored. Extend the map, not the parser, to add one.
|
|
26
|
+
GROUP_ALIASES = { "CCDS" => "CCTF" }.freeze
|
|
27
|
+
|
|
28
|
+
# Every group token the grammar accepts, current names and aliases alike.
|
|
29
|
+
PARSEABLE_GROUPS = (GROUPS + GROUP_ALIASES.keys).freeze
|
|
30
|
+
|
|
31
|
+
# Two-letter codes consumer references use for the one-letter language
|
|
32
|
+
# codes BIPM prints. Resolved at parse time, so only "E"/"F" is stored.
|
|
33
|
+
LANGUAGE_ALIASES = { "EN" => "E", "FR" => "F" }.freeze
|
|
34
|
+
|
|
35
|
+
# Committee document type codes and their printed long-form names. Note
|
|
36
|
+
# DECL prints as "Statement" in BOTH languages in the source data.
|
|
37
|
+
TYPE_CODES = %w[REC RES DECN ACT DECL].freeze
|
|
38
|
+
TYPE_NAME_EN = {
|
|
39
|
+
"REC" => "Recommendation", "RES" => "Resolution",
|
|
40
|
+
"DECN" => "Decision", "ACT" => "Action", "DECL" => "Statement"
|
|
41
|
+
}.freeze
|
|
42
|
+
TYPE_NAME_FR = {
|
|
43
|
+
"REC" => "Recommandation", "RES" => "Résolution",
|
|
44
|
+
"DECN" => "Décision", "ACT" => "Action", "DECL" => "Statement"
|
|
45
|
+
}.freeze
|
|
46
|
+
# Printed type words that are not the canonical name of their code. BIPM
|
|
47
|
+
# prints DECL as "Statement" in both languages, but a reference spells the
|
|
48
|
+
# word out; without these the parser matched "Declaration" and then mapped
|
|
49
|
+
# it to NO code, so the renderer emitted a corrupt "CGPM 1 (1971)".
|
|
50
|
+
TYPE_WORD_ALIASES = {
|
|
51
|
+
"Declaration" => "DECL", "Déclaration" => "DECL"
|
|
52
|
+
}.freeze
|
|
53
|
+
|
|
54
|
+
# Every printed type word (abbrev + English + French + alias) → code.
|
|
55
|
+
TYPE_WORD_TO_CODE = TYPE_CODES.each_with_object({}) do |code, map|
|
|
56
|
+
map[code] = code
|
|
57
|
+
map[TYPE_NAME_EN[code]] = code
|
|
58
|
+
map[TYPE_NAME_FR[code]] = code
|
|
59
|
+
end.merge(TYPE_WORD_ALIASES).freeze
|
|
60
|
+
|
|
61
|
+
# Shared attributes (flat). Booleans/strings carry no default so they stay
|
|
62
|
+
# nil and drop from the serialized hash unless set.
|
|
63
|
+
attribute :group, :string
|
|
64
|
+
attribute :type_code, :string # REC/RES/DECN/ACT/DECL (avoids base `type`)
|
|
65
|
+
attribute :number, :string # may be hyphenated ("10-1") or nil
|
|
66
|
+
attribute :year, :integer
|
|
67
|
+
attribute :language, :string # "E"/"F"; nil = language-neutral
|
|
68
|
+
# Surface style of committee documents: "short" (abbreviated key form) vs
|
|
69
|
+
# "long" (full type-word name). Defaults to "short" so it drops from the
|
|
70
|
+
# canonical hash for the indexed primary form.
|
|
71
|
+
attribute :form, :string, default: "short"
|
|
72
|
+
# Metrologia journal fields. `volume` is NOT stored — it is exactly the
|
|
73
|
+
# index key, so MetrologiaArticle derives it from `number` (the IANA
|
|
74
|
+
# `registry` / IETF `series` pattern) rather than serializing both.
|
|
75
|
+
attribute :issue, :string # may be alphanumeric ("1A")
|
|
76
|
+
attribute :article, :string
|
|
77
|
+
# SI Brochure fields.
|
|
78
|
+
attribute :edition, :string # "9e"
|
|
79
|
+
attribute :version, :string # "v3.01"
|
|
80
|
+
attribute :years, :string # "2019/2024"
|
|
81
|
+
# SI Brochure appendix/derived variant: "Appendix 3", "Concise", "FAQ".
|
|
82
|
+
attribute :variant, :string
|
|
83
|
+
# Mise en pratique (MEP) fields.
|
|
84
|
+
attribute :mep_code, :string # "S1", "KUPRTM"
|
|
85
|
+
attribute :report_code, :string # MEP report variant: "BIPM-2019/05"
|
|
86
|
+
# Consultative-Committee guide kind ("MeP"/"RSI"); group + number reused.
|
|
87
|
+
attribute :guide_kind, :string
|
|
88
|
+
# Full-content "Appendix N [Annex N] Part N.M" tail shared by MEP + guide
|
|
89
|
+
# primary-docidentifier forms (nil for the bare short docnumber spelling).
|
|
90
|
+
attribute :appendix, :string
|
|
91
|
+
attribute :annex, :string
|
|
92
|
+
attribute :part, :string
|
|
93
|
+
|
|
94
|
+
# Attributes `Builder` derives `number` from for the families that have no
|
|
95
|
+
# document number of their own. Excluding one of these has to clear
|
|
96
|
+
# `number` too, or a wildcarded identifier would keep a stale index key —
|
|
97
|
+
# the "reset the WHOLE cluster, not just the scalar" lesson CLAUDE.md
|
|
98
|
+
# records for CSA's year and IEEE's year/month/day. `:volume` is listed
|
|
99
|
+
# even though it is no longer an attribute: the base loop skips it, but
|
|
100
|
+
# `exclude(:volume)` must still clear the key it derives from.
|
|
101
|
+
NUMBER_SOURCE_ATTRIBUTES = %i[
|
|
102
|
+
volume edition variant mep_code report_code
|
|
103
|
+
].freeze
|
|
104
|
+
|
|
105
|
+
# Polymorphic type map for lutaml::Model key_value (de)serialization:
|
|
106
|
+
# maps each subclass's polymorphic_name to its class name so a stored hash
|
|
107
|
+
# rebuilds the correct identifier type via from_hash.
|
|
108
|
+
BIPM_TYPE_MAP = {
|
|
109
|
+
"pubid:bipm:committee-document" =>
|
|
110
|
+
"Pubid::Bipm::Identifiers::CommitteeDocument",
|
|
111
|
+
"pubid:bipm:meeting" => "Pubid::Bipm::Identifiers::Meeting",
|
|
112
|
+
"pubid:bipm:metrologia-article" =>
|
|
113
|
+
"Pubid::Bipm::Identifiers::MetrologiaArticle",
|
|
114
|
+
"pubid:bipm:si-brochure" => "Pubid::Bipm::Identifiers::SiBrochure",
|
|
115
|
+
"pubid:bipm:mep" => "Pubid::Bipm::Identifiers::Mep",
|
|
116
|
+
"pubid:bipm:guide" => "Pubid::Bipm::Identifiers::Guide",
|
|
117
|
+
}.freeze
|
|
118
|
+
|
|
119
|
+
key_value do
|
|
120
|
+
map "_type", to: :_type, polymorphic_map: BIPM_TYPE_MAP
|
|
121
|
+
map "group", to: :group
|
|
122
|
+
map "type_code", to: :type_code
|
|
123
|
+
map "number", to: :number
|
|
124
|
+
map "year", to: :year
|
|
125
|
+
map "language", to: :language
|
|
126
|
+
map "form", to: :form
|
|
127
|
+
map "issue", to: :issue
|
|
128
|
+
map "article", to: :article
|
|
129
|
+
map "edition", to: :edition
|
|
130
|
+
map "version", to: :version
|
|
131
|
+
map "years", to: :years
|
|
132
|
+
map "variant", to: :variant
|
|
133
|
+
map "mep_code", to: :mep_code
|
|
134
|
+
map "report_code", to: :report_code
|
|
135
|
+
map "guide_kind", to: :guide_kind
|
|
136
|
+
map "appendix", to: :appendix
|
|
137
|
+
map "annex", to: :annex
|
|
138
|
+
map "part", to: :part
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Publisher is always "BIPM". A plain constant (not a `publisher` method)
|
|
142
|
+
# so it doesn't shadow the inherited lutaml `publisher` attribute, which
|
|
143
|
+
# would otherwise fail serialization type validation.
|
|
144
|
+
PUBLISHER = "BIPM"
|
|
145
|
+
|
|
146
|
+
# French connective before a committee acronym: "de la" for the (feminine)
|
|
147
|
+
# CGPM, "du" for every other (masculine) committee.
|
|
148
|
+
def self.french_connective(group)
|
|
149
|
+
group == "CGPM" ? "de la" : "du"
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Resolve a historic committee name to the name the index keys.
|
|
153
|
+
def self.normalize_group(token)
|
|
154
|
+
name = token.to_s
|
|
155
|
+
GROUP_ALIASES.fetch(name, name)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Resolve a two-letter language code to the one-letter code BIPM prints.
|
|
159
|
+
def self.normalize_language(token)
|
|
160
|
+
return nil if token.nil?
|
|
161
|
+
|
|
162
|
+
code = token.to_s
|
|
163
|
+
LANGUAGE_ALIASES.fetch(code, code)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
def long?
|
|
167
|
+
form == "long"
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# BIPM keeps the publication year in its own `year` integer attribute
|
|
171
|
+
# rather than the base `date` component, so the base #exclude's
|
|
172
|
+
# :year->:date remap would nil the (unused) inherited `date` and leave
|
|
173
|
+
# `year` intact. Clear `year` directly when either alias is excluded so
|
|
174
|
+
# `matches?(row, ignore: [:year])` treats a partial (date-less) reference
|
|
175
|
+
# as a year wildcard.
|
|
176
|
+
def exclude(*args)
|
|
177
|
+
result = super
|
|
178
|
+
result.year = nil if args.include?(:year) || args.include?(:date)
|
|
179
|
+
result.number = nil if args.intersect?(NUMBER_SOURCE_ATTRIBUTES)
|
|
180
|
+
result
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Basic string representation. Delegates to renderer.
|
|
184
|
+
def to_s(**opts)
|
|
185
|
+
render(format: :human, **opts)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# --- MR string / slug -------------------------------------------------
|
|
189
|
+
#
|
|
190
|
+
# `to_slug` is what consumers use as an output FILENAME, so every BIPM
|
|
191
|
+
# identifier needs a non-empty, filename-safe, non-colliding MR. None of
|
|
192
|
+
# the base ::Pubid::Identifier hooks work here unchanged, because BIPM
|
|
193
|
+
# models each of them with its own flat attribute rather than the shared
|
|
194
|
+
# component the base expects. Each override below says which.
|
|
195
|
+
#
|
|
196
|
+
# The number segment and the family discriminator are supplied per leaf
|
|
197
|
+
# (`mr_number_with_part` / `mr_type`), because BIPM's six families share
|
|
198
|
+
# no numbering.
|
|
199
|
+
#
|
|
200
|
+
# Three deliberate collapses — MR is a canonical DOCUMENT slug, so
|
|
201
|
+
# alternate print spellings of one document share it (the URN already
|
|
202
|
+
# collapses the first two): `form` (short vs long committee spelling) and
|
|
203
|
+
# the MEP/Guide `appendix`/`annex`/`part` full-content tail are omitted,
|
|
204
|
+
# while `language` is kept because the E and F records are distinct
|
|
205
|
+
# documents upstream.
|
|
206
|
+
|
|
207
|
+
# BIPM keeps its publisher in the PUBLISHER constant rather than the
|
|
208
|
+
# inherited `publisher` attribute (which would fail type validation), so
|
|
209
|
+
# the base hook — `publisher&.to_s` — is nil. The JIS/IANA shape.
|
|
210
|
+
def mr_publisher
|
|
211
|
+
PUBLISHER.downcase
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# BIPM stores the publication year in its own :integer attribute rather
|
|
215
|
+
# than a Components::Date, so the base hook reads an unset `date`.
|
|
216
|
+
def mr_year
|
|
217
|
+
year&.to_s
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# BIPM's `edition` is a plain :string ("9e"), not a Components::Edition,
|
|
221
|
+
# so the base hook's `edition.number` raises NoMethodError. SiBrochure
|
|
222
|
+
# folds the edition into its own number segment instead.
|
|
223
|
+
def mr_edition
|
|
224
|
+
nil
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# BIPM has a single `language` string, not the base's `languages`
|
|
228
|
+
# collection.
|
|
229
|
+
def mr_languages
|
|
230
|
+
language&.to_s&.downcase
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# BIPM uses its own `type_code` attribute rather than a typed_stage, so
|
|
234
|
+
# the base hook is always nil; the leaves supply the discriminator.
|
|
235
|
+
def mr_type
|
|
236
|
+
nil
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Join the parts of a number segment into one filename-safe token.
|
|
240
|
+
#
|
|
241
|
+
# The sanitisation is by CHARSET, not an enumerated escape list, so a
|
|
242
|
+
# field added later cannot leak an unsafe character: everything outside
|
|
243
|
+
# [a-z0-9] collapses to `-`. BIPM needs at least three of those today —
|
|
244
|
+
# a `/` (the MEP report code "BIPM-2019/05"), a space (the SI Brochure
|
|
245
|
+
# variant "Appendix 3") and a `.` (the brochure version "v3.01"). The
|
|
246
|
+
# dot matters beyond filename safety: Renderers::MrString joins SEGMENTS
|
|
247
|
+
# with ".", so a dot inside one would break the documented segment
|
|
248
|
+
# structure.
|
|
249
|
+
#
|
|
250
|
+
# Caveat: `-` is both the intra-segment join and a substitute, so two
|
|
251
|
+
# different field splits could in principle produce one slug. That
|
|
252
|
+
# cannot happen with today's grammar — none of `group`, `guide_kind`,
|
|
253
|
+
# `mep_code`, `issue` or `article` admits a `-`, and `number`'s own
|
|
254
|
+
# internal `-` ("10-1") is unambiguous because the `group` before it
|
|
255
|
+
# cannot contain one. A future hyphen-bearing free-text field would
|
|
256
|
+
# need a different join.
|
|
257
|
+
def mr_slug(*parts)
|
|
258
|
+
slug = parts.compact.map(&:to_s).reject(&:empty?).join("-").downcase
|
|
259
|
+
slug = slug.gsub(/[^a-z0-9]+/, "-").gsub(/\A-+|-+\z/, "")
|
|
260
|
+
slug unless slug.empty?
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Parse a BIPM identifier string into an identifier object.
|
|
264
|
+
# @param identifier [String] the BIPM identifier string
|
|
265
|
+
# @return [Identifier] the appropriate identifier object
|
|
266
|
+
# @raise [Pubid::Errors::ParseError] if parsing fails
|
|
267
|
+
def self.parse(identifier)
|
|
268
|
+
unless identifier.is_a?(String)
|
|
269
|
+
raise Pubid::Errors::InvalidInputError,
|
|
270
|
+
Pubid::INPUT_NOT_A_STRING_MESSAGE
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
if identifier.length > Pubid::MAX_INPUT_LENGTH
|
|
274
|
+
raise Pubid::Errors::InvalidInputError, Pubid::INPUT_TOO_LONG_MESSAGE
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Normalize legacy/docnumber-style spellings before parsing
|
|
278
|
+
# (data/bipm/update_codes.yaml), mirroring Pubid::Ccsds / Pubid::Plateau.
|
|
279
|
+
normalized = Core::UpdateCodes.apply(identifier, :bipm)
|
|
280
|
+
parsed = Parser.parse(normalized)
|
|
281
|
+
Builder.build(parsed)
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Bipm
|
|
5
|
+
module Identifiers
|
|
6
|
+
# A committee document: a Recommendation (REC), Resolution (RES),
|
|
7
|
+
# Decision (DECN), Action (ACT) or Declaration (DECL) issued by one of the
|
|
8
|
+
# BIPM committees.
|
|
9
|
+
#
|
|
10
|
+
# Printed forms (all round-trip):
|
|
11
|
+
# "CCTF REC 2 (2012)" short, language-neutral
|
|
12
|
+
# "CCTF REC 2 (2012, E)" short, with language
|
|
13
|
+
# "CGPM DECL (1889)" number-less
|
|
14
|
+
# "CCL Recommendation 1 (2001)" full English name (form: "long")
|
|
15
|
+
# "Recommandation 1 du CCL (2001)" full French name (form: "long")
|
|
16
|
+
class CommitteeDocument < Identifier
|
|
17
|
+
def self.type
|
|
18
|
+
{ key: :committee_document, web: :committee_document,
|
|
19
|
+
title: "Committee Document", short: "committee-document" }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# MR: `bipm.<type>.<group>-<number>.<year>[.<lang>]`. The type code
|
|
23
|
+
# discriminates REC/RES/DECN/ACT/DECL; the bare CIPM MRA form has none.
|
|
24
|
+
def mr_type
|
|
25
|
+
type_code&.downcase
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# The group has to be in the number segment or `CCTF REC 2` and
|
|
29
|
+
# `CCEM REC 2` would share a slug.
|
|
30
|
+
def mr_number_with_part
|
|
31
|
+
mr_slug(group, number)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Bipm
|
|
5
|
+
module Identifiers
|
|
6
|
+
# A Consultative-Committee guideline document (realization / calibration
|
|
7
|
+
# guide). Printed from its short docnumber form, the relaton index key.
|
|
8
|
+
#
|
|
9
|
+
# Printed forms (all round-trip):
|
|
10
|
+
# "CCL-GD-MeP-1" metre realization guide
|
|
11
|
+
# "CCEM-GD-RSI-1" ampere realization guide
|
|
12
|
+
# "CCM-GD-RSI-2" kilogram dissemination guide
|
|
13
|
+
#
|
|
14
|
+
# Shape: <committee>-GD-<kind>-<number>, where <kind> is "MeP" (mise en
|
|
15
|
+
# pratique guide) or "RSI" (réalisation du SI guide). The committee reuses
|
|
16
|
+
# the shared `group` attribute; the trailing sequence reuses `number`.
|
|
17
|
+
class Guide < Identifier
|
|
18
|
+
def self.type
|
|
19
|
+
{ key: :guide, web: :guide, title: "Guide", short: "guide" }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# MR: `bipm.guide.<group>-<kind>-<number>`. Both the committee and the
|
|
23
|
+
# kind are needed — the trailing sequence restarts per committee, so
|
|
24
|
+
# `CCL-GD-MeP-1` and `CCEM-GD-RSI-1` both carry number "1".
|
|
25
|
+
def mr_type
|
|
26
|
+
"guide"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def mr_number_with_part
|
|
30
|
+
mr_slug(group, guide_kind, number)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Bipm
|
|
5
|
+
module Identifiers
|
|
6
|
+
# A committee meeting (proceedings). Printed with a naive ordinal derived
|
|
7
|
+
# from the first number component's last digit (as the source data
|
|
8
|
+
# generates it: "11st", "12nd", "13rd"), and ranges keep that first
|
|
9
|
+
# component's ordinal ("100-1th").
|
|
10
|
+
#
|
|
11
|
+
# Printed forms (all round-trip):
|
|
12
|
+
# "CGPM 17th Meeting (1983)" English (language nil)
|
|
13
|
+
# "CCAUV 11st Meeting (2017)" naive ordinal
|
|
14
|
+
# "CIPM 100-1th Meeting (2011)" range
|
|
15
|
+
# "CCAUV 10<sup>e</sup> réunion (2015)" French (language "F")
|
|
16
|
+
class Meeting < Identifier
|
|
17
|
+
def self.type
|
|
18
|
+
{ key: :meeting, web: :meeting, title: "Meeting", short: "meeting" }
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# English ordinal suffix from the first number component's last digit.
|
|
22
|
+
# Naive (matches the source data): 1→st, 2→nd, 3→rd, else→th — no
|
|
23
|
+
# 11/12/13 exception, so "11" → "11st", and a range "22-23" → "22-23nd".
|
|
24
|
+
def self.ordinal_suffix(number)
|
|
25
|
+
first = number.to_s.split("-").first.to_s
|
|
26
|
+
case first[-1]
|
|
27
|
+
when "1" then "st"
|
|
28
|
+
when "2" then "nd"
|
|
29
|
+
when "3" then "rd"
|
|
30
|
+
else "th"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# "15" → "15th", "100-1" → "100-1th".
|
|
35
|
+
def ordinal_en
|
|
36
|
+
"#{number}#{self.class.ordinal_suffix(number)}"
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# MR: `bipm.meeting.<group>-<number>.<year>`. The English and French
|
|
40
|
+
# spellings of one meeting collapse onto the same slug on purpose.
|
|
41
|
+
def mr_type
|
|
42
|
+
"meeting"
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# The group has to be in the number segment or the 17th CGPM and the
|
|
46
|
+
# 17th CIPM meeting would share a slug.
|
|
47
|
+
def mr_number_with_part
|
|
48
|
+
mr_slug(group, number)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Bipm
|
|
5
|
+
module Identifiers
|
|
6
|
+
# A mise en pratique (MEP) of an SI base-unit definition, and the related
|
|
7
|
+
# BIPM report variant. Printed from the short docnumber form that relaton
|
|
8
|
+
# uses as the index key — NOT the long "Appendix 2 Part x" content string.
|
|
9
|
+
#
|
|
10
|
+
# Printed forms (all round-trip):
|
|
11
|
+
# "SI MEP S1" standard MEP code (unit letter + number)
|
|
12
|
+
# "SI MEP KUPRTM" alphabetic MEP code
|
|
13
|
+
# "Rapport BIPM-2019/05" report variant (mep_code absent, report_code set)
|
|
14
|
+
class Mep < Identifier
|
|
15
|
+
def self.type
|
|
16
|
+
{ key: :mep, web: :mep, title: "Mise en pratique", short: "mep" }
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# MR: `bipm.mep.<code>`. Exactly one of `mep_code` / `report_code` is
|
|
20
|
+
# set; the report code carries a `/` that `mr_slug` sanitises away. The
|
|
21
|
+
# full-content "Appendix 2 Part x" tail is the same document, so it
|
|
22
|
+
# stays out of the slug.
|
|
23
|
+
def mr_type
|
|
24
|
+
"mep"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def mr_number_with_part
|
|
28
|
+
mr_slug(mep_code || report_code)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Bipm
|
|
5
|
+
module Identifiers
|
|
6
|
+
# A Metrologia journal reference, at volume, volume+issue, or
|
|
7
|
+
# volume+issue+article granularity. Issue may be alphanumeric ("1A") and
|
|
8
|
+
# the article keeps its printed form ("06007", "S138").
|
|
9
|
+
#
|
|
10
|
+
# Printed forms (all round-trip):
|
|
11
|
+
# "Metrologia 51" volume only
|
|
12
|
+
# "Metrologia 1 1" volume + issue
|
|
13
|
+
# "Metrologia 51 1 128" volume + issue + article
|
|
14
|
+
class MetrologiaArticle < Identifier
|
|
15
|
+
GROUP = "Metrologia"
|
|
16
|
+
|
|
17
|
+
def self.type
|
|
18
|
+
{ key: :metrologia_article, web: :metrologia_article,
|
|
19
|
+
title: "Metrologia Article", short: "metrologia-article" }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# MR: `bipm.metrologia[.<volume>[-<issue>[-<article>]]]`.
|
|
23
|
+
# The volume IS the index key, so it is derived from `number` instead
|
|
24
|
+
# of being stored beside it — storing both would duplicate the same
|
|
25
|
+
# value in every one of the 6,204 published article rows. Kept as an
|
|
26
|
+
# Integer because that is the public type consumers already read
|
|
27
|
+
# (`Relaton::Bipm::Bibliography#id_hash` calls `pubid.volume`).
|
|
28
|
+
#
|
|
29
|
+
# Safe as a plain method only because `volume` is no longer a lutaml
|
|
30
|
+
# attribute anywhere in the hierarchy — a method that shadows a
|
|
31
|
+
# generated accessor corrupts attribute resolution (CLAUDE.md).
|
|
32
|
+
def volume
|
|
33
|
+
number&.to_i
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def mr_type
|
|
37
|
+
"metrologia"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# `number` is only the volume (it is the CLUSTERING relaton-index key),
|
|
41
|
+
# so per-article distinctness has to come from here: the full triple.
|
|
42
|
+
def mr_number_with_part
|
|
43
|
+
mr_slug(volume, issue, article)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|