newsmlg2 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/workflows/docs.yml +63 -0
- data/.github/workflows/links.yml +99 -0
- data/.github/workflows/performance.yml +25 -0
- data/.github/workflows/rake.yml +19 -0
- data/.github/workflows/release.yml +34 -0
- data/.gitignore +17 -0
- data/.rubocop.yml +51 -0
- data/CHANGELOG.md +31 -0
- data/CLAUDE.md +77 -0
- data/Gemfile +15 -0
- data/LICENSE +24 -0
- data/README.adoc +135 -0
- data/Rakefile +15 -0
- data/docs/Gemfile +6 -0
- data/docs/_config.yml +4 -0
- data/docs/index.md +15 -0
- data/docs/lychee.toml +4 -0
- data/docs/usage.md +36 -0
- data/lib/newsmlg2/base/administrative_metadata_group.rb +40 -0
- data/lib/newsmlg2/base/arbitrary_value_attributes.rb +13 -0
- data/lib/newsmlg2/base/authority_attributes.rb +14 -0
- data/lib/newsmlg2/base/common_power_attributes.rb +17 -0
- data/lib/newsmlg2/base/concept_definition_group.rb +25 -0
- data/lib/newsmlg2/base/concept_relationships_group.rb +22 -0
- data/lib/newsmlg2/base/confirmation_status_attributes.rb +13 -0
- data/lib/newsmlg2/base/deprecated_link_attributes.rb +14 -0
- data/lib/newsmlg2/base/descriptive_metadata_group.rb +54 -0
- data/lib/newsmlg2/base/entity_details_group.rb +28 -0
- data/lib/newsmlg2/base/flex_attributes.rb +13 -0
- data/lib/newsmlg2/base/i18n_attributes.rb +14 -0
- data/lib/newsmlg2/base/item_management_group.rb +59 -0
- data/lib/newsmlg2/base/media_content_characteristics1.rb +22 -0
- data/lib/newsmlg2/base/news_content_attributes.rb +18 -0
- data/lib/newsmlg2/base/news_content_characteristics.rb +30 -0
- data/lib/newsmlg2/base/news_content_type_attributes.rb +17 -0
- data/lib/newsmlg2/base/persistent_edit_attributes.rb +13 -0
- data/lib/newsmlg2/base/qualifying_attributes.rb +13 -0
- data/lib/newsmlg2/base/quantify_attributes.rb +13 -0
- data/lib/newsmlg2/base/ranking_attributes.rb +13 -0
- data/lib/newsmlg2/base/recurrence_rule_attributes.rb +18 -0
- data/lib/newsmlg2/base/target_resource_attributes.rb +20 -0
- data/lib/newsmlg2/base/time_validity_attributes.rb +13 -0
- data/lib/newsmlg2/base.rb +35 -0
- data/lib/newsmlg2/builder/node.rb +125 -0
- data/lib/newsmlg2/builder.rb +69 -0
- data/lib/newsmlg2/catalog.rb +38 -0
- data/lib/newsmlg2/catalog_cache.rb +49 -0
- data/lib/newsmlg2/catalog_ref.rb +13 -0
- data/lib/newsmlg2/catalog_store.rb +66 -0
- data/lib/newsmlg2/catalogs/catalog.IPTC-G2-Standards_32.xml +620 -0
- data/lib/newsmlg2/catalogs/catalog.IPTC-G2-Standards_33.xml +625 -0
- data/lib/newsmlg2/catalogs/catalog.IPTC-G2-Standards_34.xml +626 -0
- data/lib/newsmlg2/catalogs/catalog.IPTC-G2-Standards_35.xml +635 -0
- data/lib/newsmlg2/catalogs/catalog.IPTC-G2-Standards_36.xml +644 -0
- data/lib/newsmlg2/catalogs/catalog.IPTC-G2-Standards_37.xml +661 -0
- data/lib/newsmlg2/catalogs/catalog.IPTC-G2-Standards_38.xml +674 -0
- data/lib/newsmlg2/catalogs/catalog.IPTC-G2-Standards_39.xml +682 -0
- data/lib/newsmlg2/catalogs/catalog.IPTC-G2-Standards_40.xml +724 -0
- data/lib/newsmlg2/catalogs/catalog.IPTC-G2-Standards_41.xml +729 -0
- data/lib/newsmlg2/configuration.rb +61 -0
- data/lib/newsmlg2/document.rb +123 -0
- data/lib/newsmlg2/errors.rb +18 -0
- data/lib/newsmlg2/i18n.rb +20 -0
- data/lib/newsmlg2/items/any_item.rb +180 -0
- data/lib/newsmlg2/items/catalog_item.rb +24 -0
- data/lib/newsmlg2/items/concept_item.rb +23 -0
- data/lib/newsmlg2/items/content_meta.rb +73 -0
- data/lib/newsmlg2/items/item_ref.rb +13 -0
- data/lib/newsmlg2/items/knowledge_item.rb +68 -0
- data/lib/newsmlg2/items/news_item.rb +130 -0
- data/lib/newsmlg2/items/news_message.rb +142 -0
- data/lib/newsmlg2/items/package_item.rb +82 -0
- data/lib/newsmlg2/items/part_meta.rb +68 -0
- data/lib/newsmlg2/items/planning_item.rb +160 -0
- data/lib/newsmlg2/nar_model.rb +76 -0
- data/lib/newsmlg2/nar_namespace.rb +10 -0
- data/lib/newsmlg2/nitf_namespace.rb +9 -0
- data/lib/newsmlg2/same_as_scheme.rb +15 -0
- data/lib/newsmlg2/scheme.rb +30 -0
- data/lib/newsmlg2/types/approximate_date_time_prop_type.rb +14 -0
- data/lib/newsmlg2/types/bag.rb +16 -0
- data/lib/newsmlg2/types/block_types.rb +62 -0
- data/lib/newsmlg2/types/concept.rb +36 -0
- data/lib/newsmlg2/types/concept_id.rb +17 -0
- data/lib/newsmlg2/types/concept_name_type.rb +17 -0
- data/lib/newsmlg2/types/content_meta_types.rb +152 -0
- data/lib/newsmlg2/types/date_opt_time_prop_type.rb +12 -0
- data/lib/newsmlg2/types/date_time_or_null_prop_type.rb +12 -0
- data/lib/newsmlg2/types/date_time_prop_type.rb +12 -0
- data/lib/newsmlg2/types/event_details.rb +213 -0
- data/lib/newsmlg2/types/ext_property.rb +21 -0
- data/lib/newsmlg2/types/facet.rb +17 -0
- data/lib/newsmlg2/types/flex1_prop_type.rb +32 -0
- data/lib/newsmlg2/types/flex_location_prop_type.rb +43 -0
- data/lib/newsmlg2/types/flex_party_prop_type.rb +49 -0
- data/lib/newsmlg2/types/flex_prop2_type.rb +26 -0
- data/lib/newsmlg2/types/flex_prop_type.rb +17 -0
- data/lib/newsmlg2/types/geo.rb +92 -0
- data/lib/newsmlg2/types/hierarchy_info.rb +17 -0
- data/lib/newsmlg2/types/ids.rb +28 -0
- data/lib/newsmlg2/types/inline_types.rb +56 -0
- data/lib/newsmlg2/types/intl_string_type.rb +17 -0
- data/lib/newsmlg2/types/intl_string_type2.rb +14 -0
- data/lib/newsmlg2/types/item_management.rb +74 -0
- data/lib/newsmlg2/types/link.rb +40 -0
- data/lib/newsmlg2/types/object_details.rb +40 -0
- data/lib/newsmlg2/types/party_details.rb +258 -0
- data/lib/newsmlg2/types/poi.rb +79 -0
- data/lib/newsmlg2/types/qcode_prop_type.rb +12 -0
- data/lib/newsmlg2/types/qual_prop_type.rb +23 -0
- data/lib/newsmlg2/types/qual_rel_prop_type.rb +18 -0
- data/lib/newsmlg2/types/related_concept.rb +71 -0
- data/lib/newsmlg2/types/rights.rb +84 -0
- data/lib/newsmlg2/types/ruby_annotation.rb +55 -0
- data/lib/newsmlg2/types/same_as.rb +17 -0
- data/lib/newsmlg2/types/truncated_date_time_prop_type.rb +13 -0
- data/lib/newsmlg2/types/versioned_string_type.rb +10 -0
- data/lib/newsmlg2/types/xml_base.rb +12 -0
- data/lib/newsmlg2/types/xml_lang.rb +12 -0
- data/lib/newsmlg2/types.rb +166 -0
- data/lib/newsmlg2/utils.rb +42 -0
- data/lib/newsmlg2/version.rb +5 -0
- data/lib/newsmlg2.rb +181 -0
- data/lib/tasks/performance.rake +72 -0
- data/newsmlg2.gemspec +34 -0
- metadata +185 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Newsmlg2
|
|
4
|
+
module Types
|
|
5
|
+
# The date the person was born.
|
|
6
|
+
class Born < TruncatedDateTimePropType
|
|
7
|
+
xml do
|
|
8
|
+
element 'born'
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# The date the person died.
|
|
13
|
+
class Died < TruncatedDateTimePropType
|
|
14
|
+
xml do
|
|
15
|
+
element 'died'
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# The type for an electronic address.
|
|
20
|
+
class ElectronicAddressType < Newsmlg2::NarModel
|
|
21
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
22
|
+
|
|
23
|
+
xml_attributes :role, :roleuri
|
|
24
|
+
|
|
25
|
+
xml_content
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# The type for an electronic address with a technical qualifier.
|
|
29
|
+
class ElectronicAddressTechType < Newsmlg2::NarModel
|
|
30
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
31
|
+
|
|
32
|
+
xml_attributes :role, :roleuri, :tech, :techuri
|
|
33
|
+
|
|
34
|
+
xml_content
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# An email address.
|
|
38
|
+
class Email < ElectronicAddressType
|
|
39
|
+
xml do
|
|
40
|
+
element 'email'
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# An instant messaging address.
|
|
45
|
+
class Im < ElectronicAddressTechType
|
|
46
|
+
xml do
|
|
47
|
+
element 'im'
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# A phone number, preferred in an international format.
|
|
52
|
+
class Phone < ElectronicAddressTechType
|
|
53
|
+
xml do
|
|
54
|
+
element 'phone'
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# A fax number, preferred in an international format.
|
|
59
|
+
class Fax < ElectronicAddressType
|
|
60
|
+
xml do
|
|
61
|
+
element 'fax'
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# A web address.
|
|
66
|
+
class Web < Newsmlg2::NarModel
|
|
67
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
68
|
+
|
|
69
|
+
xml_attributes :role, :roleuri
|
|
70
|
+
|
|
71
|
+
xml_content
|
|
72
|
+
|
|
73
|
+
xml do
|
|
74
|
+
element 'web'
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# A line of address information.
|
|
79
|
+
class AddressLine < IntlStringType
|
|
80
|
+
xml_attributes :role, :roleuri
|
|
81
|
+
|
|
82
|
+
xml do
|
|
83
|
+
element 'line'
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# A subdivision of a country part of the address.
|
|
88
|
+
class Area < Flex1RolePropType
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# A postal code part of the address.
|
|
92
|
+
class PostalCode < IntlStringType
|
|
93
|
+
xml do
|
|
94
|
+
element 'postalCode'
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# A country part of the address.
|
|
99
|
+
class Country < Flex1PropType
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# A city/town/village etc. part of the address.
|
|
103
|
+
class Locality < Flex1RolePropType
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# A world region part of an address.
|
|
107
|
+
class WorldRegion < Flex1PropType
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# A postal address for the location of a Point Of Interest.
|
|
111
|
+
class Address < Newsmlg2::NarModel
|
|
112
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
113
|
+
|
|
114
|
+
xml_attributes :role, :roleuri
|
|
115
|
+
|
|
116
|
+
xml_element :lines, xml: 'line',
|
|
117
|
+
type: Newsmlg2::Types::AddressLine, collection: true
|
|
118
|
+
xml_element :world_region, xml: 'worldRegion',
|
|
119
|
+
type: Newsmlg2::Types::WorldRegion
|
|
120
|
+
xml_element :localities, xml: 'locality',
|
|
121
|
+
type: Newsmlg2::Types::Locality, collection: true
|
|
122
|
+
xml_element :areas, xml: 'area',
|
|
123
|
+
type: Newsmlg2::Types::Area, collection: true
|
|
124
|
+
xml_element :country, xml: 'country',
|
|
125
|
+
type: Newsmlg2::Types::Country
|
|
126
|
+
xml_element :postal_code, xml: 'postalCode',
|
|
127
|
+
type: Newsmlg2::Types::PostalCode
|
|
128
|
+
|
|
129
|
+
xml do
|
|
130
|
+
element 'address'
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# The type for information to get in contact with a party.
|
|
135
|
+
class ContactInfoType < Newsmlg2::NarModel
|
|
136
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
137
|
+
|
|
138
|
+
xml_attributes :role, :roleuri
|
|
139
|
+
|
|
140
|
+
xml_element :emails, xml: 'email',
|
|
141
|
+
type: Newsmlg2::Types::Email, collection: true
|
|
142
|
+
xml_element :ims, xml: 'im',
|
|
143
|
+
type: Newsmlg2::Types::Im, collection: true
|
|
144
|
+
xml_element :phones, xml: 'phone',
|
|
145
|
+
type: Newsmlg2::Types::Phone, collection: true
|
|
146
|
+
xml_element :faxes, xml: 'fax',
|
|
147
|
+
type: Newsmlg2::Types::Fax, collection: true
|
|
148
|
+
xml_element :webs, xml: 'web',
|
|
149
|
+
type: Newsmlg2::Types::Web, collection: true
|
|
150
|
+
xml_element :addresses, xml: 'address',
|
|
151
|
+
type: Newsmlg2::Types::Address, collection: true
|
|
152
|
+
xml_element :notes, xml: 'note',
|
|
153
|
+
type: Newsmlg2::Types::Note, collection: true
|
|
154
|
+
|
|
155
|
+
xml do
|
|
156
|
+
element 'contactInfo'
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# The date the organisation was founded/established.
|
|
161
|
+
class OrganisationFounded < TruncatedDateTimePropType
|
|
162
|
+
xml do
|
|
163
|
+
element 'founded'
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# The date the organisation was dissolved.
|
|
168
|
+
class OrganisationDissolved < TruncatedDateTimePropType
|
|
169
|
+
xml do
|
|
170
|
+
element 'dissolved'
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# A place where the organisation is located.
|
|
175
|
+
class OrganisationLocation < FlexLocationPropType
|
|
176
|
+
xml do
|
|
177
|
+
element 'location'
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# A financial instrument which is related to a company.
|
|
182
|
+
class HasInstrument < Newsmlg2::NarModel
|
|
183
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
184
|
+
|
|
185
|
+
xml_attributes(
|
|
186
|
+
:symbol, :symbolsrc, :symbolsrcuri, :market, :marketuri,
|
|
187
|
+
:marketlabel, :marketlabelsrc, :marketlabelsrcuri,
|
|
188
|
+
:type, :typeuri, :rank
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
xml do
|
|
192
|
+
element 'hasInstrument'
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# A group of properties specific to an organisation.
|
|
197
|
+
class OrganisationDetails < Newsmlg2::NarModel
|
|
198
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
199
|
+
|
|
200
|
+
xml_element :founded, xml: 'founded',
|
|
201
|
+
type: Newsmlg2::Types::OrganisationFounded
|
|
202
|
+
xml_element :dissolved, xml: 'dissolved',
|
|
203
|
+
type: Newsmlg2::Types::OrganisationDissolved
|
|
204
|
+
xml_element :locations, xml: 'location',
|
|
205
|
+
type: Newsmlg2::Types::OrganisationLocation, collection: true
|
|
206
|
+
xml_element :contact_infos, xml: 'contactInfo',
|
|
207
|
+
type: Newsmlg2::Types::ContactInfoType, collection: true
|
|
208
|
+
xml_element :has_instruments, xml: 'hasInstrument',
|
|
209
|
+
type: Newsmlg2::Types::HasInstrument, collection: true
|
|
210
|
+
|
|
211
|
+
xml do
|
|
212
|
+
element 'organisationDetails'
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# An affiliation of a person or an organisation with an organisation.
|
|
217
|
+
# Composed (rather than subclassing a flex organisation type) so the
|
|
218
|
+
# flex prop types and the detail types never reference each other's
|
|
219
|
+
# class bodies. python-newsmlg2 models this as two identical classes
|
|
220
|
+
# (PersonAffiliationType, OrganisationAffiliationType).
|
|
221
|
+
class Affiliation < Newsmlg2::NarModel
|
|
222
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
223
|
+
include Newsmlg2::Base::QualifyingAttributes
|
|
224
|
+
include Newsmlg2::Base::I18NAttributes
|
|
225
|
+
include Newsmlg2::Base::TimeValidityAttributes
|
|
226
|
+
include Newsmlg2::Base::ConceptDefinitionGroup
|
|
227
|
+
include Newsmlg2::Base::ConceptRelationshipsGroup
|
|
228
|
+
|
|
229
|
+
xml_element :organisation_details, xml: 'organisationDetails',
|
|
230
|
+
type: Newsmlg2::Types::OrganisationDetails
|
|
231
|
+
|
|
232
|
+
xml do
|
|
233
|
+
element 'affiliation'
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
class OrganisationDetails
|
|
238
|
+
xml_element :affiliations, xml: 'affiliation',
|
|
239
|
+
type: Newsmlg2::Types::Affiliation, collection: true
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# A set of properties specific to a person.
|
|
243
|
+
class PersonDetails < Newsmlg2::NarModel
|
|
244
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
245
|
+
|
|
246
|
+
xml_element :born, xml: 'born', type: Newsmlg2::Types::Born
|
|
247
|
+
xml_element :died, xml: 'died', type: Newsmlg2::Types::Died
|
|
248
|
+
xml_element :affiliations, xml: 'affiliation',
|
|
249
|
+
type: Newsmlg2::Types::Affiliation, collection: true
|
|
250
|
+
xml_element :contact_infos, xml: 'contactInfo',
|
|
251
|
+
type: Newsmlg2::Types::ContactInfoType, collection: true
|
|
252
|
+
|
|
253
|
+
xml do
|
|
254
|
+
element 'personDetails'
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Newsmlg2
|
|
4
|
+
module Types
|
|
5
|
+
# Opening hours of a point of interest, in natural language.
|
|
6
|
+
class OpenHours < Label1Type
|
|
7
|
+
xml do
|
|
8
|
+
element 'openHours'
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Total capacity of a point of interest, in natural language.
|
|
13
|
+
class Capacity < Label1Type
|
|
14
|
+
xml do
|
|
15
|
+
element 'capacity'
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Ways to access the place of the point of interest, including
|
|
20
|
+
# directions.
|
|
21
|
+
class Access < BlockType
|
|
22
|
+
xml do
|
|
23
|
+
element 'access'
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Detailed information about the precise location of the point of
|
|
28
|
+
# interest.
|
|
29
|
+
class Details < BlockType
|
|
30
|
+
xml do
|
|
31
|
+
element 'details'
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# The date (and optionally the time) on which this Point of Interest was
|
|
36
|
+
# created.
|
|
37
|
+
class POICreated < TruncatedDateTimePropType
|
|
38
|
+
xml do
|
|
39
|
+
element 'created'
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# The date (and optionally the time) on which this Point of Interest
|
|
44
|
+
# ceased to exist.
|
|
45
|
+
class POICeasedToExist < TruncatedDateTimePropType
|
|
46
|
+
xml do
|
|
47
|
+
element 'ceasedToExist'
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# A group of properties specific to a point of interest.
|
|
52
|
+
class POIDetails < Newsmlg2::NarModel
|
|
53
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
54
|
+
|
|
55
|
+
xml_element :position, xml: 'position',
|
|
56
|
+
type: Newsmlg2::Types::Position
|
|
57
|
+
xml_element :address, xml: 'address',
|
|
58
|
+
type: Newsmlg2::Types::Address
|
|
59
|
+
xml_element :open_hours, xml: 'openHours',
|
|
60
|
+
type: Newsmlg2::Types::OpenHours
|
|
61
|
+
xml_element :capacity, xml: 'capacity',
|
|
62
|
+
type: Newsmlg2::Types::Capacity
|
|
63
|
+
xml_element :contact_infos, xml: 'contactInfo',
|
|
64
|
+
type: Newsmlg2::Types::ContactInfoType, collection: true
|
|
65
|
+
xml_element :accesses, xml: 'access',
|
|
66
|
+
type: Newsmlg2::Types::Access, collection: true
|
|
67
|
+
xml_element :details, xml: 'details',
|
|
68
|
+
type: Newsmlg2::Types::Details, collection: true
|
|
69
|
+
xml_element :created, xml: 'created',
|
|
70
|
+
type: Newsmlg2::Types::POICreated
|
|
71
|
+
xml_element :ceased_to_exist, xml: 'ceasedToExist',
|
|
72
|
+
type: Newsmlg2::Types::POICeasedToExist
|
|
73
|
+
|
|
74
|
+
xml do
|
|
75
|
+
element 'POIDetails'
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Newsmlg2
|
|
4
|
+
module Types
|
|
5
|
+
# Property with a QCode value in its qcode attribute.
|
|
6
|
+
class QCodePropType < Newsmlg2::NarModel
|
|
7
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
8
|
+
|
|
9
|
+
xml_attributes :qcode, :uri
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Newsmlg2
|
|
4
|
+
module Types
|
|
5
|
+
# A property with a QCode value in its qcode attribute, a URI in its uri
|
|
6
|
+
# attribute and optional names.
|
|
7
|
+
class QualPropType < QCodePropType
|
|
8
|
+
include Newsmlg2::Base::I18NAttributes
|
|
9
|
+
|
|
10
|
+
xml_element :names, xml: 'name',
|
|
11
|
+
type: Newsmlg2::Types::ConceptNameType, collection: true
|
|
12
|
+
xml_element :hierarchy_infos, xml: 'hierarchyInfo',
|
|
13
|
+
type: Newsmlg2::Types::HierarchyInfo, collection: true
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# The nature of a concept (python-newsmlg2 calls this class "Type").
|
|
17
|
+
class ConceptType < QualPropType
|
|
18
|
+
xml do
|
|
19
|
+
element 'type'
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Newsmlg2
|
|
4
|
+
module Types
|
|
5
|
+
# A property with a QCode value in its qcode attribute, a URI in its uri
|
|
6
|
+
# attribute and optional names and related concepts.
|
|
7
|
+
class QualRelPropType < QCodePropType
|
|
8
|
+
include Newsmlg2::Base::I18NAttributes
|
|
9
|
+
|
|
10
|
+
xml_element :names, xml: 'name',
|
|
11
|
+
type: Newsmlg2::Types::ConceptNameType, collection: true
|
|
12
|
+
xml_element :hierarchy_infos, xml: 'hierarchyInfo',
|
|
13
|
+
type: Newsmlg2::Types::HierarchyInfo, collection: true
|
|
14
|
+
xml_element :related, xml: 'related',
|
|
15
|
+
type: Newsmlg2::Types::Related, collection: true
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Newsmlg2
|
|
4
|
+
module Types
|
|
5
|
+
# The type for an identifier of a related concept.
|
|
6
|
+
#
|
|
7
|
+
# NOTE: the :related child is declared at the bottom of this file (after
|
|
8
|
+
# Related exists) because Related's inheritance chain passes through
|
|
9
|
+
# RelatedConceptType — an eager reference here would be a circular
|
|
10
|
+
# autoload.
|
|
11
|
+
class RelatedConceptType < FlexPropType
|
|
12
|
+
include Newsmlg2::Base::TimeValidityAttributes
|
|
13
|
+
|
|
14
|
+
xml_attributes :rel, :reluri, :rank
|
|
15
|
+
|
|
16
|
+
xml_element :facets, xml: 'facet',
|
|
17
|
+
type: Newsmlg2::Types::Facet, collection: true
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# The concept which is faceted by other concept(s) asserted by
|
|
21
|
+
# facetConcept.
|
|
22
|
+
class MainConcept < RelatedConceptType
|
|
23
|
+
xml do
|
|
24
|
+
element 'mainConcept'
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# The concept which is faceting another concept asserted by mainConcept.
|
|
29
|
+
class FacetConcept < RelatedConceptType
|
|
30
|
+
xml do
|
|
31
|
+
element 'facetConcept'
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An identifier of a more generic concept.
|
|
36
|
+
class Broader < RelatedConceptType
|
|
37
|
+
xml do
|
|
38
|
+
element 'broader'
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An identifier of a more specific concept.
|
|
43
|
+
class Narrower < RelatedConceptType
|
|
44
|
+
xml do
|
|
45
|
+
element 'narrower'
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# The type for identifying a related concept.
|
|
50
|
+
class FlexRelatedConceptType < RelatedConceptType
|
|
51
|
+
include Newsmlg2::Base::ArbitraryValueAttributes
|
|
52
|
+
|
|
53
|
+
xml_element :bag, type: Newsmlg2::Types::Bag
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# A related concept, where the relationship is different from 'sameAs',
|
|
57
|
+
# 'broader' or 'narrower'.
|
|
58
|
+
class Related < FlexRelatedConceptType
|
|
59
|
+
xml do
|
|
60
|
+
element 'related'
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
class RelatedConceptType
|
|
65
|
+
xml_element :related, xml: 'related',
|
|
66
|
+
type: Newsmlg2::Types::Related, collection: true
|
|
67
|
+
xml_element :same_as, xml: 'sameAs',
|
|
68
|
+
type: Newsmlg2::Types::SameAs, collection: true
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Newsmlg2
|
|
4
|
+
module Types
|
|
5
|
+
# An expression of rights in natural language or as a reference to
|
|
6
|
+
# remote information.
|
|
7
|
+
class RightsBlockType < BlockType
|
|
8
|
+
xml_attributes :href
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Any necessary copyright notice for claiming the intellectual property
|
|
12
|
+
# for the content.
|
|
13
|
+
class CopyrightNotice < RightsBlockType
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# A natural-language statement about the usage terms pertaining to the
|
|
17
|
+
# content.
|
|
18
|
+
class UsageTerms < RightsBlockType
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# A rights expression serialized using XML encoding (content is a raw
|
|
22
|
+
# fragment of the rights expression language).
|
|
23
|
+
class RightsExpressionXML < Newsmlg2::NarModel
|
|
24
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
25
|
+
|
|
26
|
+
xml_attributes :langid
|
|
27
|
+
|
|
28
|
+
attribute :content, :string
|
|
29
|
+
|
|
30
|
+
xml do
|
|
31
|
+
element 'rightsExpressionXML'
|
|
32
|
+
map_all to: :content
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# A rights expression serialized using any specific encoding except XML.
|
|
37
|
+
class RightsExpressionData < Newsmlg2::NarModel
|
|
38
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
39
|
+
|
|
40
|
+
xml_attributes :langid, :enctype
|
|
41
|
+
|
|
42
|
+
attribute :content, :string
|
|
43
|
+
|
|
44
|
+
xml do
|
|
45
|
+
element 'rightsExpressionData'
|
|
46
|
+
map_all to: :content
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# A set of properties representing the rights associated with the Item.
|
|
51
|
+
# copyrightHolder/accountable/dataMining reuse the flex party/person/prop
|
|
52
|
+
# types directly — python-newsmlg2's subclasses added no structure.
|
|
53
|
+
class RightsInfo < Newsmlg2::NarModel
|
|
54
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
55
|
+
include Newsmlg2::Base::I18NAttributes
|
|
56
|
+
include Newsmlg2::Base::TimeValidityAttributes
|
|
57
|
+
|
|
58
|
+
xml_attributes :idrefs, :scope, :scopeuri, :aspect, :aspecturi
|
|
59
|
+
|
|
60
|
+
xml_element :accountable, xml: 'accountable',
|
|
61
|
+
type: Newsmlg2::Types::FlexPersonPropType
|
|
62
|
+
xml_element :copyright_holder, xml: 'copyrightHolder',
|
|
63
|
+
type: Newsmlg2::Types::FlexPartyPropType
|
|
64
|
+
xml_element :copyright_notices, xml: 'copyrightNotice',
|
|
65
|
+
type: Newsmlg2::Types::CopyrightNotice, collection: true
|
|
66
|
+
xml_element :usage_terms, xml: 'usageTerms',
|
|
67
|
+
type: Newsmlg2::Types::UsageTerms, collection: true
|
|
68
|
+
xml_element :links, xml: 'link',
|
|
69
|
+
type: Newsmlg2::Types::Link, collection: true
|
|
70
|
+
xml_element :rights_info_ext_properties, xml: 'rightsInfoExtProperty',
|
|
71
|
+
type: Newsmlg2::Types::Flex2ExtPropType, collection: true
|
|
72
|
+
xml_element :rights_expression_xmls, xml: 'rightsExpressionXML',
|
|
73
|
+
type: Newsmlg2::Types::RightsExpressionXML, collection: true
|
|
74
|
+
xml_element :rights_expression_datas, xml: 'rightsExpressionData',
|
|
75
|
+
type: Newsmlg2::Types::RightsExpressionData, collection: true
|
|
76
|
+
xml_element :data_mining, xml: 'dataMining',
|
|
77
|
+
type: Newsmlg2::Types::FlexPropType
|
|
78
|
+
|
|
79
|
+
xml do
|
|
80
|
+
element 'rightsInfo'
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Newsmlg2
|
|
4
|
+
module Types
|
|
5
|
+
# A line break inside block content.
|
|
6
|
+
class Br < Newsmlg2::NarModel
|
|
7
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
8
|
+
|
|
9
|
+
xml do
|
|
10
|
+
element 'br'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Ruby base text.
|
|
15
|
+
class Rb < Newsmlg2::NarModel
|
|
16
|
+
xml_content
|
|
17
|
+
|
|
18
|
+
xml do
|
|
19
|
+
element 'rb'
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Ruby parenthesis.
|
|
24
|
+
class Rp < Newsmlg2::NarModel
|
|
25
|
+
xml_content
|
|
26
|
+
|
|
27
|
+
xml do
|
|
28
|
+
element 'rp'
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Ruby text.
|
|
33
|
+
class Rt < Newsmlg2::NarModel
|
|
34
|
+
xml_content
|
|
35
|
+
|
|
36
|
+
xml do
|
|
37
|
+
element 'rt'
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Simple W3C Ruby Annotation (http://www.w3.org/TR/ruby/#simple-ruby1).
|
|
42
|
+
class Ruby < Newsmlg2::NarModel
|
|
43
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
44
|
+
include Newsmlg2::Base::I18NAttributes
|
|
45
|
+
|
|
46
|
+
xml_element :rb, type: Newsmlg2::Types::Rb
|
|
47
|
+
xml_element :rt, type: Newsmlg2::Types::Rt
|
|
48
|
+
xml_element :rp, type: Newsmlg2::Types::Rp
|
|
49
|
+
|
|
50
|
+
xml do
|
|
51
|
+
element 'ruby'
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Newsmlg2
|
|
4
|
+
module Types
|
|
5
|
+
# An identifier of a concept with equivalent semantics.
|
|
6
|
+
class SameAsType < FlexPropType
|
|
7
|
+
include Newsmlg2::Base::TimeValidityAttributes
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
# Serialized as the "sameAs" element.
|
|
11
|
+
class SameAs < SameAsType
|
|
12
|
+
xml do
|
|
13
|
+
element 'sameAs'
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Newsmlg2
|
|
4
|
+
module Types
|
|
5
|
+
# Property carrying a possibly truncated date-time as content
|
|
6
|
+
# (xs:date | xs:dateTime | xs:gYearMonth | xs:gYear).
|
|
7
|
+
class TruncatedDateTimePropType < Newsmlg2::NarModel
|
|
8
|
+
include Newsmlg2::Base::CommonPowerAttributes
|
|
9
|
+
|
|
10
|
+
xml_content
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|