IsoBib is a Ruby gem that implements the IsoBibliographicItem model.
You can use it to retrieve metadata of ISO Standards from https://www.iso.org, and access such metadata through the IsoBibliographicItem
object.
Installation
Add this line to your application’s Gemfile:
gem 'isobib'
And then execute:
$ bundle
Or install it yourself as:
$ gem install isobib
Usage
Search for a standard using keywords
Isobib::IsoBibliography.search("19115")
=> [[<Isobib::Hit:0x007fd1d9cc6980 @text="19115" @fullIdentifier="" @matchedWords=["19115"] @category="standard" @title="ISO 19115-1:2014/Amd 1:2018 ">,
<Isobib::Hit:0x007fd1d9cc6958 @text="19115" @fullIdentifier="" @matchedWords=["19115"] @category="standard" @title="ISO 19115-1:2014 Geographic information -- Metadata -- Part 1: Fundamentals">,
<Isobib::Hit:0x007fd1d9cc6930 @text="19115" @fullIdentifier="" @matchedWords=["19115"] @category="standard" @title="ISO 19115-2:2009 Geographic information -- Metadata -- Part 2: Extensions for imagery and gridded data">,
...
]]
hit_pages = Isobib::IsoBibliography.search("19115")
hit_collection = hit_pages.first
item = hit_collection[1].fetch
XML serialization
item.to_xml
=>"<bibitem type='international-standard' id='ISO19115-1'>
<title format='text/plain' language='en' script='Latn'>Geographic information -- Metadata -- Part 1: Fundamentals</title>
<title format='text/plain' language='fr' script='Latn'>Information géographique -- Métadonnées -- Partie 1: Principes de base</title>
<link type='src'>https://www.iso.org/standard/53798.html</link>
<link type='obp'>https://www.iso.org/obp/ui/#!iso:std:53798:en</link>
<link type='rss'>https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</link>
<docidentifier>ISO 19115-1</docidentifier>
<date type='published'>
<on>2014</on>
</date>
<contributor>
<role type='publisher'/>
<organization>
<name>International Organization for Standardization</name>
<abbreviation>ISO</abbreviation>
<uri>www.iso.org</uri>
</organization>
</contributor>
<edition>1</edition>
<language>en</language>
<language>fr</language>
<script>Latn</script>
<abstract format='plain' language='en' script='Latn'>
ISO 19115-1:2014 defines the schema required for describing geographic
information and services by means of metadata. It provides information about
the identification, the extent, the quality, the spatial and temporal
aspects, the content, the spatial reference, the portrayal, distribution,
and other properties of digital geographic data and services.ISO
19115-1:2014 is applicable to:-the cataloguing of all types of resources,
clearinghouse activities, and the full description of datasets and
services;-geographic services, geographic datasets, dataset series, and
individual geographic features and feature properties.ISO 19115-1:2014
defines:-mandatory and conditional metadata sections, metadata entities, and
metadata elements;-the minimum set of metadata required to serve most
metadata applications (data discovery, determining data fitness for use,
data access, data transfer, and use of digital data and services);-optional
metadata elements to allow for a more extensive standard description of
resources, if required;-a method for extending metadata to fit specialized
needs.Though ISO 19115-1:2014 is applicable to digital data and services,
its principles can be extended to many other types of resources such as
maps, charts, and textual documents as well as non-geographic data. Certain
conditional metadata elements might not apply to these other forms of data.
</abstract>
<abstract format='plain' language='fr' script='Latn'>
L'ISO 19115-1:2014 définit le schéma requis pour décrire des informations
géographiques et des services au moyen de métadonnées. Elle fournit des
informations concernant l'identification, l'étendue, la qualité, les aspects
spatiaux et temporels, le contenu, la référence spatiale, la représentation
des données, la distribution et d'autres propriétés des données
géographiques numériques et des services.L'ISO 19115-1:2014 est
applicable:-au catalogage de tous les types de ressources, des activités des
centres d'informations et à la description complète des jeux de données et
des services,-aux services géographiques, jeux de données géographiques,
séries de jeux de données, entités géographiques individuelles et propriétés
d'entités.L'ISO 19115-1:2014 définit:-des sections relatives aux métadonnées
obligatoires et facultatives, aux entités de métadonnées et aux éléments de
métadonnées,-le jeu minimal de métadonnées requis pour répondre au besoin de
la plupart des applications des métadonnées (la découverte des données, la
détermination de l'adéquation des données à une utilisation, l'accès aux
données, le transfert des données et l'utilisation des données numériques et
des services),-les éléments de métadonnées facultatifs pour permettre une
description standard plus poussée des ressources, si cela est nécessaire,-un
procédé d'extension des métadonnées pour s'adapter aux besoins
spéciaux.L'ISO 19115-1:2014 est applicable aux données numériques et
services, ses principes peuvent être étendus à bien d'autres types de
ressources telles que les cartes, les graphes et les documents textes, de
même qu'à des données non géographiques. Certains éléments de métadonnées
conditionnels peuvent ne pas s'appliquer à ces autres formes de données.
</abstract>
<status>Published</status>
<copyright>
<from>2014</from>
<owner>
<organization>
<name>ISO</name>
<abbreviation/>
</organization>
</owner>
</copyright>
<relation type='obsoletes'>
<bibitem>
<formattedref>ISO 19115:2003</formattedref>
<docidentifier>ISO 19115:2003</docidentifier>
</bibitem>
</relation>
<relation type='obsoletes'>
<bibitem>
<formattedref>ISO 19115:2003/Cor 1:2006</formattedref>
<docidentifier>ISO 19115:2003/Cor 1:2006</docidentifier>
</bibitem>
</relation>
<relation type='updates'>
<bibitem>
<formattedref>ISO 19115-1:2014/Amd 1:2018</formattedref>
<docidentifier>ISO 19115-1:2014/Amd 1:2018</docidentifier>
</bibitem>
</relation>
<ics>IT applications in science</ics>
</bibitem>"
Get serialisation in response to code, year, and options
Isobib::IsoBibliography.get('ISO 19115', "2014", {all_parts: true})
=> => "<bibitem type=\"international-standard\" id=\"ISO19115\">\n <title format=\"text/plain\" language=\"en\" script=\"Latn\">Geographic information -- Metadata</title>\n <title format=\"text/plain\" language=\"fr\" script=\"Latn\">Information g\u00E9ographique -- M\u00E9tadonn\u00E9es</title>\n <link type=\"src\">https://www.iso.org/standard/53798.html</link>\n <link type=\"obp\">https://www.iso.org/obp/ui/#!iso:std:53798:en</link>\n <link type=\"rss\">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</link>\n <docidentifier>ISO 19115: All Parts</docidentifier>\n <date type=\"published\">\n <on>2014</on>\n </date>\n <contributor>\n <role type=\"publisher\"/>\n <organization>\n <name>International Organization for Standardization</name>\n <abbreviation>ISO</abbreviation>\n <uri>www.iso.org</uri>\n </organization>\n </contributor>\n <edition>1</edition>\n <language>en</language>\n <language>fr</language>\n <script>Latn</script>\n <status>Published</status>\n <copyright>\n <from>2014</from>\n <owner>\n <organization>\n <name>ISO</name>\n <abbreviation></abbreviation>\n </organization>\n </owner>\n </copyright>\n <relation type=\"obsoletes\">\n <bibitem>\n <formattedref>ISO 19115:2003</formattedref>\n <docidentifier>ISO 19115:2003</docidentifier>\n </bibitem>\n </relation>\n <relation type=\"obsoletes\">\n <bibitem>\n <formattedref>ISO 19115:2003/Cor 1:2006</formattedref>\n <docidentifier>ISO 19115:2003/Cor 1:2006</docidentifier>\n </bibitem>\n </relation>\n <relation type=\"updates\">\n <bibitem>\n <formattedref>ISO 19115-1:2014/Amd 1:2018</formattedref>\n <docidentifier>ISO 19115-1:2014/Amd 1:2018</docidentifier>\n </bibitem>\n </relation>\n <relation type=\"partOf\">\n <bibitem type=\"international-standard\">\n <title format=\"text/plain\" language=\"en\" script=\"Latn\">Geographic information -- Metadata -- Part 1: Fundamentals</title>\n <title format=\"text/plain\" language=\"fr\" script=\"Latn\">Information g\u00E9ographique -- M\u00E9tadonn\u00E9es -- Partie 1: Principes de base</title>\n <link type=\"src\">https://www.iso.org/standard/53798.html</link>\n <link type=\"obp\">https://www.iso.org/obp/ui/#!iso:std:53798:en</link>\n <link type=\"rss\">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</link>\n <docidentifier>ISO 19115-1</docidentifier>\n <date type=\"published\">\n <on>2014</on>\n </date>\n <contributor>\n <role type=\"publisher\"/>\n <organization>\n <name>International Organization for Standardization</name>\n <abbreviation>ISO</abbreviation>\n <uri>www.iso.org</uri>\n </organization>\n </contributor>\n <edition>1</edition>\n <language>en</language>\n <language>fr</language>\n <script>Latn</script>\n <abstract format=\"plain\" language=\"en\" script=\"Latn\">ISO 19115-1:2014 defines the schema required for describing geographic information and services by means of metadata. It provides information about the identification, the extent, the quality, the spatial and temporal aspects, the content, the spatial reference, the portrayal, distribution, and other properties of digital geographic data and services.ISO 19115-1:2014 is applicable to:-the cataloguing of all types of resources, clearinghouse activities, and the full description of datasets and services;-geographic services, geographic datasets, dataset series, and individual geographic features and feature properties.ISO 19115-1:2014 defines:-mandatory and conditional metadata sections, metadata entities, and metadata elements;-the minimum set of metadata required to serve most metadata applications (data discovery, determining data fitness for use, data access, data transfer, and use of digital data and services);-optional metadata elements to allow for a more extensive standard description of resources, if required;-a method for extending metadata to fit specialized needs.Though ISO 19115-1:2014 is applicable to digital data and services, its principles can be extended to many other types of resources such as maps, charts, and textual documents as well as non-geographic data. Certain conditional metadata elements might not apply to these other forms of data.</abstract>\n <abstract format=\"plain\" language=\"fr\" script=\"Latn\">L'ISO 19115-1:2014 d\u00E9finit le sch\u00E9ma requis pour d\u00E9crire des informations g\u00E9ographiques et des services au moyen de m\u00E9tadonn\u00E9es. Elle fournit des informations concernant l'identification, l'\u00E9tendue, la qualit\u00E9, les aspects spatiaux et temporels, le contenu, la r\u00E9f\u00E9rence spatiale, la repr\u00E9sentation des donn\u00E9es, la distribution et d'autres propri\u00E9t\u00E9s des donn\u00E9es g\u00E9ographiques num\u00E9riques et des services.L'ISO 19115-1:2014 est applicable:-au catalogage de tous les types de ressources, des activit\u00E9s des centres d'informations et \u00E0 la description compl\u00E8te des jeux de donn\u00E9es et des services,-aux services g\u00E9ographiques, jeux de donn\u00E9es g\u00E9ographiques, s\u00E9ries de jeux de donn\u00E9es, entit\u00E9s g\u00E9ographiques individuelles et propri\u00E9t\u00E9s d'entit\u00E9s.L'ISO 19115-1:2014 d\u00E9finit:-des sections relatives aux m\u00E9tadonn\u00E9es obligatoires et facultatives, aux entit\u00E9s de m\u00E9tadonn\u00E9es et aux \u00E9l\u00E9ments de m\u00E9tadonn\u00E9es,-le jeu minimal de m\u00E9tadonn\u00E9es requis pour r\u00E9pondre au besoin de la plupart des applications des m\u00E9tadonn\u00E9es (la d\u00E9couverte des donn\u00E9es, la d\u00E9termination de l'ad\u00E9quation des donn\u00E9es \u00E0 une utilisation, l'acc\u00E8s aux donn\u00E9es, le transfert des donn\u00E9es et l'utilisation des donn\u00E9es num\u00E9riques et des services),-les \u00E9l\u00E9ments de m\u00E9tadonn\u00E9es facultatifs pour permettre une description standard plus pouss\u00E9e des ressources, si cela est n\u00E9cessaire,-un proc\u00E9d\u00E9 d'extension des m\u00E9tadonn\u00E9es pour s'adapter aux besoins sp\u00E9ciaux.L'ISO 19115-1:2014 est applicable aux donn\u00E9es num\u00E9riques et services, ses principes peuvent \u00EAtre \u00E9tendus \u00E0 bien d'autres types de ressources telles que les cartes, les graphes et les documents textes, de m\u00EAme qu'\u00E0 des donn\u00E9es non g\u00E9ographiques. Certains \u00E9l\u00E9ments de m\u00E9tadonn\u00E9es conditionnels peuvent ne pas s'appliquer \u00E0 ces autres formes de donn\u00E9es.</abstract>\n <status>Published</status>\n <copyright>\n <from>2014</from>\n <owner>\n <organization>\n <name>ISO</name>\n <abbreviation></abbreviation>\n </organization>\n </owner>\n </copyright>\n <relation type=\"obsoletes\">\n <bibitem>\n <formattedref>ISO 19115:2003</formattedref>\n <docidentifier>ISO 19115:2003</docidentifier>\n </bibitem>\n </relation>\n <relation type=\"obsoletes\">\n <bibitem>\n <formattedref>ISO 19115:2003/Cor 1:2006</formattedref>\n <docidentifier>ISO 19115:2003/Cor 1:2006</docidentifier>\n </bibitem>\n </relation>\n <relation type=\"updates\">\n <bibitem>\n <formattedref>ISO 19115-1:2014/Amd 1:2018</formattedref>\n <docidentifier>ISO 19115-1:2014/Amd 1:2018</docidentifier>\n </bibitem>\n </relation>\n <ics>\n <code>35.240.70</code>\n <text>IT applications in science</text>\n </ics>\n </bibitem>\n </relation>\n <ics>\n <code>35.240.70</code>\n <text>IT applications in science</text>\n </ics>\n <allParts>true</allParts>\n</bibitem>"
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to [rubygems.org](https://rubygems.org).
Exceptional Citations
This gem retrieves bibliographic descriptions of ISO documents by doing searches on the ISO website, http://www.iso.org, and screenscraping the document that matches the queried document identifier. The following documents are not returned as search results from the ISO website, and the gem returns manually generated references to them.
-
IEV
: used in the metanorma-iso gem to reference Electropedia entries generically. Is resolved to an "all parts" reference to IEC 60050, which in turn is resolved into the specific documents cited by their top-level clause.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/metanorma/isobib
License
The gem is available as open source under the terms of the MIT license.