relaton-iso-bib 1.13.0 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.adoc CHANGED
@@ -33,136 +33,32 @@ Or install it yourself as:
33
33
 
34
34
  [source,ruby]
35
35
  ----
36
- item = RelatonIsoBib::IsoBibliographicItem.new(
37
- fetched: "2018-10-21",
38
- structuredidentifier: RelatonIsoBib::StructuredIdentifier.new(
39
- type: "sid", project_number: "ISO 1-2:2014", part: 2, subpart: 2,
40
- ),
41
- docnumber: "123456",
42
- title: [
43
- { type: "title-intro", content: "Metadata", language: "en", script: "Latn" },
44
- { type: "title-main", content: "Geographic information", language: "en", script: "Latn" },
45
- { type: "title-part", content: "Part 1: Fundamentals", language: "en", script: "Latn" },
46
- { type: "main", content: "Metadata - Geographic information - Part 1: Fundamentals", language: "en", script: "Latn" },
47
- { type: "title-intro", content: "Métadonnées", language: "fr", script: "Latn" },
48
- { type: "title-main", content: "Information géographique", language: "fr", script: "Latn" },
49
- { type: "title-part", content: "Partie 1: Principes de base", language: "fr", script: "Latn" },
50
- { type: "main", content: "Information géographique - Métadonnées - Partie 1: Principes de base", language: "fr", script: "Latn" },
51
- ],
52
- edition: "1",
53
- version: RelatonBib::BibliographicItem::Version.new("2019-04-01", ["draft"]),
54
- language: %w[en fr],
55
- script: ["Latn"],
56
- type: "international-standard",
57
- docstatus: RelatonBib::DocumentStatus.new(stage: "60", substage: "60"),
58
- date: [{ type: "published", on: "2014-04" }],
59
- abstract: [
60
- { content: "ISO 19115-1:2014 defines the schema required for ...",
61
- language: "en", script: "Latn", format: "text/plain" },
62
- { content: "L'ISO 19115-1:2014 définit le schéma requis pour ...",
63
- language: "fr", script: "Latn", format: "text/plain" },
64
- ],
65
- contributor: [
66
- { entity: { name: "International Organization for Standardization",
67
- url: "www.iso.org", abbreviation: "ISO" },
68
- role: [type: "publisher"] },
69
- {
70
- entity: RelatonBib::Person.new(
71
- name: RelatonBib::FullName.new(
72
- completename: RelatonBib::LocalizedString.new("John Smith"),
73
- ),
74
- ),
75
- role: [type: "author"],
76
- },
77
- ],
78
- copyright: [{
79
- owner: [{
80
- name: "International Organization for Standardization",
81
- abbreviation: "ISO", url: "www.iso.org"
82
- }], from: "2014" }],
83
- link: [
84
- { type: "src", content: "https://www.iso.org/standard/53798.html" },
85
- { type: "obp",
86
- content: "https://www.iso.org/obp/ui/#!iso:std:53798:en" },
87
- { type: "rss", content: "https://www.iso.org/contents/data/standard"\
88
- "/05/37/53798.detail.rss" },
89
- ],
90
- relation: [
91
- RelatonBib::DocumentRelation.new(
92
- type: "updates",
93
- bibitem: RelatonIsoBib::IsoBibliographicItem.new(
94
- formattedref: RelatonBib::FormattedRef.new(content: "ISO 19115:2003"),
95
- docstatus: RelatonBib::DocumentStatus.new(stage: "60", substage: "60"),
96
- ),
97
- locality: [
98
- RelatonBib::BibItemLocality.new("updates", "Reference form"),
99
- ],
100
- ),
101
- RelatonBib::DocumentRelation.new(
102
- type: "updates",
103
- bibitem: RelatonIsoBib::IsoBibliographicItem.new(
104
- type: "international-standard",
105
- formattedref: RelatonBib::FormattedRef.new(content: "ISO 19115:2003/Cor 1:2006"),
106
- ),
107
- ),
108
- ],
109
- series: [
110
- RelatonBib::Series.new(
111
- type: "main",
112
- title: RelatonBib::TypedTitleString.new(
113
- type: "title-main", content: "ISO/IEC FDIS 10118-3", language: "en", script: "Latn",
114
- ),
115
- place: "Serie's place",
116
- organization: "Serie's organization",
117
- abbreviation: RelatonBib::LocalizedString.new("ABVR", "en", "Latn"),
118
- from: "2009-02-01",
119
- to: "2010-12-20",
120
- number: "serie1234",
121
- partnumber: "part5678",
122
- ),
123
- RelatonBib::Series.new(
124
- type: "alt",
125
- formattedref: RelatonBib::FormattedRef.new(
126
- content: "serieref", language: "en", script: "Latn",
127
- ),
128
- )
129
- ],
130
- medium: RelatonBib::Medium.new(
131
- form: "medium form", size: "medium size", scale: "medium scale",
132
- ),
133
- place: ["bib place"],
134
- extent: [
135
- RelatonBib::BibItemLocality.new(
136
- "section", "Reference from", "Reference to"
137
- ),
138
- ],
139
- accesslocation: ["accesslocation1", "accesslocation2"],
140
- classification: [RelatonBib::Classification.new(type: "type", value: "value")],
141
- validity: RelatonBib::Validity.new(
142
- begins: Time.new(2010, 10, 10, 12, 21),
143
- ends: Time.new(2011, 2, 3, 18,30),
144
- revision: Time.new(2011, 3, 4, 9, 0),
145
- ),
146
- editorialgroup: {
147
- technical_committee: [{
148
- name: " ISO/TC 211 Geographic information/Geomatics",
149
- type: "technicalCommittee", number: 211
150
- }],
151
- subcommittee: [{
152
- name: "International Organization for Standardization",
153
- type: "ISO", number: 122,
154
- }],
155
- workgroup: [RelatonIsoBib::IsoSubgroup.new(
156
- name: "Workgroup Organization",
157
- type: "WG", number: 111,
158
- )],
159
- },
160
- ics: [{ field: 35, group: 240, subgroup: 70 }],
161
- )
162
-
163
- => #<RelatonIsoBib::IsoBibliographicItem:0x007fc0b88c66a0
36
+ require 'relaton_iso_bib'
37
+ => true
38
+
39
+ hash = YAML.load_file "spec/examples/iso_bib_item.yml"
40
+ => {
41
+ "schema-version"=>"v1.0.0",
42
+ "id"=>"ISO/TC211",
43
+ "title"=>[
44
+ {"type"=>"title-intro", "content"=>"Geographic information", "language"=>"en", "script"=>"Latn", "format"=>"text/plain"},
45
+ ...
46
+
47
+ bib_hash = RelatonIsoBib::HashConverter.hash_to_bib hash
48
+ => {:"schema-version"=>"v1.0.0",
49
+ :id=>"ISO/TC211",
50
+ :fetched=>"2011-06-22",
51
+ :title=>
52
+ #<RelatonBib::TypedTitleStringCollection:0x00007ff73e922ab0
53
+ @array=
54
+ [#<RelatonBib::TypedTitleString:0x00007ff73e9225d8
55
+ ...
56
+
57
+ item = RelatonIsoBib::IsoBibliographicItem.new(**bib_hash)
58
+ => #<RelatonIsoBib::IsoBibliographicItem:0x00007ff77f8952c8
164
59
  @abstract=
165
- [#<RelatonBib::FormattedString:0x007fc0b88c5ae8 @content="ISO 19115-1:2014 defines the schema required for ...", @format="text/plain", @language=["en"], @script=["Latn"]>,
60
+ [#<RelatonBib::FormattedString:0x00007ff76f1496c8
61
+ @content="ISO 19115-1:2014 defines the schema required for ...",
166
62
  ...
167
63
  ----
168
64
 
@@ -171,45 +67,66 @@ item = RelatonIsoBib::IsoBibliographicItem.new(
171
67
  [source,ruby]
172
68
  ----
173
69
  item.title
174
- => [#<RelatonBib::TypedTitleString:0x007fc08e95a640
175
- @title=#<RelatonBib::FormattedString:0x007fc08e95a500 @content="Metadata", @format="text/plain", @language=["en"], @script=["Latn"]>,
176
- @type="title-intro">,
177
- #<RelatonBib::TypedTitleString:0x007fc08e95a460
178
- @title=#<RelatonBib::FormattedString:0x007fc08e95a320 @content="Geographic information", @format="text/plain", @language=["en"], @script=["Latn"]>,
179
- @type="title-main">,
180
- #<RelatonBib::TypedTitleString:0x007fc08e95a280
181
- @title=#<RelatonBib::FormattedString:0x007fc08e95a140 @content="Part 1: Fundamentals", @format="text/plain", @language=["en"], @script=["Latn"]>,
182
- @type="title-part">,
183
- #<RelatonBib::TypedTitleString:0x007fc08e95a0a0
184
- @title=#<RelatonBib::FormattedString:0x007fc08e959f60 @content="Metadata - Geographic information - Part 1: Fundamentals", @format="text/plain", @language=["en"], @script=["Latn"]>,
185
- @type="main">,
186
- #<RelatonBib::TypedTitleString:0x007fc08e959ec0
187
- @title=#<RelatonBib::FormattedString:0x007fc08e959d80 @content="Métadonnées", @format="text/plain", @language=["fr"], @script=["Latn"]>,
188
- @type="title-intro">,
189
- #<RelatonBib::TypedTitleString:0x007fc08e959ce0
190
- @title=#<RelatonBib::FormattedString:0x007fc08e959ba0 @content="Information géographique", @format="text/plain", @language=["fr"], @script=["Latn"]>,
191
- @type="title-main">,
192
- #<RelatonBib::TypedTitleString:0x007fc08e959b00
193
- @title=#<RelatonBib::FormattedString:0x007fc08e9599c0 @content="Partie 1: Principes de base", @format="text/plain", @language=["fr"], @script=["Latn"]>,
194
- @type="title-part">,
195
- #<RelatonBib::TypedTitleString:0x007fc08e959920
196
- @title=
197
- #<RelatonBib::FormattedString:0x007fc08e9597e0 @content="Information géographique - Métadonnées - Partie 1: Principes de base", @format="text/plain", @language=["fr"], @script=["Latn"]>,
198
- @type="main">]
70
+ => #<RelatonBib::TypedTitleStringCollection:0x00007ff73e922ab0
71
+ @array=
72
+ [#<RelatonBib::TypedTitleString:0x00007ff73e9225d8
73
+ @title=
74
+ #<RelatonBib::FormattedString:0x00007ff73e9224c0 @content="Geographic information", @format="text/plain", @language=["en"], @script=["Latn"]>,
75
+ @type="title-intro">,
76
+ #<RelatonBib::TypedTitleString:0x00007ff73e921cc8
77
+ @title=#<RelatonBib::FormattedString:0x00007ff73e921b60 @content="Metadata", @format="text/plain", @language=["en"], @script=["Latn"]>,
78
+ @type="title-main">,
79
+ #<RelatonBib::TypedTitleString:0x00007ff73e9219d0
80
+ @title=#<RelatonBib::FormattedString:0x00007ff73e921908 @content="Part 1: Fundamentals", @format="text/plain", @language=["en"], @script=["Latn"]>,
81
+ @type="title-part">,
82
+ #<RelatonBib::TypedTitleString:0x00007ff73e921638
83
+ @title=
84
+ #<RelatonBib::FormattedString:0x00007ff73e921548
85
+ @content="Geographic information – Metadata – Part 1: Fundamentals",
86
+ @format="text/plain",
87
+ @language=["en"],
88
+ @script=["Latn"]>,
89
+ @type="main">,
90
+ #<RelatonBib::TypedTitleString:0x00007ff73e9214a8
91
+ @title=
92
+ #<RelatonBib::FormattedString:0x00007ff73e921368 @content="Information géographique", @format="text/plain", @language=["fr"], @script=["Latn"]>,
93
+ @type="title-intro">,
94
+ #<RelatonBib::TypedTitleString:0x00007ff73e9212c8
95
+ @title=#<RelatonBib::FormattedString:0x00007ff73e9211b0 @content="Métadonnées", @format="text/plain", @language=["fr"], @script=["Latn"]>,
96
+ @type="title-main">,
97
+ #<RelatonBib::TypedTitleString:0x00007ff73e921020
98
+ @title=
99
+ #<RelatonBib::FormattedString:0x00007ff73e920f08 @content="Information géographique", @format="text/plain", @language=["fr"], @script=["Latn"]>,
100
+ @type="title-part">,
101
+ #<RelatonBib::TypedTitleString:0x00007ff73e920da0
102
+ @title=
103
+ #<RelatonBib::FormattedString:0x00007ff73e920c60
104
+ @content="Information géographique – Métadonnées – Information géographique",
105
+ @format="text/plain",
106
+ @language=["fr"],
107
+ @script=["Latn"]>,
108
+ @type="main">]>
199
109
 
200
110
  item.title(lang: "en")
201
- => [#<RelatonBib::TypedTitleString:0x007fc08e95a640
202
- @title=#<RelatonBib::FormattedString:0x007fc08e95a500 @content="Metadata", @format="text/plain", @language=["en"], @script=["Latn"]>,
203
- @type="title-intro">,
204
- #<RelatonBib::TypedTitleString:0x007fc08e95a460
205
- @title=#<RelatonBib::FormattedString:0x007fc08e95a320 @content="Geographic information", @format="text/plain", @language=["en"], @script=["Latn"]>,
206
- @type="title-main">,
207
- #<RelatonBib::TypedTitleString:0x007fc08e95a280
208
- @title=#<RelatonBib::FormattedString:0x007fc08e95a140 @content="Part 1: Fundamentals", @format="text/plain", @language=["en"], @script=["Latn"]>,
209
- @type="title-part">,
210
- #<RelatonBib::TypedTitleString:0x007fc08e95a0a0
211
- @title=#<RelatonBib::FormattedString:0x007fc08e959f60 @content="Metadata - Geographic information - Part 1: Fundamentals", @format="text/plain", @language=["en"], @script=["Latn"]>,
212
- @type="main">]
111
+ => #<RelatonBib::TypedTitleStringCollection:0x00007ff72f0c2e88
112
+ @array=
113
+ [#<RelatonBib::TypedTitleString:0x00007ff73e9225d8
114
+ @title=#<RelatonBib::FormattedString:0x00007ff73e9224c0 @content="Geographic information", @format="text/plain", @language=["en"], @script=["Latn"]>,
115
+ @type="title-intro">,
116
+ #<RelatonBib::TypedTitleString:0x00007ff73e921cc8
117
+ @title=#<RelatonBib::FormattedString:0x00007ff73e921b60 @content="Metadata", @format="text/plain", @language=["en"], @script=["Latn"]>,
118
+ @type="title-main">,
119
+ #<RelatonBib::TypedTitleString:0x00007ff73e9219d0
120
+ @title=#<RelatonBib::FormattedString:0x00007ff73e921908 @content="Part 1: Fundamentals", @format="text/plain", @language=["en"], @script=["Latn"]>,
121
+ @type="title-part">,
122
+ #<RelatonBib::TypedTitleString:0x00007ff73e921638
123
+ @title=
124
+ #<RelatonBib::FormattedString:0x00007ff73e921548
125
+ @content="Geographic information – Metadata – Part 1: Fundamentals",
126
+ @format="text/plain",
127
+ @language=["en"],
128
+ @script=["Latn"]>,
129
+ @type="main">]>
213
130
 
214
131
  item.abstract(lang: "en").to_s
215
132
  => "ISO 19115-1:2014 defines the schema required for ..."
@@ -220,7 +137,7 @@ item.abstract(lang: "en").to_s
220
137
  [source,ruby]
221
138
  ----
222
139
  item.shortref(item.structuredidentifier)
223
- => "ISO1-2-2014"
140
+ => "ISO1-2-2014:2014"
224
141
  ----
225
142
 
226
143
  === IsoBibliographicItem URLs
@@ -258,9 +175,23 @@ item.ics
258
175
  [source,ruby]
259
176
  ----
260
177
  item.date
261
- => [#<RelatonBib::BibliographicDate:0x007fc0aeb88438 @from=nil, @on=#<Date: 2014-04-01 ((2456749j,0s,0n),+0s,2299161j)>, @to=nil, @type="published">]
178
+ => [#<RelatonBib::BibliographicDate:0x00007ff77f894f08 @from=nil, @on="2014", @to=nil, @type="issued">,
179
+ #<RelatonBib::BibliographicDate:0x00007ff76f161f70 @from=nil, @on="2014-04", @to=nil, @type="published">,
180
+ #<RelatonBib::BibliographicDate:0x00007ff76f1605f8 @from=nil, @on="2015-05-20", @to=nil, @type="accessed">]
262
181
 
263
182
  item.date.filter(type: "published").first.on
183
+ => "2014-04"
184
+
185
+ item.date.filter(type: "published").first.on :year
186
+ => 2014
187
+
188
+ item.date.filter(type: "published").first.on :month
189
+ => 4
190
+
191
+ item.date.filter(type: "published").first.on :day
192
+ => nil
193
+
194
+ item.date.filter(type: "published").first.on :date
264
195
  => #<Date: 2014-04-01 ((2456749j,0s,0n),+0s,2299161j)>
265
196
  ----
266
197
 
@@ -269,20 +200,32 @@ item.date.filter(type: "published").first.on
269
200
  [source,ruby]
270
201
  ----
271
202
  item.status
272
- => #<RelatonBib::DocumentStatus:0x007fc0aeb927d0
273
- @iteration=nil,
274
- @stage=#<RelatonBib::DocumentStatus::Stage:0x007fc0aeb92708 @abbreviation=nil, @value="60">,
275
- @substage=#<RelatonBib::DocumentStatus::Stage:0x007fc0aeb92690 @abbreviation=nil, @value="60">>
203
+ => #<RelatonBib::DocumentStatus:0x00007ff76f0eb8e8
204
+ @iteration="final",
205
+ @stage=#<RelatonBib::DocumentStatus::Stage:0x00007ff76f0ebaf0 @abbreviation=nil, @value=60>,
206
+ @substage=#<RelatonBib::DocumentStatus::Stage:0x00007ff76f0eba78 @abbreviation=nil, @value=60>>
276
207
  ----
277
208
 
278
209
  [source,ruby]
279
210
  ----
280
211
  wg = item.editorialgroup
281
- => #<RelatonIsoBib::EditorialGroup:0x007fe519895200
212
+ => #<RelatonIsoBib::EditorialGroup:0x00007ff73e91a478
282
213
  @secretariat=nil,
283
- @subcommittee=[#<RelatonIsoBib::IsoSubgroup:0x007fe519894a58 @name="International Organization for Standardization", @number=122, @type="ISO">],
284
- @technical_committee=[#<RelatonIsoBib::IsoSubgroup:0x007fe519894d78 @name=" ISO/TC 211 Geographic information/Geomatics", @number=211, @type="technicalCommittee">],
285
- @workgroup=[#<RelatonIsoBib::IsoSubgroup:0x007fe5198c4668 @name="Workgroup Organization", @number=111, @type="WG">]>
214
+ @subcommittee=
215
+ [#<RelatonBib::WorkGroup:0x00007ff73e91a108
216
+ @identifier=nil,
217
+ @name="International Organization for Standardization",
218
+ @number="122",
219
+ @prefix=nil,
220
+ @type="ISO">],
221
+ @technical_committee=
222
+ [#<RelatonBib::WorkGroup:0x00007ff73e91a338
223
+ @identifier=nil,
224
+ @name="ISO/TC 211 Geographic information/Geomatics",
225
+ @number="211",
226
+ @prefix=nil,
227
+ @type="technicalCommittee">],
228
+ @workgroup=[#<RelatonBib::WorkGroup:0x00007ff73e919ed8 @identifier=nil, @name="Workgroup Organization", @number="111", @prefix=nil, @type="WG">]>
286
229
  ----
287
230
 
288
231
  === Document relations of a standard
@@ -301,7 +244,7 @@ item.relation
301
244
  === Reference modification: convert to all parts reference
302
245
 
303
246
  In ISO, an All Parts reference is a reference to all parts of a standard. If a standard consists of parts,
304
- only those parts are referenced in the ISO web site (as retrieved by the isobib gem). A part reference is
247
+ only those parts are referenced in the ISO website (as retrieved by the isobib gem). A part reference is
305
248
  converted to an All Parts reference by making the part reference a partOf relation to a new reference,
306
249
  which strips the part number and part title of the original, and its abstract. The operation is destructive.
307
250
 
@@ -314,46 +257,64 @@ all_parts_item = item.to_all_parts
314
257
  @all_parts=true,
315
258
  ...
316
259
 
317
- all_arts_item.title(lang: "en")
318
- => [#<RelatonBib::TypedTitleString:0x007fc08f388dd8
319
- @title=#<RelatonBib::FormattedString:0x007fc08f388d10 @content="Metadata", @format="text/plain", @language=["en"], @script=["Latn"]>,
320
- @type="title-intro">,
321
- #<RelatonBib::TypedTitleString:0x007fc08f388b58
322
- @title=#<RelatonBib::FormattedString:0x007fc08f388b08 @content="Geographic information", @format="text/plain", @language=["en"], @script=["Latn"]>,
323
- @type="title-main">,
324
- #<RelatonBib::TypedTitleString:0x007fc08f3888d8
325
- @title=#<RelatonBib::FormattedString:0x007fc08f388888 @content="Metadata – Geographic information", @format="text/plain", @language=["en"], @script=["Latn"]>,
326
- @type="main">]
327
-
328
- all_arts_item.shortref(item.structuredidentifier)
329
- => "ISO1(allparts):2014: All Parts"
330
-
331
- all_arts_item.relation.last.bibitem.title
332
- => [#<RelatonBib::TypedTitleString:0x007fc0aeb7bd28
333
- @title=#<RelatonBib::FormattedString:0x007fc0aeb7bad0 @content="Metadata", @format="text/plain", @language=["en"], @script=["Latn"]>,
334
- @type="title-intro">,
335
- #<RelatonBib::TypedTitleString:0x007fc0aeb7ba30
336
- @title=#<RelatonBib::FormattedString:0x007fc0aeb7b8c8 @content="Geographic information", @format="text/plain", @language=["en"], @script=["Latn"]>,
337
- @type="title-main">,
338
- #<RelatonBib::TypedTitleString:0x007fc0aeb7b800
339
- @title=#<RelatonBib::FormattedString:0x007fc0aeb7b5f8 @content="Part 1: Fundamentals", @format="text/plain", @language=["en"], @script=["Latn"]>,
340
- @type="title-part">,
341
- #<RelatonBib::TypedTitleString:0x007fc0aeb7b558
342
- @title=#<RelatonBib::FormattedString:0x007fc0aeb7b288 @content="Metadata - Geographic information - Part 1: Fundamentals", @format="text/plain", @language=["en"], @script=["Latn"]>,
343
- @type="main">,
344
- #<RelatonBib::TypedTitleString:0x007fc0aeb7b148
345
- @title=#<RelatonBib::FormattedString:0x007fc0aeb7ae00 @content="Métadonnées", @format="text/plain", @language=["fr"], @script=["Latn"]>,
346
- @type="title-intro">,
347
- #<RelatonBib::TypedTitleString:0x007fc0aeb7ac48
348
- @title=#<RelatonBib::FormattedString:0x007fc0aeb7a888 @content="Information géographique", @format="text/plain", @language=["fr"], @script=["Latn"]>,
349
- @type="title-main">,
350
- #<RelatonBib::TypedTitleString:0x007fc0aeb7a6d0
351
- @title=#<RelatonBib::FormattedString:0x007fc0aeb7a400 @content="Partie 1: Principes de base", @format="text/plain", @language=["fr"], @script=["Latn"]>,
352
- @type="title-part">,
353
- #<RelatonBib::TypedTitleString:0x007fc0aeb7a2c0
354
- @title=
355
- #<RelatonBib::FormattedString:0x007fc0aeb79f28 @content="Information géographique - Métadonnées - Partie 1: Principes de base", @format="text/plain", @language=["fr"], @script=["Latn"]>,
356
- @type="main">]
260
+ all_parts_item.title(lang: "en")
261
+ => #<RelatonBib::TypedTitleStringCollection:0x00007ff77ea5fde8
262
+ @array=
263
+ [#<RelatonBib::TypedTitleString:0x00007ff77ecb5160
264
+ @title=#<RelatonBib::FormattedString:0x00007ff77ecb5098 @content="Geographic information", @format="text/plain", @language=["en"], @script=["Latn"]>,
265
+ @type="title-intro">,
266
+ #<RelatonBib::TypedTitleString:0x00007ff77ecb4ee0
267
+ @title=#<RelatonBib::FormattedString:0x00007ff77ecb4e90 @content="Metadata", @format="text/plain", @language=["en"], @script=["Latn"]>,
268
+ @type="title-main">,
269
+ #<RelatonBib::TypedTitleString:0x00007ff77ecb4c10
270
+ @title=
271
+ #<RelatonBib::FormattedString:0x00007ff77ecb4bc0
272
+ @content="Geographic information – Metadata",
273
+ @format="text/plain",
274
+ @language=["en"],
275
+ @script=["Latn"]>,
276
+ @type="main">]>
277
+
278
+ all_parts_item.shortref(item.structuredidentifier)
279
+ => "ISO1-2-2014:2014: All Parts"
280
+
281
+ all_parts_item.relation.last.bibitem.title
282
+ => #<RelatonBib::TypedTitleStringCollection:0x00007ff73e922ab0
283
+ @array=
284
+ [#<RelatonBib::TypedTitleString:0x00007ff73e9225d8
285
+ @title=#<RelatonBib::FormattedString:0x00007ff73e9224c0 @content="Geographic information", @format="text/plain", @language=["en"], @script=["Latn"]>,
286
+ @type="title-intro">,
287
+ #<RelatonBib::TypedTitleString:0x00007ff73e921cc8
288
+ @title=#<RelatonBib::FormattedString:0x00007ff73e921b60 @content="Metadata", @format="text/plain", @language=["en"], @script=["Latn"]>,
289
+ @type="title-main">,
290
+ #<RelatonBib::TypedTitleString:0x00007ff73e9219d0
291
+ @title=#<RelatonBib::FormattedString:0x00007ff73e921908 @content="Part 1: Fundamentals", @format="text/plain", @language=["en"], @script=["Latn"]>,
292
+ @type="title-part">,
293
+ #<RelatonBib::TypedTitleString:0x00007ff73e921638
294
+ @title=
295
+ #<RelatonBib::FormattedString:0x00007ff73e921548
296
+ @content="Geographic information – Metadata – Part 1: Fundamentals",
297
+ @format="text/plain",
298
+ @language=["en"],
299
+ @script=["Latn"]>,
300
+ @type="main">,
301
+ #<RelatonBib::TypedTitleString:0x00007ff73e9214a8
302
+ @title=#<RelatonBib::FormattedString:0x00007ff73e921368 @content="Information géographique", @format="text/plain", @language=["fr"], @script=["Latn"]>,
303
+ @type="title-intro">,
304
+ #<RelatonBib::TypedTitleString:0x00007ff73e9212c8
305
+ @title=#<RelatonBib::FormattedString:0x00007ff73e9211b0 @content="Métadonnées", @format="text/plain", @language=["fr"], @script=["Latn"]>,
306
+ @type="title-main">,
307
+ #<RelatonBib::TypedTitleString:0x00007ff73e921020
308
+ @title=#<RelatonBib::FormattedString:0x00007ff73e920f08 @content="Information géographique", @format="text/plain", @language=["fr"], @script=["Latn"]>,
309
+ @type="title-part">,
310
+ #<RelatonBib::TypedTitleString:0x00007ff73e920da0
311
+ @title=
312
+ #<RelatonBib::FormattedString:0x00007ff73e920c60
313
+ @content="Information géographique – Métadonnées – Information géographique",
314
+ @format="text/plain",
315
+ @language=["fr"],
316
+ @script=["Latn"]>,
317
+ @type="main">]>
357
318
  ----
358
319
 
359
320
  === Reference modification: convert to most recent reference
@@ -361,16 +322,24 @@ all_arts_item.relation.last.bibitem.title
361
322
  In ISO, an undated reference is interpreted as a _de dicto_ reference to the most recent instance of the
362
323
  reference; if the document is read after a new version of the reference has been issued, the reference is taken
363
324
  to refer to that new instance, even if that instance had not been published at the time the bibliography was authored.
364
- All references on the ISO web site (as retrieved by the isobib gem) are dated. A dated reference is
365
- converted to a Most Recent referece by making the dated reference an instance relation to a new reference,
325
+ All references on the ISO website (as retrieved by the isobib gem) are dated. A dated reference is
326
+ converted to a Most Recent reference by making the dated reference an instance relation to a new reference,
366
327
  which strips the date of publication of the original, and its abstract. The operation is destructive.
367
328
 
368
329
  [source,ruby]
369
330
  ----
370
331
  all_parts_item.date
371
- => [#<RelatonBib::BibliographicDate:0x007fc0aeb88438 @from=nil, @on=#<Date: 2014-04-01 ((2456749j,0s,0n),+0s,2299161j)>, @to=nil, @type="published">]
332
+ => [#<RelatonBib::BibliographicDate:0x00007ff77ecb4418 @from=nil, @on="2014", @to=nil, @type="issued">,
333
+ #<RelatonBib::BibliographicDate:0x00007ff77ecb4328 @from=nil, @on="2014-04", @to=nil, @type="published">,
334
+ #<RelatonBib::BibliographicDate:0x00007ff77ecb42b0 @from=nil, @on="2015-05-20", @to=nil, @type="accessed">]
372
335
 
373
336
  most_recent_ref_item = all_parts_item.to_most_recent_reference
337
+ => #<RelatonIsoBib::IsoBibliographicItem:0x00007ff73ea4b978
338
+ @abstract=[],
339
+ @accesslocation=["accesslocation1", "accesslocation2"],
340
+ @all_parts=true,
341
+ ...
342
+
374
343
  most_recent_ref_item.date
375
344
  => []
376
345
 
@@ -384,19 +353,27 @@ most_recent_ref_item.shortref(most_recent_ref_item.structuredidentifier)
384
353
  [source,ruby]
385
354
  ----
386
355
  item.to_xml(bibdata: true)
387
- => "<bibdata>
388
- <fetched>2018-10-21</fetched>
389
- <title type="title-main" format="text/plain" language="en" script="Latn">Metadata</title>
356
+ => "<bibdata type="standard" schema-version="v1.2.1">
357
+ <fetched>2011-06-22</fetched>
390
358
  <title type="title-intro" format="text/plain" language="en" script="Latn">Geographic information</title>
359
+ <title type="title-main" format="text/plain" language="en" script="Latn">Metadata</title>
391
360
  <title type="title-part" format="text/plain" language="en" script="Latn">Part 1: Fundamentals</title>
392
- <title type="main" format="text/plain" language="en" script="Latn">Metadata - Geographic information - Part 1: Fundamentals</title>
361
+ <title type="main" format="text/plain" language="en" script="Latn">Geographic information Metadata – Part 1: Fundamentals</title>
362
+ <title type="title-intro" format="text/plain" language="fr" script="Latn">Information géographique</title>
363
+ <title type="title-main" format="text/plain" language="fr" script="Latn">Métadonnées</title>
364
+ <title type="title-part" format="text/plain" language="fr" script="Latn">Information géographique</title>
365
+ <title type="main" format="text/plain" language="fr" script="Latn">Information géographique – Métadonnées – Information géographique</title>
393
366
  ...
367
+ <ext schema-version="v1.0.0">
368
+ <doctype>international-standard</doctype>
369
+ ...
370
+ </ext>
394
371
  </bibdata>"
395
372
 
396
373
  item.to_xml(bibdata: true, note: [{ type: "note type", text: "test note" }])
397
- => "<bibdata>
398
- <fetched>2018-10-21</fetched>
399
- <title type="title-main" format="text/plain" language="en" script="Latn">Metadata</title>
374
+ => "<bibdata type="standard" schema-version="v1.2.1">
375
+ <fetched>2011-06-22</fetched>
376
+ <title type="title-intro" format="text/plain" language="en" script="Latn">Geographic information</title>
400
377
  ...
401
378
  <note format="text/plain" type="note type">test note</note>
402
379
  ...
@@ -407,16 +384,17 @@ item.to_xml(bibdata: true, note: [{ type: "note type", text: "test note" }])
407
384
  [source,ruby]
408
385
  ----
409
386
  item.to_bibtex
410
- => "@international-standard{john2014a,
411
- tile = {Information géographique - Métadonnées - Partie 1: Principes de base},
387
+ => "@misc{ISO/TC211,
388
+ title = {Geographic information Metadata Part 1: Fundamentals},
412
389
  edition = {1},
413
- author = {Smith, John},
414
- publisher = {International Organization for Standardization},
390
+ author = {Bierman, A. and Bierman, A},
391
+ publisher = {IETF},
415
392
  address = {bib place},
416
393
  year = {2014},
417
394
  month = apr,
395
+ urldate = {2015-05-20},
418
396
  type = {value},
419
- timestamp = {2018-10-21},
397
+ timestamp = {2011-06-22},
420
398
  url = {https://www.iso.org/standard/53798.html},
421
399
  month_numeric = {4}
422
400
  }"
@@ -429,29 +407,35 @@ item.to_bibtex
429
407
  item.to_asciibib
430
408
  => "[%bibitem]
431
409
  == {blank}
432
- id:: ISOTC211
433
- fetched:: 2020-08-19
410
+ id:: ISO/TC211
411
+ fetched:: 2011-06-22
434
412
  title::
435
413
  title.type:: title-intro
436
- title.content:: Metadata
414
+ title.content:: Geographic information
437
415
  title.language:: en
438
416
  title.script:: Latn
439
417
  title.format:: text/plain
440
- itle::
418
+ title::
441
419
  title.type:: title-main
442
- title.conten:: Geographic information
443
- ..."
420
+ title.content:: Metadata
421
+ title.language:: en
422
+ title.script:: Latn
423
+ title.format:: text/plain
424
+ ...
425
+ "
444
426
  ----
445
427
 
446
- === Create bibliographic item form YAML
428
+ === Create bibliographic item from YAML
447
429
  [source,ruby]
448
430
  ----
449
431
  hash = YAML.load_file 'spec/examples/iso_bib_item.yml'
450
- => {"id"=>"ISO/TC211",
432
+ => {"schema-version"=>"v1.0.0",
433
+ "id"=>"ISO/TC211",
451
434
  ...
452
435
 
453
436
  bib_hash = RelatonIsoBib::HashConverter.hash_to_bib hash
454
- => {:id=>"ISO/TC211",
437
+ => {:"schema-version"=>"v1.0.0",
438
+ :id=>"ISO/TC211",
455
439
  ...
456
440
 
457
441
  RelatonIsoBib::IsoBibliographicItem.new **bib_hash
@@ -474,7 +458,7 @@ The ISO standards use a subset of the generic bibliographic fields specified in
474
458
  ** Technical Committee, Subcommittee, Workgroup, Secretariat
475
459
  ** Technical Committee Number, Subcommittee Number, Workgroup Number
476
460
  ** Technical Committee Type, Subcommittee Type, Workgroup Type (e.g. JTC)
477
- ** Organization:Name (ISO; other standards organisations, for standards jointly published with ISO)
461
+ ** Organization:Name (ISO; other standards organizations, for standards jointly published with ISO)
478
462
  * ICS: refer https://www.iso.org/publication/PUB100033.html
479
463
  * Status
480
464
  ** Stage, Substage
@@ -484,7 +468,7 @@ The ISO standards use a subset of the generic bibliographic fields specified in
484
468
  * Relations
485
469
  ** Obsoletes, Updates
486
470
 
487
- All FormattedString instances are returned by default as a text/plain string; if required, they are returned as a text/html string.
471
+ All FormattedString instances are returned by default as a text/plain string; if required, they are returned as a text/html string.
488
472
 
489
473
  == Development
490
474