relaton 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdc3737ec5342a53ecbfe76300389b0afb81b32bd6c7aaa45ccbf450f679d886
4
- data.tar.gz: 596df09db41419e1aa452d6a0dee24556c4a6b885c121c31b7b3426c42233297
3
+ metadata.gz: 42d388ac89c1d26d3cee93b0129d4c7393d7799849d94b2a84266830b3f9436d
4
+ data.tar.gz: bf8af87b24de874c0693711b48b821f9f347a5b1efe8c0158b82e7df88f5529b
5
5
  SHA512:
6
- metadata.gz: 1511495c2d16d1364682f7d5cb0f0d3e61bab30e97611b5fefa563ee7cd7653a205f0b1405293c95a4212e67c42aeb528211302560a123d4ee38be6170423f92
7
- data.tar.gz: 5ed4ef760452c3e1bc60644ae773548e5d8683b29663bc0ded1a9cc77e227a9c556c3bfe289ced91dc836c3d60259984dd671a788f1d72c9caa8689fd36ee744
6
+ metadata.gz: 8f34dd9a4738927f277c0e71ec36d0213e45e70f31a260819bcbcad8e7519e87ce2c1e883c53111e52ab73d9cbc580ab1d8cb8c8afd9ebce4257d1a287f73f48
7
+ data.tar.gz: 1bbf4542a44735cbf8078ae18249fab3e43c5d081db6a8645d89d554c82e8028dc85296650cc909252da690db8be8bc3dafb81fd4ecfb186ce470bd2ee346744
@@ -3,10 +3,10 @@ PATH
3
3
  specs:
4
4
  relaton (0.1.1)
5
5
  algoliasearch
6
- gbbib (~> 0.1.0)
6
+ gbbib (~> 0.2.0)
7
7
  iev (~> 0.1.0)
8
8
  isobib (~> 0.2.0)
9
- rfcbib (~> 0.1.0)
9
+ rfcbib (~> 0.2.0)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
@@ -24,9 +24,9 @@ GEM
24
24
  nokogiri (>= 1.4.3)
25
25
  ffi (1.9.25)
26
26
  formatador (0.2.5)
27
- gbbib (0.1.4)
28
- cnccs
29
- iso-bib-item
27
+ gbbib (0.2.0)
28
+ cnccs (~> 0.1.1)
29
+ iso-bib-item (~> 0.2)
30
30
  guard (2.14.2)
31
31
  formatador (>= 0.2.4)
32
32
  listen (>= 2.7, < 4.0)
@@ -82,7 +82,7 @@ GEM
82
82
  rb-fsevent (0.10.3)
83
83
  rb-inotify (0.9.10)
84
84
  ffi (>= 0.5.0, < 2)
85
- rfcbib (0.1.1)
85
+ rfcbib (0.2.0)
86
86
  iso-bib-item (~> 0.2.0)
87
87
  rspec (3.7.0)
88
88
  rspec-core (~> 3.7.0)
@@ -4,17 +4,89 @@ image:https://img.shields.io/gem/v/relaton.svg["Gem Version", link="https://ruby
4
4
  image:https://img.shields.io/travis/riboseinc/relaton/master.svg["Build Status", link="https://travis-ci.org/riboseinc/relaton"]
5
5
  image:https://codeclimate.com/github/riboseinc/relaton/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/relaton"]
6
6
 
7
- gem for importing and caching bibliographic references to technical standards
7
+ Gem for importing and caching bibliographic references to technical standards.
8
+
9
+ == Scope
10
+
11
+ The Relaton gem obtains authoritative bibliographic entries for technical standards from online sources, and expresses them in a consistent format, which can be used in document authoring. (It is the underlying bibliographic tool for the https://github.com/riboseinc/metanorma[Metanorma] toolset.)
12
+
13
+ The gem also caches entries it has retrieved, so that subsequent iterations do not need to go back online to retrieve the same entries. The gem uses two caches: a global cache (for all bibliographic entries retrieved by the user), and a local cache (intended to store references specific to the current document being processed.)
14
+
15
+ Entries are retrieved and stored in the https://github.com/riboseinc/bib-models[Relaton bibliographic model], which is an expression of ISO 690. The subset of the model used and serialised for Relaton is defined in the https://github.com/riboseinc/iso-bib-item[iso-bib-item] gem.
16
+
17
+ Entries are serialised to and from an internal data model, and multiple formats are intended to be supported. Currently only https://github.com/riboseinc/bib-models/blob/master/grammars/biblio.rnc[Relaton XML] is supported.
18
+
19
+ Relaton imports bibliographic entries from:
20
+
21
+ * ISO and IEC through the iso.org website, via the https://github.com/riboseinc/isobib[isobib] gem
22
+ * GB (Chinese national standards) through the GB websites, via the https://github.com/riboseinc/gbbib[gbbib] gem [in progress]
23
+ * IETF standards (Internet Drafts, RFC) through the http://xml2rfc.tools.ietf.org website, via the https://github.com/riboseinc/rfcbib[rfcbib] gem [in progress]
24
+
25
+ The gem can be extended to use other standards-specific gems. Standards-specific gems like isobib register themselves against Relaton using `Relaton::Registry.instance.register`, which takes as an argument a subclass of `Relaton::Processor` defined in the gem; see isobib/lib/relaton for an example. The processor within the standards-specific gem needs to define
26
+
27
+ * `@short`, the name of the gem
28
+ * `@prefix`, the regex constraining the standards code to be processed
29
+ * `get(code, date, opts)`, which takes a standards code, a year, and a hash of options, and returns an iso-bib-item bibliographic entry
30
+
31
+ == Behaviours
32
+
33
+ * Bibliographic entries are identified for retrieval and caching by a prefix specific to the standards class, followed by the conventional code of the standard.
34
+ ** ISO standards are identified by `ISO` followed by space or slash. For example, `ISO/IEC DIR 2:2018`
35
+ ** IEC standards are identified by `IEC` followed by space or slash
36
+ ** GB standards are identified by `GB Standard`. For example, `GB Standard GM/T 0009-2012`
37
+ ** IETF stadnards are identified by `IETF`. Foe example, `IETF RFC 7991`
38
+ * If an entry is defined in both the local and the global cache, the local cache entry is used.
39
+ * If an ISO entry has no date, the latest version available for the entry is retrieved.
40
+ * If a cached ISO entry has no date, and was last retrieved more than 60 days ago, the gem fetches it again, in case there is a newer edition of the standard available.
41
+ * Note that the gem does not currently support the totality of the Relaton model; it will only support the information available in the source websites. We do not expect to support cartographic information, for example.
42
+
43
+ == Usage
8
44
 
9
45
  [source,ruby]
10
46
  ----
11
- x = Relaton.fetch("ISO19011")
12
- => Relaton::Error "No such fetcher"
47
+ require "relaton"
48
+ => true
49
+
50
+ # Do not cache any entries retrieved
51
+ db = Relaton.new(nil, nil)
52
+ # Use only the global cache for any entries retrieved
53
+ db = Relaton.new("global cache filename", nil)
54
+ # Use both a local and a global cache
55
+ db = Relaton::Db.new("global cache filename", "local cache filename")
56
+ [relaton] detecting backends:
57
+ isobib
58
+ [relaton] processor "isobib" registered
59
+ => #<Relaton::Db:...>
60
+
61
+ x = db.fetch("IEEE 19011")
62
+ "IEEE 19011 does not have a recognised prefix: /^(ISO|IEC)[ \/]|^IEV($| )/"
63
+ => nil
64
+
65
+ x = db.fetch("ISO 19011")
66
+ fetching ISO 19011...
67
+ => #<IsoBibItem::IsoBibliographicItem:...>
68
+
69
+ x = db.fetch("ISO 19011", "2011")
70
+ fetching ISO 19011...
71
+ => #<IsoBibItem::IsoBibliographicItem:...>
13
72
 
14
- require 'relaton-iso'
15
- x = Relaton.fetch("ISO19011")
16
- => <# Relaton::Iso @docidentifier: "ISO 19011:2011" ... >
73
+ x = db.fetch("ISO 19011", "2011", allparts: true)
74
+ fetching ISO 19011...
75
+ => #<IsoBibItem::IsoBibliographicItem:...>
17
76
 
18
77
  x.to_xml
19
- => <bib-item ...>
78
+ => "<bib-item type=\"international-standard\" id=\"ISO19011\">...."
79
+
80
+ db.to_xml
81
+ => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<documents>\n <bibitem type=\"international-standard\"...."
82
+
83
+ db.load_entry("ISO 19011")
84
+ => #<IsoBibItem::IsoBibliographicItem:...>
85
+
86
+ db.save_entry("ISO 19011", nil)
87
+ => nil
88
+
89
+ db.load_entry("ISO 19011")
90
+ => nil
91
+
20
92
  ----
@@ -5,7 +5,7 @@ module Relaton
5
5
  class RelatonError < StandardError; end
6
6
 
7
7
  class Db
8
- SUPPORTED_GEMS = %w[ isobib rfcbib gbbib ].freeze
8
+ SUPPORTED_GEMS = %w[isobib rfcbib gbbib].freeze
9
9
 
10
10
  # @param global_cache [String] filename of global DB
11
11
  # @param local_cache [String] filename of local DB
@@ -66,7 +66,7 @@ module Relaton
66
66
  @db.transaction do
67
67
  Nokogiri::XML::Builder.new(encoding: "UTF-8") do |xml|
68
68
  xml.documents do
69
- @db.roots.each { |key| @db[key]["bib"].to_xml(xml, {}) }
69
+ @db.roots.each { |key| @db[key]&.fetch("bib")&.to_xml(xml, {}) }
70
70
  end
71
71
  end.to_xml
72
72
  end
@@ -144,7 +144,7 @@ module Relaton
144
144
  # @param year [String]
145
145
  def valid_bib_entry?(bib, year)
146
146
  bib&.is_a?(Hash) && bib&.has_key?("bib") && bib&.has_key?("fetched") &&
147
- (year || Date.today - Date.iso8601(bib["fetched"]) < 60)
147
+ (year || Date.today - bib["fetched"] < 60)
148
148
  end
149
149
 
150
150
  # @param filename [String] DB filename
@@ -1,3 +1,3 @@
1
1
  module Relaton
2
- VERSION = "0.1.1".freeze
2
+ VERSION = "0.1.2".freeze
3
3
  end
@@ -28,10 +28,10 @@ Gem::Specification.new do |spec|
28
28
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
29
29
 
30
30
  spec.add_dependency "algoliasearch"
31
- spec.add_dependency "gbbib", "~> 0.1.0"
31
+ spec.add_dependency "gbbib", "~> 0.2.0"
32
32
  spec.add_dependency "iev", "~> 0.1.0"
33
33
  spec.add_dependency "isobib", "~> 0.2.0"
34
- spec.add_dependency "rfcbib", "~> 0.1.0"
34
+ spec.add_dependency "rfcbib", "~> 0.2.0"
35
35
 
36
36
  spec.add_development_dependency "bundler", "~> 1.15"
37
37
  spec.add_development_dependency "byebug", "~> 9.1"
@@ -1,12 +1,14 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe Relaton::Db do
4
- it "rejects an illegal reference prefix" do
4
+ let!(:db) { Relaton::Db.new("testcache", "testcache2") }
5
+
6
+ before :each do
5
7
  system "rm testcache testcache2"
6
- db = Relaton::Db.new("testcache", "testcache2")
8
+ end
9
+
10
+ it "rejects an illegal reference prefix" do
7
11
  expect { db.fetch("XYZ XYZ", nil, {}) }.to output(/does not have a recognised prefix/).to_stderr
8
- # expect(File.exist?("testcache")).to be true
9
- # expect(File.exist?("testcache2")).to be true
10
12
  testcache = PStore.new "testcache"
11
13
  testcache.transaction do
12
14
  expect(testcache.roots.size).to eq 0
@@ -18,11 +20,8 @@ RSpec.describe Relaton::Db do
18
20
  end
19
21
 
20
22
  it "gets an ISO reference and caches it" do
21
- stub_isobib
22
- system "rm testcache testcache2"
23
- db = Relaton::Db.new("testcache", "testcache2")
23
+ stub_bib Isobib::IsoBibliography
24
24
  bib = db.fetch("ISO 19115-1", nil, {})
25
- #db.fetch("ISO 19115-1", nil, {})
26
25
  expect(bib).to be_instance_of IsoBibItem::IsoBibliographicItem
27
26
  expect(bib.to_xml).to include "<bibitem type=\"international-standard\" id=\"ISO19115-1\">"
28
27
  expect(File.exist?("testcache")).to be true
@@ -38,9 +37,7 @@ RSpec.describe Relaton::Db do
38
37
  end
39
38
 
40
39
  it "deals with a non-existant ISO reference" do
41
- stub_isobib
42
- system "rm testcache testcache2"
43
- db = Relaton::Db.new("testcache", "testcache2")
40
+ stub_bib Isobib::IsoBibliography
44
41
  bib = db.fetch("ISO 111111119115-1", nil, {})
45
42
  expect(bib).to be_nil
46
43
  expect(File.exist?("testcache")).to be true
@@ -58,9 +55,7 @@ RSpec.describe Relaton::Db do
58
55
  end
59
56
 
60
57
  it "list all elements as a serialization" do
61
- stub_isobib 2
62
- system "rm testcache testcache2"
63
- db = Relaton::Db.new("testcache", "testcache2")
58
+ stub_bib Isobib::IsoBibliography, 2
64
59
  db.fetch "ISO 19115-1", nil, {}
65
60
  db.fetch "ISO 19115-2", nil, {}
66
61
  file = "spec/support/list_entries.xml"
@@ -69,25 +64,47 @@ RSpec.describe Relaton::Db do
69
64
  end
70
65
 
71
66
  it "save/load entry" do
72
- system "rm testcache testcache2"
73
- db = Relaton::Db.new "testcache", "testcache2"
74
67
  db.save_entry "test key", value: "test value"
75
68
  expect(db.load_entry("test key")[:value]).to eq "test value"
76
69
  expect(db.load_entry("not existed key")).to be_nil
77
70
  end
78
71
 
72
+ it "get GB reference and cache it" do
73
+ stub_bib Gbbib::GbBibliography
74
+ bib = db.fetch "GB/T 20223", "2006", {}
75
+ expect(bib).to be_instance_of Gbbib::GbBibliographicItem
76
+ end
77
+
78
+ it "get RFC reference and cache it" do
79
+ stub_bib RfcBib::RfcBibliography
80
+ bib = db.fetch "RFC 8341", nil, {}
81
+ expect(bib).to be_instance_of IsoBibItem::BibliographicItem
82
+ end
83
+
79
84
  private
80
85
 
81
- def stub_isobib(count = 1)
82
- expect(Isobib::IsoBibliography).to receive(:get).and_wrap_original do |m, *args|
83
- expect(args.size).to eq 3
84
- expect(args[0]).to be_instance_of String
85
- expect(args[1]).to be_instance_of NilClass
86
- expect(args[2]).to be_instance_of Hash
87
- file = "spec/support/" + args[0].downcase.gsub(/[\s-]/, "_") + ".xml"
88
- File.write file, m.call(*args).to_xml unless File.exist? file
89
- resp = File.read file
90
- resp.empty? ? nil : IsoBibItem.from_xml(resp)
86
+ # @param count [Integer] number of stubbing
87
+ def stub_bib(bib_type, count = 1)
88
+ expect(bib_type).to receive(:get).and_wrap_original do |m, *args|
89
+ get_resp m, *args
91
90
  end.exactly(count).times
92
91
  end
92
+
93
+ def get_resp(method, *args)
94
+ expect_args args
95
+ file = "spec/support/" + args[0].downcase.gsub(/[\/\s-]/, "_")
96
+ file += "_#{args[1]}" if args[1]
97
+ store = PStore.new file
98
+ store.transaction do
99
+ store[:resp] = method.call(*args) unless store.root? :resp
100
+ store[:resp]
101
+ end
102
+ end
103
+
104
+ def expect_args(args)
105
+ expect(args.size).to eq 3
106
+ expect(args[0]).to be_instance_of String
107
+ expect(args[1]).to be_instance_of(NilClass).or be_instance_of String
108
+ expect(args[2]).to be_instance_of Hash
109
+ end
93
110
  end
@@ -8,12 +8,13 @@ end
8
8
  require "bundler/setup"
9
9
  require "relaton"
10
10
  require "isobib"
11
+ require "gbbib"
11
12
  require "rspec/matchers"
12
13
  require "equivalent-xml"
13
14
 
14
15
  RSpec.configure do |config|
15
16
  # Enable flags like --only-failures and --next-failure
16
- config.example_status_persistence_file_path = '.rspec_status'
17
+ config.example_status_persistence_file_path = ".rspec_status"
17
18
 
18
19
  # Disable RSpec exposing methods globally on `Module` and `main`
19
20
  config.disable_monkey_patching!
@@ -0,0 +1 @@
1
+ {: resp0
Binary file
Binary file
@@ -1,8 +1,8 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <documents>
3
3
  <bibitem type="international-standard" id="ISO19115-1">
4
- <title format="text/plain" language="en" script="Latn">Geographic information -- Metadata -- Part 1: Fundamentals</title>
5
- <title format="text/plain" language="fr" script="Latn">Information géographique -- Métadonnées -- Partie 1: Principes de base</title>
4
+ <title format="text/plain" language="en" script="Latn">[ -- ]</title>
5
+ <title format="text/plain" language="fr" script="Latn">[ -- ]</title>
6
6
  <uri type="src">https://www.iso.org/standard/53798.html</uri>
7
7
  <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
8
8
  <uri type="rss">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</uri>
@@ -28,7 +28,6 @@
28
28
  <owner>
29
29
  <organization>
30
30
  <name>ISO</name>
31
- <abbreviation></abbreviation>
32
31
  </organization>
33
32
  </owner>
34
33
  </copyright>
@@ -48,8 +47,64 @@
48
47
  </bibitem>
49
48
  </relation>
50
49
  <relation type="instance">
51
- <bibitem>
52
- <formattedref>ISO 19115:2003</formattedref>
50
+ <bibitem type="international-standard">
51
+ <title format="text/plain" language="en" script="Latn">[ -- ]</title>
52
+ <title format="text/plain" language="fr" script="Latn">[ -- ]</title>
53
+ <uri type="src">https://www.iso.org/standard/53798.html</uri>
54
+ <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
55
+ <uri type="rss">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</uri>
56
+ <docidentifier>ISO 19115-1</docidentifier>
57
+ <date type="published">
58
+ <on>2014</on>
59
+ </date>
60
+ <contributor>
61
+ <role type="publisher"/>
62
+ <organization>
63
+ <name>International Organization for Standardization</name>
64
+ <abbreviation>ISO</abbreviation>
65
+ <uri>www.iso.org</uri>
66
+ </organization>
67
+ </contributor>
68
+ <edition>1</edition>
69
+ <language>en</language>
70
+ <language>fr</language>
71
+ <script>Latn</script>
72
+ <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>
73
+ <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>
74
+ <status>
75
+ <stage>60</stage>
76
+ <substage>60</substage>
77
+ </status>
78
+ <copyright>
79
+ <from>2014</from>
80
+ <owner>
81
+ <organization>
82
+ <name>ISO</name>
83
+ </organization>
84
+ </owner>
85
+ </copyright>
86
+ <relation type="obsoletes">
87
+ <bibitem>
88
+ <formattedref>ISO 19115:2003</formattedref>
89
+ </bibitem>
90
+ </relation>
91
+ <relation type="obsoletes">
92
+ <bibitem>
93
+ <formattedref>ISO 19115:2003/Cor 1:2006</formattedref>
94
+ </bibitem>
95
+ </relation>
96
+ <relation type="updates">
97
+ <bibitem>
98
+ <formattedref>ISO 19115-1:2014/Amd 1:2018</formattedref>
99
+ </bibitem>
100
+ </relation>
101
+ <editorialgroup>
102
+ <technical_committee number="211" type="technicalCommittee">ISO/TC 211Geographic information/Geomatics</technical_committee>
103
+ </editorialgroup>
104
+ <ics>
105
+ <code>35.240.70</code>
106
+ <text>IT applications in science</text>
107
+ </ics>
53
108
  </bibitem>
54
109
  </relation>
55
110
  <editorialgroup>
@@ -61,8 +116,8 @@
61
116
  </ics>
62
117
  </bibitem>
63
118
  <bibitem type="international-standard" id="ISO19115-2">
64
- <title format="text/plain" language="en" script="Latn">Geographic information -- Metadata -- Part 2: Extensions for imagery and gridded data</title>
65
- <title format="text/plain" language="fr" script="Latn">Information géographique -- Métadonnées -- Partie 2: Extensions pour les images et les matrices</title>
119
+ <title format="text/plain" language="en" script="Latn">[ -- ]</title>
120
+ <title format="text/plain" language="fr" script="Latn">[ -- ]</title>
66
121
  <uri type="src">https://www.iso.org/standard/39229.html</uri>
67
122
  <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:39229:en</uri>
68
123
  <uri type="rss">https://www.iso.org/contents/data/standard/03/92/39229.detail.rss</uri>
@@ -88,7 +143,6 @@
88
143
  <owner>
89
144
  <organization>
90
145
  <name>ISO</name>
91
- <abbreviation></abbreviation>
92
146
  </organization>
93
147
  </owner>
94
148
  </copyright>
@@ -98,8 +152,54 @@
98
152
  </bibitem>
99
153
  </relation>
100
154
  <relation type="instance">
101
- <bibitem>
102
- <formattedref>ISO 19115-2</formattedref>
155
+ <bibitem type="international-standard">
156
+ <title format="text/plain" language="en" script="Latn">[ -- ]</title>
157
+ <title format="text/plain" language="fr" script="Latn">[ -- ]</title>
158
+ <uri type="src">https://www.iso.org/standard/39229.html</uri>
159
+ <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:39229:en</uri>
160
+ <uri type="rss">https://www.iso.org/contents/data/standard/03/92/39229.detail.rss</uri>
161
+ <docidentifier>ISO 19115-2</docidentifier>
162
+ <date type="published">
163
+ <on>2009</on>
164
+ </date>
165
+ <contributor>
166
+ <role type="publisher"/>
167
+ <organization>
168
+ <name>International Organization for Standardization</name>
169
+ <abbreviation>ISO</abbreviation>
170
+ <uri>www.iso.org</uri>
171
+ </organization>
172
+ </contributor>
173
+ <edition>1</edition>
174
+ <language>en</language>
175
+ <language>fr</language>
176
+ <script>Latn</script>
177
+ <abstract format="plain" language="en" script="Latn">ISO 19115-2:2009 extends the existing geographic metadata standard by defining the schema required for describing imagery and gridded data. It provides information about the properties of the measuring equipment used to acquire the data, the geometry of the measuring process employed by the equipment, and the production process used to digitize the raw data. This extension deals with metadata needed to describe the derivation of geographic information from raw data, including the properties of the measuring system, and the numerical methods and computational procedures used in the derivation. The metadata required to address coverage data in general is addressed sufficiently in the general part of ISO 19115.</abstract>
178
+ <abstract format="plain" language="fr" script="Latn">L'ISO 19115-2:2009 étend la norme existante sur les métadonnées géographiques en définissant le schéma requis de description des images et des matrices. Elle donne des informations relatives aux propriétés des équipements de mesure utilisés pour obtenir les données, la géométrie du processus de mesure utilisée par ces équipements, et le processus de production utilisé pour numériser les données brutes. Cette extension porte sur les métadonnées nécessaires pour décrire la déduction des informations géographiques à partir de données brutes, y compris les propriétés du système de mesure, et les méthodes numériques et procédures informatiques utilisées pour la déduction. Les métadonnées requises pour aborder les données de couverture en général sont suffisamment abordées dans la partie générale de l'ISO 19115.</abstract>
179
+ <status>
180
+ <stage>90</stage>
181
+ <substage>92</substage>
182
+ </status>
183
+ <copyright>
184
+ <from>2009</from>
185
+ <owner>
186
+ <organization>
187
+ <name>ISO</name>
188
+ </organization>
189
+ </owner>
190
+ </copyright>
191
+ <relation type="updates">
192
+ <bibitem>
193
+ <formattedref>ISO 19115-2</formattedref>
194
+ </bibitem>
195
+ </relation>
196
+ <editorialgroup>
197
+ <technical_committee number="211" type="technicalCommittee">ISO/TC 211Geographic information/Geomatics</technical_committee>
198
+ </editorialgroup>
199
+ <ics>
200
+ <code>35.240.70</code>
201
+ <text>IT applications in science</text>
202
+ </ics>
103
203
  </bibitem>
104
204
  </relation>
105
205
  <editorialgroup>
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-18 00:00:00.000000000 Z
11
+ date: 2018-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: algoliasearch
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.0
33
+ version: 0.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.1.0
40
+ version: 0.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: iev
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.1.0
75
+ version: 0.2.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.1.0
82
+ version: 0.2.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -264,10 +264,12 @@ files:
264
264
  - relaton.gemspec
265
265
  - spec/relaton/relaton_spec.rb
266
266
  - spec/spec_helper.rb
267
- - spec/support/iso_111111119115_1.xml
268
- - spec/support/iso_19115_1.xml
269
- - spec/support/iso_19115_2.xml
267
+ - spec/support/gb_t_20223_2006
268
+ - spec/support/iso_111111119115_1
269
+ - spec/support/iso_19115_1
270
+ - spec/support/iso_19115_2
270
271
  - spec/support/list_entries.xml
272
+ - spec/support/rfc_8341
271
273
  homepage: https://github.com/riboseinc/relaton
272
274
  licenses:
273
275
  - BSD-2-Clause
File without changes
@@ -1,117 +0,0 @@
1
- <bibitem type="international-standard" id="ISO19115-1">
2
- <title format="text/plain" language="en" script="Latn">Geographic information -- Metadata -- Part 1: Fundamentals</title>
3
- <title format="text/plain" language="fr" script="Latn">Information géographique -- Métadonnées -- Partie 1: Principes de base</title>
4
- <uri type="src">https://www.iso.org/standard/53798.html</uri>
5
- <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
6
- <uri type="rss">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</uri>
7
- <docidentifier>ISO 19115-1</docidentifier>
8
- <contributor>
9
- <role type="publisher"/>
10
- <organization>
11
- <name>International Organization for Standardization</name>
12
- <abbreviation>ISO</abbreviation>
13
- <uri>www.iso.org</uri>
14
- </organization>
15
- </contributor>
16
- <edition>1</edition>
17
- <language>en</language>
18
- <language>fr</language>
19
- <script>Latn</script>
20
- <status>
21
- <stage>60</stage>
22
- <substage>60</substage>
23
- </status>
24
- <copyright>
25
- <from>2014</from>
26
- <owner>
27
- <organization>
28
- <name>ISO</name>
29
- <abbreviation></abbreviation>
30
- </organization>
31
- </owner>
32
- </copyright>
33
- <relation type="obsoletes">
34
- <bibitem>
35
- <formattedref>ISO 19115:2003</formattedref>
36
- </bibitem>
37
- </relation>
38
- <relation type="obsoletes">
39
- <bibitem>
40
- <formattedref>ISO 19115:2003/Cor 1:2006</formattedref>
41
- </bibitem>
42
- </relation>
43
- <relation type="updates">
44
- <bibitem>
45
- <formattedref>ISO 19115-1:2014/Amd 1:2018</formattedref>
46
- </bibitem>
47
- </relation>
48
- <relation type="instance">
49
- <bibitem type="international-standard">
50
- <title format="text/plain" language="en" script="Latn">Geographic information -- Metadata -- Part 1: Fundamentals</title>
51
- <title format="text/plain" language="fr" script="Latn">Information géographique -- Métadonnées -- Partie 1: Principes de base</title>
52
- <uri type="src">https://www.iso.org/standard/53798.html</uri>
53
- <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
54
- <uri type="rss">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</uri>
55
- <docidentifier>ISO 19115-1</docidentifier>
56
- <date type="published">
57
- <on>2014</on>
58
- </date>
59
- <contributor>
60
- <role type="publisher"/>
61
- <organization>
62
- <name>International Organization for Standardization</name>
63
- <abbreviation>ISO</abbreviation>
64
- <uri>www.iso.org</uri>
65
- </organization>
66
- </contributor>
67
- <edition>1</edition>
68
- <language>en</language>
69
- <language>fr</language>
70
- <script>Latn</script>
71
- <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>
72
- <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>
73
- <status>
74
- <stage>60</stage>
75
- <substage>60</substage>
76
- </status>
77
- <copyright>
78
- <from>2014</from>
79
- <owner>
80
- <organization>
81
- <name>ISO</name>
82
- <abbreviation></abbreviation>
83
- </organization>
84
- </owner>
85
- </copyright>
86
- <relation type="obsoletes">
87
- <bibitem>
88
- <formattedref>ISO 19115:2003</formattedref>
89
- </bibitem>
90
- </relation>
91
- <relation type="obsoletes">
92
- <bibitem>
93
- <formattedref>ISO 19115:2003/Cor 1:2006</formattedref>
94
- </bibitem>
95
- </relation>
96
- <relation type="updates">
97
- <bibitem>
98
- <formattedref>ISO 19115-1:2014/Amd 1:2018</formattedref>
99
- </bibitem>
100
- </relation>
101
- <editorialgroup>
102
- <technical_committee number="211" type="technicalCommittee">ISO/TC 211Geographic information/Geomatics</technical_committee>
103
- </editorialgroup>
104
- <ics>
105
- <code>35.240.70</code>
106
- <text>IT applications in science</text>
107
- </ics>
108
- </bibitem>
109
- </relation>
110
- <editorialgroup>
111
- <technical_committee number="211" type="technicalCommittee">ISO/TC 211Geographic information/Geomatics</technical_committee>
112
- </editorialgroup>
113
- <ics>
114
- <code>35.240.70</code>
115
- <text>IT applications in science</text>
116
- </ics>
117
- </bibitem>
@@ -1,97 +0,0 @@
1
- <bibitem type="international-standard" id="ISO19115-2">
2
- <title format="text/plain" language="en" script="Latn">Geographic information -- Metadata -- Part 2: Extensions for imagery and gridded data</title>
3
- <title format="text/plain" language="fr" script="Latn">Information géographique -- Métadonnées -- Partie 2: Extensions pour les images et les matrices</title>
4
- <uri type="src">https://www.iso.org/standard/39229.html</uri>
5
- <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:39229:en</uri>
6
- <uri type="rss">https://www.iso.org/contents/data/standard/03/92/39229.detail.rss</uri>
7
- <docidentifier>ISO 19115-2</docidentifier>
8
- <contributor>
9
- <role type="publisher"/>
10
- <organization>
11
- <name>International Organization for Standardization</name>
12
- <abbreviation>ISO</abbreviation>
13
- <uri>www.iso.org</uri>
14
- </organization>
15
- </contributor>
16
- <edition>1</edition>
17
- <language>en</language>
18
- <language>fr</language>
19
- <script>Latn</script>
20
- <status>
21
- <stage>90</stage>
22
- <substage>92</substage>
23
- </status>
24
- <copyright>
25
- <from>2009</from>
26
- <owner>
27
- <organization>
28
- <name>ISO</name>
29
- <abbreviation></abbreviation>
30
- </organization>
31
- </owner>
32
- </copyright>
33
- <relation type="updates">
34
- <bibitem>
35
- <formattedref>ISO 19115-2</formattedref>
36
- </bibitem>
37
- </relation>
38
- <relation type="instance">
39
- <bibitem type="international-standard">
40
- <title format="text/plain" language="en" script="Latn">Geographic information -- Metadata -- Part 2: Extensions for imagery and gridded data</title>
41
- <title format="text/plain" language="fr" script="Latn">Information géographique -- Métadonnées -- Partie 2: Extensions pour les images et les matrices</title>
42
- <uri type="src">https://www.iso.org/standard/39229.html</uri>
43
- <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:39229:en</uri>
44
- <uri type="rss">https://www.iso.org/contents/data/standard/03/92/39229.detail.rss</uri>
45
- <docidentifier>ISO 19115-2</docidentifier>
46
- <date type="published">
47
- <on>2009</on>
48
- </date>
49
- <contributor>
50
- <role type="publisher"/>
51
- <organization>
52
- <name>International Organization for Standardization</name>
53
- <abbreviation>ISO</abbreviation>
54
- <uri>www.iso.org</uri>
55
- </organization>
56
- </contributor>
57
- <edition>1</edition>
58
- <language>en</language>
59
- <language>fr</language>
60
- <script>Latn</script>
61
- <abstract format="plain" language="en" script="Latn">ISO 19115-2:2009 extends the existing geographic metadata standard by defining the schema required for describing imagery and gridded data. It provides information about the properties of the measuring equipment used to acquire the data, the geometry of the measuring process employed by the equipment, and the production process used to digitize the raw data. This extension deals with metadata needed to describe the derivation of geographic information from raw data, including the properties of the measuring system, and the numerical methods and computational procedures used in the derivation. The metadata required to address coverage data in general is addressed sufficiently in the general part of ISO 19115.</abstract>
62
- <abstract format="plain" language="fr" script="Latn">L'ISO 19115-2:2009 étend la norme existante sur les métadonnées géographiques en définissant le schéma requis de description des images et des matrices. Elle donne des informations relatives aux propriétés des équipements de mesure utilisés pour obtenir les données, la géométrie du processus de mesure utilisée par ces équipements, et le processus de production utilisé pour numériser les données brutes. Cette extension porte sur les métadonnées nécessaires pour décrire la déduction des informations géographiques à partir de données brutes, y compris les propriétés du système de mesure, et les méthodes numériques et procédures informatiques utilisées pour la déduction. Les métadonnées requises pour aborder les données de couverture en général sont suffisamment abordées dans la partie générale de l'ISO 19115.</abstract>
63
- <status>
64
- <stage>90</stage>
65
- <substage>92</substage>
66
- </status>
67
- <copyright>
68
- <from>2009</from>
69
- <owner>
70
- <organization>
71
- <name>ISO</name>
72
- <abbreviation></abbreviation>
73
- </organization>
74
- </owner>
75
- </copyright>
76
- <relation type="updates">
77
- <bibitem>
78
- <formattedref>ISO 19115-2</formattedref>
79
- </bibitem>
80
- </relation>
81
- <editorialgroup>
82
- <technical_committee number="211" type="technicalCommittee">ISO/TC 211Geographic information/Geomatics</technical_committee>
83
- </editorialgroup>
84
- <ics>
85
- <code>35.240.70</code>
86
- <text>IT applications in science</text>
87
- </ics>
88
- </bibitem>
89
- </relation>
90
- <editorialgroup>
91
- <technical_committee number="211" type="technicalCommittee">ISO/TC 211Geographic information/Geomatics</technical_committee>
92
- </editorialgroup>
93
- <ics>
94
- <code>35.240.70</code>
95
- <text>IT applications in science</text>
96
- </ics>
97
- </bibitem>