= RelatonOgc image:https://img.shields.io/gem/v/relaton-ogc.svg["Gem Version", link="https://rubygems.org/gems/relaton-ogc"] image:https://github.com/relaton/relaton-ogc/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/relaton/relaton-ogc/actions?workflow=macos"] image:https://github.com/relaton/relaton-ogc/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/relaton/relaton-ogc/actions?workflow=windows"] image:https://github.com/relaton/relaton-ogc/workflows/ubuntu/badge.svg["Build Status (Ubuntu)", link="https://github.com/relaton/relaton-ogc/actions?workflow=ubuntu"] image:https://codeclimate.com/github/relaton/relaton-ogc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/relaton/relaton-ogc"] image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-ogc.svg["Pull Requests", link="https://github.com/relaton/relaton-ogc/pulls"] image:https://img.shields.io/github/commits-since/relaton/relaton-ogc/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-ogc/releases"] RelatonOgc is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-iso#iso-bibliographic-item[IsoBibliographicItem model]. You can use it to retrieve metadata of OGC Standards from https://raw.githubusercontent.com/opengeospatial/NamingAuthority/master/incubation/bibliography/bibliography.json, and access such metadata through the `OgcBibliographicItem` object. == Installation Add this line to your application's Gemfile: [source,ruby] ---- gem 'relaton-ogc' ---- And then execute: $ bundle Or install it yourself as: $ gem install relaton-ogc == Usage === Search for a standard using keywords [source,ruby] ---- require 'relaton_ogc' => true hits = RelatonOgc::OgcBibliography.search("OGC 19-025r1") => tem = hits[0].fetch => # " Development of Spatial Data Infrastructures for Marine Data Management Development of Spatial Data Infrastructures for Marine Data Management https://portal.opengeospatial.org/files/?artifact_id=88037 19-025r1 2019 ... " ---- With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and adds flavour `ext` element. [source,ruby] ---- item.to_xml bibdata: true => " Development of Spatial Data Infrastructures for Marine Data Management Development of Spatial Data Infrastructures for Marine Data Management https://portal.opengeospatial.org/files/?artifact_id=88037 19-025r1 2019 ... engineering-report technical " ---- === Get code, and year [source,ruby] ---- RelatonOgc::OgcBibliography.get "OGC 19-025r1", "2019", {} [relaton-ogc] ("OGC 19-025r1") fetching... [relaton-ogc] ("OGC 19-025r1") found 19-025r1 => # # {"id"=>"19-025r1", ... RelatonOgc::OgcBibliographicItem.from_hash hash => #