metanorma-standoc 1.3.28 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +8 -7
- data/.github/workflows/ubuntu.yml +14 -11
- data/.github/workflows/windows.yml +8 -8
- data/.gitignore +1 -0
- data/lib/asciidoctor/standoc/base.rb +29 -48
- data/lib/asciidoctor/standoc/biblio.rng +36 -6
- data/lib/asciidoctor/standoc/blocks.rb +32 -96
- data/lib/asciidoctor/standoc/blocks_notes.rb +89 -0
- data/lib/asciidoctor/standoc/cleanup.rb +12 -6
- data/lib/asciidoctor/standoc/cleanup_block.rb +5 -2
- data/lib/asciidoctor/standoc/cleanup_inline.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup_ref.rb +47 -1
- data/lib/asciidoctor/standoc/cleanup_section.rb +8 -125
- data/lib/asciidoctor/standoc/cleanup_terms.rb +134 -0
- data/lib/asciidoctor/standoc/converter.rb +16 -0
- data/lib/asciidoctor/standoc/datamodel/attributes_table_preprocessor.rb +57 -0
- data/lib/asciidoctor/standoc/datamodel/diagram_preprocessor.rb +102 -0
- data/lib/asciidoctor/standoc/datamodel/plantuml_renderer.rb +408 -0
- data/lib/asciidoctor/standoc/inline.rb +11 -6
- data/lib/asciidoctor/standoc/isodoc.rng +444 -1
- data/lib/asciidoctor/standoc/lists.rb +12 -12
- data/lib/asciidoctor/standoc/macros.rb +13 -8
- data/lib/asciidoctor/standoc/macros_yaml2text.rb +44 -21
- data/lib/asciidoctor/standoc/ref.rb +78 -79
- data/lib/asciidoctor/standoc/ref_sect.rb +124 -0
- data/lib/asciidoctor/standoc/reqt.rb +11 -6
- data/lib/asciidoctor/standoc/reqt.rng +23 -0
- data/lib/asciidoctor/standoc/section.rb +2 -46
- data/lib/asciidoctor/standoc/table.rb +3 -2
- data/lib/asciidoctor/standoc/validate.rb +8 -2
- data/lib/asciidoctor/standoc/validate_section.rb +0 -2
- data/lib/asciidoctor/standoc/views/datamodel/model_representation.adoc.erb +30 -0
- data/lib/asciidoctor/standoc/views/datamodel/plantuml_representation.adoc.erb +20 -0
- data/lib/metanorma/standoc/processor.rb +5 -7
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +2 -2
- data/spec/asciidoctor-standoc/blocks_spec.rb +68 -23
- data/spec/asciidoctor-standoc/cleanup_spec.rb +85 -5
- data/spec/asciidoctor-standoc/datamodel/attributes_table_preprocessor_spec.rb +111 -0
- data/spec/asciidoctor-standoc/datamodel/diagram_preprocessor_spec.rb +72 -0
- data/spec/asciidoctor-standoc/inline_spec.rb +7 -3
- data/spec/asciidoctor-standoc/isobib_cache_spec.rb +4 -4
- data/spec/asciidoctor-standoc/lists_spec.rb +7 -5
- data/spec/asciidoctor-standoc/macros_spec.rb +54 -2
- data/spec/asciidoctor-standoc/macros_yaml2text_spec.rb +2 -1
- data/spec/asciidoctor-standoc/refs_dl_spec.rb +4 -2
- data/spec/asciidoctor-standoc/refs_spec.rb +283 -24
- data/spec/asciidoctor-standoc/table_spec.rb +3 -3
- data/spec/asciidoctor-standoc/validate_spec.rb +77 -7
- data/spec/assets/iso123.rxl +107 -0
- data/spec/assets/xref_error.adoc +7 -0
- data/spec/examples/datamodel/address_class_profile.adoc +4 -0
- data/spec/examples/datamodel/address_component_profile.adoc +4 -0
- data/spec/examples/datamodel/blank_definition_profile.adoc +4 -0
- data/spec/examples/datamodel/common_models_diagram.adoc +4 -0
- data/spec/examples/datamodel/models/models/AddressClassProfile.yml +90 -0
- data/spec/examples/datamodel/models/models/AddressComponentProfile.yml +63 -0
- data/spec/examples/datamodel/models/models/AddressComponentSpecification.yml +15 -0
- data/spec/examples/datamodel/models/models/AddressProfile.yml +36 -0
- data/spec/examples/datamodel/models/models/AttributeProfile.yml +32 -0
- data/spec/examples/datamodel/models/models/InterchangeAddressClassProfile.yml +79 -0
- data/spec/examples/datamodel/models/models/Localization copy.yml +23 -0
- data/spec/examples/datamodel/models/models/Localization.yml +23 -0
- data/spec/examples/datamodel/models/models/ProfileCompliantAddress.yml +36 -0
- data/spec/examples/datamodel/models/models/ProfileCompliantAddressComponent.yml +15 -0
- data/spec/examples/datamodel/models/models/Signature.yml +20 -0
- data/spec/examples/datamodel/models/models/SignatureBlankDefinition.yml +20 -0
- data/spec/examples/datamodel/models/models/TextDirectionCode copy.yml +16 -0
- data/spec/examples/datamodel/models/models/TextDirectionCode.yml +16 -0
- data/spec/examples/datamodel/models/models/Validity.yml +14 -0
- data/spec/examples/datamodel/models/models/iso19160-1/Address.yml +22 -0
- data/spec/examples/datamodel/models/models/iso19160-1/AddressComponent.yml +2 -0
- data/spec/examples/datamodel/models/style.uml.inc +37 -0
- data/spec/examples/datamodel/models/views/CommonModels.yml +9 -0
- data/spec/examples/datamodel/models/views/TopDown.yml +62 -0
- data/spec/examples/datamodel/top_down_diagram.adoc +4 -0
- data/spec/fixtures/macros_datamodel/address_class_profile.xml +149 -0
- data/spec/fixtures/macros_datamodel/address_component_profile.xml +71 -0
- data/spec/fixtures/macros_datamodel/blank_definition_profile.xml +51 -0
- data/spec/fixtures/macros_datamodel/common_models_diagram.xml +7 -0
- data/spec/fixtures/macros_datamodel/top_down_diagram.xml +7 -0
- data/spec/metanorma/processor_spec.rb +4 -4
- data/spec/spec_helper.rb +13 -2
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +85 -85
- data/spec/vcr_cassettes/isobib_get_123.yml +19 -198
- data/spec/vcr_cassettes/isobib_get_123_1.yml +361 -0
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +22 -22
- data/spec/vcr_cassettes/isobib_get_124.yml +21 -21
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +10 -10
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +47 -44
- metadata +53 -11
@@ -114,7 +114,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
114
114
|
it "processes complex tables" do
|
115
115
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
116
116
|
#{ASCIIDOC_BLANK_HDR}
|
117
|
-
[cols="<,^,^,^,^",options="header,footer",headerrows=2,alt="An extensive summary, and illustration, of tables",subsequence="A",options="unnumbered",summary="This is an extremely long, convoluted summary",width=70
|
117
|
+
[cols="<,^,^,^,^",options="header,footer",headerrows=2,alt="An extensive summary, and illustration, of tables",subsequence="A",options="unnumbered",summary="This is an extremely long, convoluted summary",width=70%,number="3",keep-with-next=true,keep-lines-together=true]
|
118
118
|
.Maximum _permissible_ mass fraction of defects
|
119
119
|
|===
|
120
120
|
.2+|Defect 4+^| Maximum permissible mass fraction of defects in husked rice +
|
@@ -144,13 +144,13 @@ RSpec.describe Asciidoctor::Standoc do
|
|
144
144
|
INPUT
|
145
145
|
#{BLANK_HDR}
|
146
146
|
<sections>
|
147
|
-
<table id="_" alt="An extensive summary, and illustration, of tables" unnumbered="true" subsequence="A" summary="This is an extremely long, convoluted summary" width="70%">
|
147
|
+
<table id="_" alt="An extensive summary, and illustration, of tables" unnumbered="true" subsequence="A" summary="This is an extremely long, convoluted summary" width="70%" number="3" keep-with-next="true" keep-lines-together="true">
|
148
148
|
<name>Maximum <em>permissible</em> mass fraction of defects</name>
|
149
149
|
<thead>
|
150
150
|
<tr>
|
151
151
|
<th rowspan="2" align="left">Defect</th>
|
152
152
|
<th colspan="4" align="center">Maximum permissible mass fraction of defects in husked rice<br/>
|
153
|
-
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>w</mi><
|
153
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>w</mi><mo>max</mo></msub></math></stem></th>
|
154
154
|
</tr>
|
155
155
|
<tr>
|
156
156
|
<th align="left">in husked rice</th>
|
@@ -3,6 +3,68 @@ require "relaton_iec"
|
|
3
3
|
require "fileutils"
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc do
|
6
|
+
it "generates error file" do
|
7
|
+
FileUtils.rm_f "spec/assets/xref_error.err"
|
8
|
+
Asciidoctor.convert_file "spec/assets/xref_error.adoc", {:attributes=>{"backend"=>"standoc"}, :safe=>0, :header_footer=>true, :requires=>["metanorma-standoc"], :failure_level=>4, :mkdirs=>true, :to_file=>nil}
|
9
|
+
expect(File.exist?("spec/assets/xref_error.err")).to be true
|
10
|
+
end
|
11
|
+
|
12
|
+
it "warns about missing fields in asciibib" do
|
13
|
+
FileUtils.rm_f "test.err"
|
14
|
+
Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)
|
15
|
+
#{VALIDATING_BLANK_HDR}
|
16
|
+
|
17
|
+
[bibliography]
|
18
|
+
== Normative References
|
19
|
+
|
20
|
+
[%bibitem]
|
21
|
+
=== Standard
|
22
|
+
id:: iso123
|
23
|
+
type:: standard
|
24
|
+
contributor::
|
25
|
+
role::: publisher
|
26
|
+
organization:::
|
27
|
+
name:::: ISO
|
28
|
+
contributor::
|
29
|
+
role::: author
|
30
|
+
person:::
|
31
|
+
name::::
|
32
|
+
+
|
33
|
+
--
|
34
|
+
completename::
|
35
|
+
language::: en
|
36
|
+
content::: Fred
|
37
|
+
--
|
38
|
+
contributor::
|
39
|
+
role::: author
|
40
|
+
person:::
|
41
|
+
name::::
|
42
|
+
completename::::: Jack
|
43
|
+
|
44
|
+
INPUT
|
45
|
+
errf = File.read("test.err")
|
46
|
+
expect(errf).to include "Reference iso123 is missing a document identifier (docid)"
|
47
|
+
end
|
48
|
+
|
49
|
+
it "warns about missing fields in asciibib" do
|
50
|
+
FileUtils.rm_f "test.err"
|
51
|
+
Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)
|
52
|
+
#{VALIDATING_BLANK_HDR}
|
53
|
+
|
54
|
+
[bibliography]
|
55
|
+
== Normative References
|
56
|
+
|
57
|
+
[%bibitem]
|
58
|
+
=== Standard
|
59
|
+
type:: standard
|
60
|
+
contributor::
|
61
|
+
role::: publisher
|
62
|
+
organization:::
|
63
|
+
name:::: ISO
|
64
|
+
INPUT
|
65
|
+
errf = File.read("test.err")
|
66
|
+
expect(errf).to include "The following reference is missing an anchor"
|
67
|
+
end
|
6
68
|
it "warns about malformed LaTeX" do
|
7
69
|
FileUtils.rm_f "test.err"
|
8
70
|
Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)
|
@@ -220,9 +282,11 @@ INPUT
|
|
220
282
|
end
|
221
283
|
=end
|
222
284
|
|
223
|
-
it "warns if id used twice" do
|
285
|
+
it "warns and aborts if id used twice" do
|
286
|
+
FileUtils.rm_f "test.xml"
|
224
287
|
FileUtils.rm_f "test.err"
|
225
|
-
|
288
|
+
begin
|
289
|
+
expect { Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true) }.to raise_error(SystemExit)
|
226
290
|
= Document title
|
227
291
|
Author
|
228
292
|
:docfile: test.adoc
|
@@ -234,7 +298,10 @@ it "warns if id used twice" do
|
|
234
298
|
[[abc]]
|
235
299
|
== Clause 2
|
236
300
|
INPUT
|
301
|
+
rescue SystemExit
|
302
|
+
end
|
237
303
|
expect(File.read("test.err")).to include "Anchor abc has already been used at line"
|
304
|
+
expect(File.exist?("test.xml")).to be false
|
238
305
|
end
|
239
306
|
|
240
307
|
it "err file succesfully created for docfile path" do
|
@@ -245,14 +312,17 @@ it "err file succesfully created for docfile path" do
|
|
245
312
|
Author
|
246
313
|
:docfile: test#{File::ALT_SEPARATOR || File::SEPARATOR}test.adoc
|
247
314
|
:nodoc:
|
248
|
-
|
249
|
-
[[abc]]
|
315
|
+
|
250
316
|
== Clause 1
|
251
317
|
|
252
|
-
|
253
|
-
|
318
|
+
Paragraph
|
319
|
+
|
320
|
+
=== Clause 1.1
|
321
|
+
|
322
|
+
Subclause
|
254
323
|
INPUT
|
255
|
-
|
324
|
+
|
325
|
+
expect(File.read("test/test.err")).to include "Hanging paragraph in clause"
|
256
326
|
end
|
257
327
|
|
258
328
|
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
<bibdata id='iso123' xmlns='http://www.example.com' type='standard'>
|
2
|
+
<fetched>2020-06-12</fetched>
|
3
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
4
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
5
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
|
6
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
7
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
8
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc – Échantillonnage</title>
|
9
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
10
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
11
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
12
|
+
<docidentifier type='ISO'>ISO 123 (all parts)</docidentifier>
|
13
|
+
<docnumber>123</docnumber>
|
14
|
+
<date type='published'>
|
15
|
+
<on>2001</on>
|
16
|
+
</date>
|
17
|
+
<contributor>
|
18
|
+
<role type='publisher'/>
|
19
|
+
<organization>
|
20
|
+
<name>International Organization for Standardization</name>
|
21
|
+
<abbreviation>ISO</abbreviation>
|
22
|
+
<uri>www.iso.org</uri>
|
23
|
+
</organization>
|
24
|
+
</contributor>
|
25
|
+
<edition>3</edition>
|
26
|
+
<language>en</language>
|
27
|
+
<language>fr</language>
|
28
|
+
<script>Latn</script>
|
29
|
+
<status>
|
30
|
+
<stage>90</stage>
|
31
|
+
<substage>93</substage>
|
32
|
+
</status>
|
33
|
+
<copyright>
|
34
|
+
<from>2001</from>
|
35
|
+
<owner>
|
36
|
+
<organization>
|
37
|
+
<name>ISO</name>
|
38
|
+
</organization>
|
39
|
+
</owner>
|
40
|
+
</copyright>
|
41
|
+
<relation type='obsoletes'>
|
42
|
+
<bibitem type='standard'>
|
43
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
44
|
+
</bibitem>
|
45
|
+
</relation>
|
46
|
+
<relation type='instance'>
|
47
|
+
<bibitem type='standard'>
|
48
|
+
<fetched>2020-06-12</fetched>
|
49
|
+
<title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
|
50
|
+
<title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
|
51
|
+
<title type='main' format='text/plain' language='en' script='Latn'>Rubber latex – Sampling</title>
|
52
|
+
<title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
|
53
|
+
<title type='title-main' format='text/plain' language='fr' script='Latn'>Échantillonnage</title>
|
54
|
+
<title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc – Échantillonnage</title>
|
55
|
+
<uri type='src'>https://www.iso.org/standard/23281.html</uri>
|
56
|
+
<uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
57
|
+
<uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
58
|
+
<docidentifier type='ISO'>ISO 123:2001</docidentifier>
|
59
|
+
<docnumber>123</docnumber>
|
60
|
+
<date type='published'>
|
61
|
+
<on>2001</on>
|
62
|
+
</date>
|
63
|
+
<contributor>
|
64
|
+
<role type='publisher'/>
|
65
|
+
<organization>
|
66
|
+
<name>International Organization for Standardization</name>
|
67
|
+
<abbreviation>ISO</abbreviation>
|
68
|
+
<uri>www.iso.org</uri>
|
69
|
+
</organization>
|
70
|
+
</contributor>
|
71
|
+
<edition>3</edition>
|
72
|
+
<language>en</language>
|
73
|
+
<language>fr</language>
|
74
|
+
<script>Latn</script>
|
75
|
+
<status>
|
76
|
+
<stage>90</stage>
|
77
|
+
<substage>93</substage>
|
78
|
+
</status>
|
79
|
+
<copyright>
|
80
|
+
<from>2001</from>
|
81
|
+
<owner>
|
82
|
+
<organization>
|
83
|
+
<name>ISO</name>
|
84
|
+
</organization>
|
85
|
+
</owner>
|
86
|
+
</copyright>
|
87
|
+
<relation type='obsoletes'>
|
88
|
+
<bibitem type='standard'>
|
89
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
90
|
+
</bibitem>
|
91
|
+
</relation>
|
92
|
+
<place>Geneva</place>
|
93
|
+
</bibitem>
|
94
|
+
</relation>
|
95
|
+
<relation type='instance'>
|
96
|
+
<bibitem type='standard'>
|
97
|
+
<formattedref format='text/plain'>ISO 123:1985</formattedref>
|
98
|
+
</bibitem>
|
99
|
+
</relation>
|
100
|
+
<relation type='instance'>
|
101
|
+
<bibitem type='standard'>
|
102
|
+
<formattedref format='text/plain'>ISO 123:1974</formattedref>
|
103
|
+
</bibitem>
|
104
|
+
</relation>
|
105
|
+
<place>Geneva</place>
|
106
|
+
</bibdata>
|
107
|
+
|
@@ -0,0 +1,90 @@
|
|
1
|
+
modelType: class
|
2
|
+
# TODO
|
3
|
+
definition: |
|
4
|
+
An `AddressClassProfile` represents a profile of a `ProfileCompliantAddress`.
|
5
|
+
It corresponds to the concept of an `AddressClass` originally
|
6
|
+
expressed in <<ISO19160-1>> as a referenced codelist.
|
7
|
+
|
8
|
+
It represents additional attributes and restrictions to the
|
9
|
+
`ProfileCompliantAddress` model. It also represents metadata for the use of
|
10
|
+
the profile.
|
11
|
+
|
12
|
+
A single profile can include and support multiple types of
|
13
|
+
address formats, such as a numbered street address and a
|
14
|
+
"`PO Box`" address simultaneously. Each of these address formats
|
15
|
+
is represented as an interchange address class.
|
16
|
+
|
17
|
+
[example]
|
18
|
+
--
|
19
|
+
The US Numbered Thoroughfare Address with this syntax can be
|
20
|
+
represented as an address class profile:
|
21
|
+
|
22
|
+
*{sp}{ Complete Landmark Name or Complete Place Name } +
|
23
|
+
*{sp}{ Complete Address Number * } +
|
24
|
+
*{sp}{ Complete Street Name * } +
|
25
|
+
*{sp}{ Complete Subaddress } +
|
26
|
+
*{sp}{ Complete Place Name * } +
|
27
|
+
*{sp}{ State Name * } +
|
28
|
+
*{sp}{ Zip Code } +
|
29
|
+
*{sp}{ Zip Plus 4 } +
|
30
|
+
*{sp}{ Country Name }
|
31
|
+
--
|
32
|
+
attributes:
|
33
|
+
id:
|
34
|
+
definition: Unique identifier of this AddressClassProfile.
|
35
|
+
type: CharacterString
|
36
|
+
type:
|
37
|
+
definition: Intended usage of this profile.
|
38
|
+
type: CharacterString
|
39
|
+
description:
|
40
|
+
definition: Textual description of this profile.
|
41
|
+
type: CharacterString
|
42
|
+
localization:
|
43
|
+
definition: The language and script used within this profile.
|
44
|
+
type: Localization
|
45
|
+
signature:
|
46
|
+
definition: The digital signature to verify the integrity of this profile, and the identity of the publishing authority.
|
47
|
+
type: Signature
|
48
|
+
cardinality:
|
49
|
+
min: 0
|
50
|
+
max: 1
|
51
|
+
areaApplicability:
|
52
|
+
definition: The geographic representation of which this AddressClassProfile applies to. Overlapping geographic areas are allowed across different profiles.
|
53
|
+
type: iso19115MD_SpatialRepresentation
|
54
|
+
cardinality:
|
55
|
+
min: 0
|
56
|
+
max: "*"
|
57
|
+
timeToLive:
|
58
|
+
definition: The maximum time interval between refreshing of this profile via an authoritative source, in seconds.
|
59
|
+
type: Integer
|
60
|
+
validity:
|
61
|
+
definition: The period of date and time that this profile should be considered as valid.
|
62
|
+
type: Validity
|
63
|
+
relations:
|
64
|
+
- target: AttributeProfile
|
65
|
+
relationship:
|
66
|
+
source:
|
67
|
+
type: aggregation
|
68
|
+
attribute:
|
69
|
+
addressClassProfile:
|
70
|
+
target:
|
71
|
+
type: direct
|
72
|
+
attribute:
|
73
|
+
attributeProfile:
|
74
|
+
cardinality:
|
75
|
+
min: 0
|
76
|
+
max: '*'
|
77
|
+
|
78
|
+
- target: ProfileCompliantAddress
|
79
|
+
relationship:
|
80
|
+
source:
|
81
|
+
attribute:
|
82
|
+
profile:
|
83
|
+
cardinality:
|
84
|
+
min: 1
|
85
|
+
max: 1
|
86
|
+
target:
|
87
|
+
type: direct
|
88
|
+
action:
|
89
|
+
verb: compliesWith
|
90
|
+
direction: source
|
@@ -0,0 +1,63 @@
|
|
1
|
+
name: AddressComponentProfile
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
An `AddressComponentProfile` represents a profile of a `ProfileCompliantAddressComponent`,
|
5
|
+
which is extended from the `AddressComponent` model defined in <<ISO19160-1>>.
|
6
|
+
|
7
|
+
It represents additional attributes and restrictions to the `Address` model
|
8
|
+
of a `ProfileCompliantAddress`. It also represents metadata for the use of
|
9
|
+
the profile.
|
10
|
+
attributes:
|
11
|
+
key:
|
12
|
+
definition: An identifier of this `AddressComponentProfile`, shall be unique within the `AddressProfile`.
|
13
|
+
type: CharacterString
|
14
|
+
description:
|
15
|
+
definition: Textual description of this component.
|
16
|
+
type: CharacterString
|
17
|
+
example:
|
18
|
+
definition: A textual example to demonstrate the correct use of this component.
|
19
|
+
type: CharacterString
|
20
|
+
cardinality:
|
21
|
+
min: 0
|
22
|
+
max: 1
|
23
|
+
relations:
|
24
|
+
- target: AddressClassProfile
|
25
|
+
relationship:
|
26
|
+
target:
|
27
|
+
type: aggregation
|
28
|
+
attribute:
|
29
|
+
componentProfile:
|
30
|
+
cardinality:
|
31
|
+
min: 0
|
32
|
+
max: "*"
|
33
|
+
association: AddressComponentSpecification
|
34
|
+
action:
|
35
|
+
verb: uses
|
36
|
+
direction: source
|
37
|
+
|
38
|
+
- target: AttributeProfile
|
39
|
+
relationship:
|
40
|
+
source:
|
41
|
+
type: aggregation
|
42
|
+
attribute:
|
43
|
+
addressClassProfile:
|
44
|
+
target:
|
45
|
+
type: direct
|
46
|
+
attribute:
|
47
|
+
attributeProfile:
|
48
|
+
cardinality:
|
49
|
+
min: 0
|
50
|
+
max: '*'
|
51
|
+
|
52
|
+
- target: ProfileCompliantAddressComponent
|
53
|
+
relationship:
|
54
|
+
target:
|
55
|
+
type: direct
|
56
|
+
attribute:
|
57
|
+
profile:
|
58
|
+
cardinality:
|
59
|
+
min: 1
|
60
|
+
max: 1
|
61
|
+
action:
|
62
|
+
verb: compliesWith
|
63
|
+
direction: source
|
@@ -0,0 +1,15 @@
|
|
1
|
+
name: AddressComponentSpecification
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
An `AddressComponentSpecification` specifies the cardinalities between a
|
5
|
+
`ProfileCompliantAddress` and `ProfileCompliantAddressComponents`.
|
6
|
+
|
7
|
+
A `ProfileComplinatAddress` MUST conform to this
|
8
|
+
`AddressComponentSpecification` to specifies its components.
|
9
|
+
attributes:
|
10
|
+
maxCardinality:
|
11
|
+
definition: The maximum number of instances of the specific `ProfileCompliantAddressComponent` of a `ProfileCompliantAddress`.
|
12
|
+
type: Integer
|
13
|
+
minCardinality:
|
14
|
+
definition: The minimum number of instances of the specific `ProfileCompliantAddressComponent` of a `ProfileCompliantAddress`.
|
15
|
+
type: Integer
|