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,318 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Iso
|
|
5
|
+
class Identifier < ::Pubid::Identifier
|
|
6
|
+
# Override base types with ISO-specific ones.
|
|
7
|
+
# Defaults to the type's implied publisher (ISO for most; IWA has none),
|
|
8
|
+
# so an omitted publisher key reconstructs correctly on from_hash.
|
|
9
|
+
attribute :publisher, ::Pubid::Iso::Components::Publisher,
|
|
10
|
+
default: -> { self.class.default_publisher }
|
|
11
|
+
attribute :copublishers, ::Pubid::Iso::Components::Publisher,
|
|
12
|
+
collection: true
|
|
13
|
+
|
|
14
|
+
# The publisher implied when none is serialized. ISO for most types;
|
|
15
|
+
# publisher-less types (IWA) override this to nil.
|
|
16
|
+
def self.default_publisher
|
|
17
|
+
::Pubid::Iso::Components::Publisher.new
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# typed_stage is the single source of truth for stage (and, with the class,
|
|
21
|
+
# the doctype). Default to the class's published typed_stage, so an omitted
|
|
22
|
+
# "stage" key reconstructs the published state on from_hash.
|
|
23
|
+
attribute :typed_stage, ::Pubid::Components::TypedStage,
|
|
24
|
+
default: -> { self.class.published_typed_stage }
|
|
25
|
+
|
|
26
|
+
# The class's published typed_stage (canonical surface form), or nil for
|
|
27
|
+
# types with no stages (e.g. TC documents).
|
|
28
|
+
def self.published_typed_stage
|
|
29
|
+
return nil unless const_defined?(:TYPED_STAGES)
|
|
30
|
+
|
|
31
|
+
ts = self::TYPED_STAGES.find { |t| t.stage_code.to_s == "published" }
|
|
32
|
+
return nil unless ts
|
|
33
|
+
|
|
34
|
+
ts = ts.dup
|
|
35
|
+
ts.original_abbr = ts.canonical_abbreviation
|
|
36
|
+
ts
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# type and stage are derived from typed_stage, never stored — so the
|
|
40
|
+
# doctype (fixed by the class / _type) can't be lost when "stage" is
|
|
41
|
+
# omitted for the published default.
|
|
42
|
+
def type
|
|
43
|
+
typed_stage&.to_type
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def stage
|
|
47
|
+
typed_stage&.to_stage
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Return a copy with the lifecycle stage set from an ISO harmonized stage
|
|
51
|
+
# code (e.g. "90.92"). typed_stage is the single source of truth, so this
|
|
52
|
+
# is all that is needed to surface the stage in #to_s and #to_urn. Returns
|
|
53
|
+
# an unchanged copy if the code is not recognised.
|
|
54
|
+
def with_harmonized_stage(harmonized_code)
|
|
55
|
+
ts = Pubid::Iso.locate_stage_by_harmonized_code(harmonized_code)
|
|
56
|
+
ts ? dup.tap { |id| id.typed_stage = ts } : dup
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
attribute :number, ::Pubid::Iso::Components::Code
|
|
60
|
+
attribute :part, ::Pubid::Iso::Components::Code
|
|
61
|
+
attribute :subpart, ::Pubid::Iso::Components::Code
|
|
62
|
+
|
|
63
|
+
# Polymorphic type map for lutaml::Model key_value serialization
|
|
64
|
+
# Maps polymorphic_name → class name for deserialization
|
|
65
|
+
# Validated by spec to stay in sync with identifier_types
|
|
66
|
+
ISO_TYPE_MAP = {
|
|
67
|
+
"pubid:iso:international-standard" => "Pubid::Iso::Identifiers::InternationalStandard",
|
|
68
|
+
"pubid:iso:international-standardized-profile" => "Pubid::Iso::Identifiers::InternationalStandardizedProfile",
|
|
69
|
+
"pubid:iso:international-workshop-agreement" => "Pubid::Iso::Identifiers::InternationalWorkshopAgreement",
|
|
70
|
+
"pubid:iso:technical-report" => "Pubid::Iso::Identifiers::TechnicalReport",
|
|
71
|
+
"pubid:iso:technical-specification" => "Pubid::Iso::Identifiers::TechnicalSpecification",
|
|
72
|
+
"pubid:iso:pas" => "Pubid::Iso::Identifiers::Pas",
|
|
73
|
+
"pubid:iso:guide" => "Pubid::Iso::Identifiers::Guide",
|
|
74
|
+
"pubid:iso:recommendation" => "Pubid::Iso::Identifiers::Recommendation",
|
|
75
|
+
"pubid:iso:amendment" => "Pubid::Iso::Identifiers::Amendment",
|
|
76
|
+
"pubid:iso:corrigendum" => "Pubid::Iso::Identifiers::Corrigendum",
|
|
77
|
+
"pubid:iso:supplement" => "Pubid::Iso::Identifiers::Supplement",
|
|
78
|
+
"pubid:iso:addendum" => "Pubid::Iso::Identifiers::Addendum",
|
|
79
|
+
"pubid:iso:extract" => "Pubid::Iso::Identifiers::Extract",
|
|
80
|
+
"pubid:iso:directives" => "Pubid::Iso::Identifiers::Directives",
|
|
81
|
+
"pubid:iso:directives-supplement" => "Pubid::Iso::Identifiers::DirectivesSupplement",
|
|
82
|
+
"pubid:iso:data" => "Pubid::Iso::Identifiers::Data",
|
|
83
|
+
"pubid:iso:tc-document" => "Pubid::Iso::Identifiers::TcDocument",
|
|
84
|
+
"pubid:iso:technology-trends-assessments" => "Pubid::Iso::Identifiers::TechnologyTrendsAssessments",
|
|
85
|
+
"pubid:iso:bundled-identifier" => "Pubid::Iso::BundledIdentifier",
|
|
86
|
+
}.freeze
|
|
87
|
+
|
|
88
|
+
# BundledIdentifier lives outside Pubid::Iso::Identifiers but carries a
|
|
89
|
+
# polymorphic `_type`, so the shared polymorphic_type_map needs it
|
|
90
|
+
# explicitly (see Pubid::Identifier#additional_identifier_classes).
|
|
91
|
+
def self.additional_identifier_classes
|
|
92
|
+
[Pubid::Iso::BundledIdentifier]
|
|
93
|
+
end
|
|
94
|
+
private_class_method :additional_identifier_classes
|
|
95
|
+
|
|
96
|
+
# Build type map from Pubid::Iso.identifier_types for validation
|
|
97
|
+
def self.build_type_map
|
|
98
|
+
Pubid::Iso.identifier_types.to_h do |klass|
|
|
99
|
+
[klass.polymorphic_name, klass.name]
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# The base Pubid::Identifier no longer auto-maps attributes, so each
|
|
104
|
+
# flavor's top class must declare its own key_value mapping. Subclasses
|
|
105
|
+
# merge their own blocks on top of this one (e.g. SupplementIdentifier
|
|
106
|
+
# adds base; Directives adds subgroup), so list every base
|
|
107
|
+
# attribute ISO serializes here once.
|
|
108
|
+
key_value do
|
|
109
|
+
map "_type", to: :_type, polymorphic_map: ISO_TYPE_MAP
|
|
110
|
+
# Code components serialize as their plain string value, not {value,number}.
|
|
111
|
+
map "number", with: { to: :number_to_kv, from: :number_from_kv }
|
|
112
|
+
map "part", with: { to: :part_to_kv, from: :part_from_kv }
|
|
113
|
+
map "subpart", with: { to: :subpart_to_kv, from: :subpart_from_kv }
|
|
114
|
+
map "stage_iteration",
|
|
115
|
+
with: { to: :stage_iteration_to_kv, from: :stage_iteration_from_kv }
|
|
116
|
+
# date serialized flat as year/month/day, nils omitted.
|
|
117
|
+
map "year", with: { to: :year_to_kv, from: :year_from_kv }
|
|
118
|
+
map "month", with: { to: :month_to_kv, from: :month_from_kv }
|
|
119
|
+
map "day", with: { to: :day_to_kv, from: :day_from_kv }
|
|
120
|
+
# ISO/IEC undated reference (e.g. ISO 16634:--). The `false` default
|
|
121
|
+
# is omitted; only the meaningful `true` round-trips via to_hash.
|
|
122
|
+
map "undated", with: { to: :undated_to_kv, from: :undated_from_kv }
|
|
123
|
+
map "edition", to: :edition
|
|
124
|
+
map "languages", to: :languages
|
|
125
|
+
# publisher emitted only when the primary isn't the type default;
|
|
126
|
+
# copublishers (the other bodies) as an array, omitted when empty.
|
|
127
|
+
map "publisher", with: { to: :publisher_to_kv, from: :publisher_from_kv }
|
|
128
|
+
map "copublishers", with: { to: :copublishers_to_kv, from: :copublishers_from_kv }
|
|
129
|
+
map "locality", to: :locality
|
|
130
|
+
# `type` and generic `stage` are fully derived from `typed_stage`
|
|
131
|
+
# (builder sets them via to_type/to_stage), so we serialize only the
|
|
132
|
+
# unique typed-stage `code` under "stage" and recompute the rest on
|
|
133
|
+
# load. _type already pins the document type.
|
|
134
|
+
map "stage", with: { to: :stage_to_kv, from: :stage_from_kv }
|
|
135
|
+
# Omit the `false` default; only the meaningful `true` is serialized.
|
|
136
|
+
map "all_parts", with: { to: :all_parts_to_kv, from: :all_parts_from_kv }
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def all_parts_to_kv(model, doc)
|
|
140
|
+
return unless model.all_parts
|
|
141
|
+
|
|
142
|
+
doc.add_child(
|
|
143
|
+
Lutaml::KeyValue::DataModel::Element.new("all_parts", true),
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
def all_parts_from_kv(model, value)
|
|
148
|
+
model.all_parts = value
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Serialize typed_stage as just its unique code (e.g. "is", "dis",
|
|
152
|
+
# "committee_draft_amd"). type/stage are recomputed from it on load.
|
|
153
|
+
def stage_to_kv(model, doc)
|
|
154
|
+
ts = model.typed_stage
|
|
155
|
+
return unless ts&.code
|
|
156
|
+
# Omit the published default (recomputed from the class on load).
|
|
157
|
+
return if ts.stage_code.to_s == "published"
|
|
158
|
+
|
|
159
|
+
doc.add_child(
|
|
160
|
+
Lutaml::KeyValue::DataModel::Element.new("stage", ts.code.to_s),
|
|
161
|
+
)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Resolve the typed-stage code back to the full TypedStage within this
|
|
165
|
+
# identifier's class, then derive type/stage from it.
|
|
166
|
+
def stage_from_kv(model, value)
|
|
167
|
+
return if value.nil? || value.to_s.empty?
|
|
168
|
+
|
|
169
|
+
# The fallback consults the flavor-wide table. It used to call
|
|
170
|
+
# `Pubid::Iso::Scheme`, a class removed repo-wide in e3c19ea1 — so any
|
|
171
|
+
# code absent from the class's own TYPED_STAGES raised NameError
|
|
172
|
+
# instead of falling back. The IEC twin (iec/identifier.rb) was
|
|
173
|
+
# migrated at the time; ISO was missed.
|
|
174
|
+
ts = (model.class.const_defined?(:TYPED_STAGES) &&
|
|
175
|
+
model.class::TYPED_STAGES.find { |t| t.code.to_s == value.to_s }) ||
|
|
176
|
+
Pubid::Iso.locate_stage_by_code(value)
|
|
177
|
+
return unless ts
|
|
178
|
+
|
|
179
|
+
# The renderer prefers `original_abbr` (the parsed surface form); without
|
|
180
|
+
# it the supplement renderer falls back to `short_abbr` (e.g. "AMD").
|
|
181
|
+
# Resolving from a code has no surface form, so render the canonical
|
|
182
|
+
# abbreviation (`abbr.first`, e.g. "Amd").
|
|
183
|
+
ts = ts.dup
|
|
184
|
+
ts.original_abbr = ts.canonical_abbreviation
|
|
185
|
+
model.typed_stage = ts
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# --- Code components <-> plain string ---
|
|
189
|
+
def number_to_kv(model, doc) = emit_code(doc, "number", model.number)
|
|
190
|
+
def number_from_kv(model, value) = model.number = build_code(value)
|
|
191
|
+
def part_to_kv(model, doc) = emit_code(doc, "part", model.part)
|
|
192
|
+
def part_from_kv(model, value) = model.part = build_code(value)
|
|
193
|
+
def subpart_to_kv(model, doc) = emit_code(doc, "subpart", model.subpart)
|
|
194
|
+
def subpart_from_kv(model, value) = model.subpart = build_code(value)
|
|
195
|
+
|
|
196
|
+
def stage_iteration_to_kv(model, doc)
|
|
197
|
+
iter = model.stage_iteration
|
|
198
|
+
v = iter.is_a?(::Pubid::Components::Iteration) ? iter.number : iter
|
|
199
|
+
return if v.nil? || v.to_s.empty?
|
|
200
|
+
|
|
201
|
+
doc.add_child(Lutaml::KeyValue::DataModel::Element.new("stage_iteration",
|
|
202
|
+
v.to_s))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
def stage_iteration_from_kv(model, value)
|
|
206
|
+
model.stage_iteration = ::Pubid::Components::Iteration.new(number: value.to_s)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
def emit_code(doc, key, code)
|
|
210
|
+
v = code.is_a?(::Pubid::Components::Code) ? code.value : code
|
|
211
|
+
return if v.nil? || v.to_s.empty?
|
|
212
|
+
|
|
213
|
+
doc.add_child(Lutaml::KeyValue::DataModel::Element.new(key, v.to_s))
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
def build_code(value)
|
|
217
|
+
::Pubid::Iso::Components::Code.new(value: value.to_s)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# --- date serialized flat as year/month/day ---
|
|
221
|
+
def year_to_kv(model, doc) = emit_date_part(doc, "year", model.date&.year)
|
|
222
|
+
def year_from_kv(model, value) = date_for(model).year = value.to_s
|
|
223
|
+
def month_to_kv(model, doc) = emit_date_part(doc, "month", model.date&.month)
|
|
224
|
+
def month_from_kv(model, value) = date_for(model).month = value.to_s
|
|
225
|
+
def day_to_kv(model, doc) = emit_date_part(doc, "day", model.date&.day)
|
|
226
|
+
def day_from_kv(model, value) = date_for(model).day = value.to_s
|
|
227
|
+
|
|
228
|
+
# --- date undated flag (ISO/IEC undated reference, e.g. ISO 16634:--) ---
|
|
229
|
+
# The `false` default is omitted; only the meaningful `true` round-trips
|
|
230
|
+
# via to_hash / from_hash.
|
|
231
|
+
def undated_to_kv(model, doc)
|
|
232
|
+
return unless model.date&.undated?
|
|
233
|
+
|
|
234
|
+
doc.add_child(Lutaml::KeyValue::DataModel::Element.new("undated", true))
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
def undated_from_kv(model, value)
|
|
238
|
+
date_for(model).undated = value.to_s == "true"
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
def emit_date_part(doc, key, val)
|
|
242
|
+
return if val.nil? || val.to_s.empty?
|
|
243
|
+
|
|
244
|
+
doc.add_child(Lutaml::KeyValue::DataModel::Element.new(key, val.to_s))
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
def date_for(model)
|
|
248
|
+
model.date ||= ::Pubid::Components::Date.new
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# --- publisher: primary only when non-default; copublishers as a list ---
|
|
252
|
+
def publisher_to_kv(model, doc)
|
|
253
|
+
pub = model.publisher&.publisher
|
|
254
|
+
return if pub.nil? || pub == model.class.default_publisher&.publisher
|
|
255
|
+
|
|
256
|
+
doc.add_child(Lutaml::KeyValue::DataModel::Element.new("publisher", pub))
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
def publisher_from_kv(model, value)
|
|
260
|
+
publisher_for(model).publisher = value.to_s
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
def copublishers_to_kv(model, doc)
|
|
264
|
+
cp = model.publisher&.copublisher
|
|
265
|
+
return unless cp&.any?
|
|
266
|
+
|
|
267
|
+
doc.add_child(
|
|
268
|
+
Lutaml::KeyValue::DataModel::Element.new("copublishers", cp.map(&:to_s)),
|
|
269
|
+
)
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
def copublishers_from_kv(model, value)
|
|
273
|
+
list = Array(value).map(&:to_s)
|
|
274
|
+
return unless list.any?
|
|
275
|
+
|
|
276
|
+
# Mirror Builder#parse: copublishers live both on the primary
|
|
277
|
+
# publisher (as strings) and as the top-level `copublishers`
|
|
278
|
+
# collection of Publisher objects. `==` compares the latter, so
|
|
279
|
+
# populate both or a deserialized id never equals a parsed one.
|
|
280
|
+
publisher_for(model).copublisher = list
|
|
281
|
+
model.copublishers = list.map do |cp|
|
|
282
|
+
::Pubid::Iso::Components::Publisher.new(publisher: cp)
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
def publisher_for(model)
|
|
287
|
+
model.publisher ||= ::Pubid::Iso::Components::Publisher.new
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
def self.parse(string, format: :auto)
|
|
291
|
+
unless string.is_a?(String)
|
|
292
|
+
raise Pubid::Errors::InvalidInputError,
|
|
293
|
+
Pubid::INPUT_NOT_A_STRING_MESSAGE
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if string.length > Pubid::MAX_INPUT_LENGTH
|
|
297
|
+
raise Pubid::Errors::InvalidInputError, Pubid::INPUT_TOO_LONG_MESSAGE
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
format = Pubid::FormatDetector.detect(string) if format == :auto
|
|
301
|
+
|
|
302
|
+
case format
|
|
303
|
+
when :urn
|
|
304
|
+
Pubid::Iso::UrnParser.parse(string)
|
|
305
|
+
when :mr_string
|
|
306
|
+
Pubid::Parsers::MrString.parse(string)
|
|
307
|
+
else
|
|
308
|
+
parsed = Pubid::Iso::Parser.new.parse(string)
|
|
309
|
+
Pubid::Iso::Builder.new.build(parsed)
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# from_hash is the shared polymorphic dispatch on Pubid::Identifier, which
|
|
314
|
+
# routes `_type` through polymorphic_type_map (ISO_TYPE_MAP's dynamic
|
|
315
|
+
# equivalent). ISO_TYPE_MAP remains as the key_value polymorphic_map.
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
end
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Iso
|
|
5
|
+
module Identifiers
|
|
6
|
+
class Addendum < SupplementIdentifier
|
|
7
|
+
|
|
8
|
+
# Override URN supplement type to use generic "sup" instead of "add"
|
|
9
|
+
# This matches the ISO URN specification where addendums use "sup"
|
|
10
|
+
def urn_supplement_type
|
|
11
|
+
"sup"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
TYPED_STAGES = [
|
|
15
|
+
::Pubid::Components::TypedStage.new(
|
|
16
|
+
code: :pwi_add,
|
|
17
|
+
abbr: ["PWI Add"],
|
|
18
|
+
short_abbr: nil,
|
|
19
|
+
long_abbr: nil,
|
|
20
|
+
type_code: :add,
|
|
21
|
+
stage_code: :proposal,
|
|
22
|
+
name: "Proposed Work Item for Addendum",
|
|
23
|
+
harmonized_stages: %w[00.00 00.20 00.60 00.92 00.93 00.98 00.99],
|
|
24
|
+
),
|
|
25
|
+
::Pubid::Components::TypedStage.new(
|
|
26
|
+
code: :np_add,
|
|
27
|
+
abbr: ["NP Add"],
|
|
28
|
+
short_abbr: nil,
|
|
29
|
+
long_abbr: nil,
|
|
30
|
+
type_code: :add,
|
|
31
|
+
stage_code: :proposal,
|
|
32
|
+
name: "New Work Item Proposal for Addendum",
|
|
33
|
+
harmonized_stages: %w[10.00 10.20 10.60 10.92 10.93 10.98],
|
|
34
|
+
),
|
|
35
|
+
::Pubid::Components::TypedStage.new(
|
|
36
|
+
code: :awi_add,
|
|
37
|
+
abbr: ["AWI Add"],
|
|
38
|
+
short_abbr: nil,
|
|
39
|
+
long_abbr: nil,
|
|
40
|
+
type_code: :add,
|
|
41
|
+
stage_code: :preliminary,
|
|
42
|
+
name: "Approved Work Item for Addendum",
|
|
43
|
+
harmonized_stages: %w[10.99 20.00],
|
|
44
|
+
),
|
|
45
|
+
::Pubid::Components::TypedStage.new(
|
|
46
|
+
code: :wd_add,
|
|
47
|
+
abbr: ["WD Add"],
|
|
48
|
+
short_abbr: nil,
|
|
49
|
+
long_abbr: nil,
|
|
50
|
+
type_code: :add,
|
|
51
|
+
stage_code: :working_draft,
|
|
52
|
+
name: "Working Draft for Addendum",
|
|
53
|
+
harmonized_stages: %w[20.20 20.60 20.92 20.93 20.98 20.99],
|
|
54
|
+
),
|
|
55
|
+
::Pubid::Components::TypedStage.new(
|
|
56
|
+
code: :committee_draft_add,
|
|
57
|
+
abbr: ["CD Add"],
|
|
58
|
+
short_abbr: nil,
|
|
59
|
+
long_abbr: nil,
|
|
60
|
+
type_code: :add,
|
|
61
|
+
stage_code: :cd,
|
|
62
|
+
name: "Committee Draft for Addendum",
|
|
63
|
+
harmonized_stages: %w[30.00 30.20 30.60 30.92 30.93 30.98 30.99],
|
|
64
|
+
),
|
|
65
|
+
::Pubid::Components::TypedStage.new(
|
|
66
|
+
code: :dad,
|
|
67
|
+
abbr: ["DAD", "DAdd", "D ADD", "Dad", "DIS Add"],
|
|
68
|
+
short_abbr: "DAD",
|
|
69
|
+
# "DAdd" stays in `abbr` so it still parses, but render the canonical
|
|
70
|
+
# "DAD" (pubid v1 legacy_abbr parity). No long_abbr → no long render.
|
|
71
|
+
long_abbr: nil,
|
|
72
|
+
type_code: :add,
|
|
73
|
+
stage_code: :dad,
|
|
74
|
+
name: "Draft Addendum",
|
|
75
|
+
harmonized_stages: %w[40.00 40.20 40.60 40.92 40.93 40.98 40.99],
|
|
76
|
+
),
|
|
77
|
+
::Pubid::Components::TypedStage.new(
|
|
78
|
+
code: :fdad,
|
|
79
|
+
abbr: ["FDAD", "FDAdd", "FD ADD", "FDad", "FDIS Add"],
|
|
80
|
+
short_abbr: "FDAD",
|
|
81
|
+
# See :dad — parse "FDAdd", render canonical "FDAD" (v1 parity).
|
|
82
|
+
long_abbr: nil,
|
|
83
|
+
type_code: :add,
|
|
84
|
+
stage_code: :fdad,
|
|
85
|
+
name: "Final Draft Addendum",
|
|
86
|
+
harmonized_stages: %w[50.00 50.20 50.60 50.92 50.98 50.99],
|
|
87
|
+
),
|
|
88
|
+
::Pubid::Components::TypedStage.new(
|
|
89
|
+
code: :published,
|
|
90
|
+
abbr: ["Add", "ADD", "Add.", "Addendum"],
|
|
91
|
+
short_abbr: "ADD",
|
|
92
|
+
long_abbr: "Add",
|
|
93
|
+
type_code: :add,
|
|
94
|
+
stage_code: :published,
|
|
95
|
+
name: "Addendum",
|
|
96
|
+
harmonized_stages: %w[60.00 60.60],
|
|
97
|
+
),
|
|
98
|
+
].freeze
|
|
99
|
+
|
|
100
|
+
def self.type
|
|
101
|
+
{ key: :add,
|
|
102
|
+
web: :addendum, title: "Addendum", short: "ADD" }
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Iso
|
|
5
|
+
module Identifiers
|
|
6
|
+
class Amendment < SupplementIdentifier
|
|
7
|
+
|
|
8
|
+
TYPED_STAGES = [
|
|
9
|
+
::Pubid::Components::TypedStage.new(
|
|
10
|
+
code: :pwi_amd,
|
|
11
|
+
abbr: ["PWI Amd"],
|
|
12
|
+
short_abbr: nil,
|
|
13
|
+
long_abbr: nil,
|
|
14
|
+
type_code: :amd,
|
|
15
|
+
stage_code: :proposal,
|
|
16
|
+
name: "Proposed Work Item for Amendment",
|
|
17
|
+
harmonized_stages: %w[00.00 00.20 00.60 00.92 00.93 00.98 00.99],
|
|
18
|
+
),
|
|
19
|
+
::Pubid::Components::TypedStage.new(
|
|
20
|
+
code: :np_amd,
|
|
21
|
+
abbr: ["NP Amd"],
|
|
22
|
+
short_abbr: nil,
|
|
23
|
+
long_abbr: nil,
|
|
24
|
+
type_code: :amd,
|
|
25
|
+
stage_code: :proposal,
|
|
26
|
+
name: "New Work Item Proposal for Amendment",
|
|
27
|
+
harmonized_stages: %w[10.00 10.20 10.60 10.92 10.93 10.98],
|
|
28
|
+
),
|
|
29
|
+
::Pubid::Components::TypedStage.new(
|
|
30
|
+
code: :awi_amd,
|
|
31
|
+
abbr: ["AWI Amd"],
|
|
32
|
+
short_abbr: nil,
|
|
33
|
+
long_abbr: nil,
|
|
34
|
+
type_code: :amd,
|
|
35
|
+
stage_code: :preliminary,
|
|
36
|
+
name: "Approved Work Item for Amendment",
|
|
37
|
+
harmonized_stages: %w[10.99 20.00],
|
|
38
|
+
),
|
|
39
|
+
::Pubid::Components::TypedStage.new(
|
|
40
|
+
code: :wd_amd,
|
|
41
|
+
abbr: ["WD Amd"],
|
|
42
|
+
short_abbr: nil,
|
|
43
|
+
long_abbr: nil,
|
|
44
|
+
type_code: :amd,
|
|
45
|
+
stage_code: :working_draft,
|
|
46
|
+
name: "Working Draft for Amendment",
|
|
47
|
+
harmonized_stages: %w[20.20 20.60 20.92 20.93 20.98 20.99],
|
|
48
|
+
),
|
|
49
|
+
::Pubid::Components::TypedStage.new(
|
|
50
|
+
code: :committee_draft_amd,
|
|
51
|
+
abbr: ["CD Amd"],
|
|
52
|
+
short_abbr: nil,
|
|
53
|
+
long_abbr: nil,
|
|
54
|
+
type_code: :amd,
|
|
55
|
+
stage_code: :cd,
|
|
56
|
+
name: "Committee Draft for Amendment",
|
|
57
|
+
harmonized_stages: %w[30.00 30.20 30.60 30.92 30.93 30.98 30.99],
|
|
58
|
+
),
|
|
59
|
+
::Pubid::Components::TypedStage.new(
|
|
60
|
+
code: :pdam,
|
|
61
|
+
abbr: ["PDAM"],
|
|
62
|
+
short_abbr: nil,
|
|
63
|
+
long_abbr: nil,
|
|
64
|
+
type_code: :amd,
|
|
65
|
+
stage_code: :cd,
|
|
66
|
+
name: "Proposed Draft Amendment (Legacy)",
|
|
67
|
+
harmonized_stages: %w[30.00 30.20 30.60 30.92 30.93 30.98 30.99],
|
|
68
|
+
),
|
|
69
|
+
::Pubid::Components::TypedStage.new(
|
|
70
|
+
code: :damd,
|
|
71
|
+
abbr: ["DAM", "DAmd"],
|
|
72
|
+
short_abbr: "DAM",
|
|
73
|
+
# "DAmd" stays in `abbr` so it still parses, but render the canonical
|
|
74
|
+
# "DAM" (matches pubid v1's legacy_abbr semantics: parse the long
|
|
75
|
+
# spelling, emit the short one). No long_abbr → no long rendering.
|
|
76
|
+
long_abbr: nil,
|
|
77
|
+
type_code: :amd,
|
|
78
|
+
stage_code: :damd,
|
|
79
|
+
name: "Draft Amendment",
|
|
80
|
+
harmonized_stages: %w[40.00 40.20 40.60 40.92 40.93 40.98 40.99],
|
|
81
|
+
),
|
|
82
|
+
::Pubid::Components::TypedStage.new(
|
|
83
|
+
code: :fdamd,
|
|
84
|
+
abbr: ["FDAM", "FDAmd"],
|
|
85
|
+
short_abbr: "FDAM",
|
|
86
|
+
# See :damd — parse "FDAmd", render canonical "FDAM" (v1 parity).
|
|
87
|
+
long_abbr: nil,
|
|
88
|
+
type_code: :amd,
|
|
89
|
+
stage_code: :fdamd,
|
|
90
|
+
name: "Final Draft Amendment",
|
|
91
|
+
harmonized_stages: %w[50.00 50.20 50.60 50.92 50.98 50.99],
|
|
92
|
+
),
|
|
93
|
+
::Pubid::Components::TypedStage.new(
|
|
94
|
+
code: :fpdam,
|
|
95
|
+
abbr: ["FPDAM"],
|
|
96
|
+
short_abbr: nil,
|
|
97
|
+
long_abbr: nil,
|
|
98
|
+
type_code: :amd,
|
|
99
|
+
stage_code: :fdamd,
|
|
100
|
+
name: "Final Proposed Draft Amendment (Legacy)",
|
|
101
|
+
harmonized_stages: %w[50.00 50.20 50.60 50.92 50.98 50.99],
|
|
102
|
+
),
|
|
103
|
+
::Pubid::Components::TypedStage.new(
|
|
104
|
+
code: :prf_amd,
|
|
105
|
+
abbr: ["PRF Amd"],
|
|
106
|
+
short_abbr: nil,
|
|
107
|
+
long_abbr: nil,
|
|
108
|
+
type_code: :amd,
|
|
109
|
+
stage_code: :prf,
|
|
110
|
+
name: "Proof Amendment",
|
|
111
|
+
harmonized_stages: %w[50.00],
|
|
112
|
+
),
|
|
113
|
+
::Pubid::Components::TypedStage.new(
|
|
114
|
+
code: :published,
|
|
115
|
+
abbr: ["Amd", "AMD", "Amd."],
|
|
116
|
+
short_abbr: "AMD",
|
|
117
|
+
long_abbr: "Amd",
|
|
118
|
+
type_code: :amd,
|
|
119
|
+
stage_code: :published,
|
|
120
|
+
name: "Amendment",
|
|
121
|
+
harmonized_stages: %w[60.00 60.60],
|
|
122
|
+
),
|
|
123
|
+
].freeze
|
|
124
|
+
|
|
125
|
+
def self.type
|
|
126
|
+
{ key: :amd,
|
|
127
|
+
web: :amendment, title: "Amendment", short: "AMD" }
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pubid
|
|
4
|
+
module Iso
|
|
5
|
+
module Identifiers
|
|
6
|
+
class Corrigendum < SupplementIdentifier
|
|
7
|
+
|
|
8
|
+
TYPED_STAGES = [
|
|
9
|
+
::Pubid::Components::TypedStage.new(
|
|
10
|
+
code: :pwi_cor,
|
|
11
|
+
abbr: ["PWI Cor"],
|
|
12
|
+
short_abbr: nil,
|
|
13
|
+
long_abbr: nil,
|
|
14
|
+
type_code: :cor,
|
|
15
|
+
stage_code: :proposal,
|
|
16
|
+
name: "Proposed Work Item for Corrigendum",
|
|
17
|
+
harmonized_stages: %w[00.00 00.20 00.60 00.92 00.93 00.98 00.99],
|
|
18
|
+
),
|
|
19
|
+
::Pubid::Components::TypedStage.new(
|
|
20
|
+
code: :npcor,
|
|
21
|
+
abbr: ["NP Cor"],
|
|
22
|
+
short_abbr: nil,
|
|
23
|
+
long_abbr: nil,
|
|
24
|
+
type_code: :cor,
|
|
25
|
+
stage_code: :proposal,
|
|
26
|
+
name: "New Work Item Proposal for Corrigendum",
|
|
27
|
+
harmonized_stages: %w[10.00 10.20 10.60 10.92 10.93 10.98],
|
|
28
|
+
),
|
|
29
|
+
::Pubid::Components::TypedStage.new(
|
|
30
|
+
code: :awicor,
|
|
31
|
+
abbr: ["AWI Cor"],
|
|
32
|
+
short_abbr: nil,
|
|
33
|
+
long_abbr: nil,
|
|
34
|
+
type_code: :cor,
|
|
35
|
+
stage_code: :preliminary,
|
|
36
|
+
name: "Approved Work Item for Corrigendum",
|
|
37
|
+
harmonized_stages: %w[10.99 20.00],
|
|
38
|
+
),
|
|
39
|
+
::Pubid::Components::TypedStage.new(
|
|
40
|
+
code: :wdcor,
|
|
41
|
+
abbr: ["WD Cor"],
|
|
42
|
+
short_abbr: nil,
|
|
43
|
+
long_abbr: nil,
|
|
44
|
+
type_code: :cor,
|
|
45
|
+
stage_code: :working_draft,
|
|
46
|
+
name: "Working Draft for Corrigendum",
|
|
47
|
+
harmonized_stages: %w[20.20 20.60 20.92 20.93 20.98 20.99],
|
|
48
|
+
),
|
|
49
|
+
::Pubid::Components::TypedStage.new(
|
|
50
|
+
code: :cdcor,
|
|
51
|
+
abbr: ["CD Cor", "pDCOR"],
|
|
52
|
+
short_abbr: nil,
|
|
53
|
+
long_abbr: nil,
|
|
54
|
+
type_code: :cor,
|
|
55
|
+
stage_code: :cd,
|
|
56
|
+
name: "Committee Draft for Corrigendum",
|
|
57
|
+
harmonized_stages: %w[30.00 30.20 30.60 30.92 30.93 30.98 30.99],
|
|
58
|
+
),
|
|
59
|
+
::Pubid::Components::TypedStage.new(
|
|
60
|
+
code: :dcor,
|
|
61
|
+
abbr: ["DCor", "DCOR", "DIS Cor"],
|
|
62
|
+
short_abbr: "DCOR",
|
|
63
|
+
long_abbr: "DCor",
|
|
64
|
+
type_code: :cor,
|
|
65
|
+
stage_code: :dcor,
|
|
66
|
+
name: "Draft Corrigendum",
|
|
67
|
+
harmonized_stages: %w[40.00 40.20 40.60 40.92 40.93 40.98 40.99],
|
|
68
|
+
),
|
|
69
|
+
::Pubid::Components::TypedStage.new(
|
|
70
|
+
code: :fdcor,
|
|
71
|
+
abbr: ["FDCor", "FDCOR", "FCOR", "FDIS Cor"],
|
|
72
|
+
short_abbr: "FDCOR",
|
|
73
|
+
long_abbr: "FDCor",
|
|
74
|
+
type_code: :cor,
|
|
75
|
+
stage_code: :fdcor,
|
|
76
|
+
name: "Final Draft Corrigendum",
|
|
77
|
+
harmonized_stages: %w[50.00 50.20 50.60 50.92 50.98 50.99],
|
|
78
|
+
),
|
|
79
|
+
::Pubid::Components::TypedStage.new(
|
|
80
|
+
code: :prfcor,
|
|
81
|
+
abbr: ["PRF Cor"],
|
|
82
|
+
short_abbr: nil,
|
|
83
|
+
long_abbr: nil,
|
|
84
|
+
type_code: :cor,
|
|
85
|
+
stage_code: :prf,
|
|
86
|
+
name: "Proof Corrigendum",
|
|
87
|
+
harmonized_stages: %w[50.00],
|
|
88
|
+
),
|
|
89
|
+
::Pubid::Components::TypedStage.new(
|
|
90
|
+
code: :pubcor,
|
|
91
|
+
abbr: ["Cor", "COR", "Cor."],
|
|
92
|
+
short_abbr: "COR",
|
|
93
|
+
long_abbr: "Cor",
|
|
94
|
+
type_code: :cor,
|
|
95
|
+
stage_code: :published,
|
|
96
|
+
name: "Corrigendum",
|
|
97
|
+
harmonized_stages: %w[60.00 60.60],
|
|
98
|
+
),
|
|
99
|
+
].freeze
|
|
100
|
+
|
|
101
|
+
def self.type
|
|
102
|
+
{ key: :cor,
|
|
103
|
+
web: :corrigendum, title: "Corrigendum", short: "COR" }
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|