adiwg-mdtranslator 2.20.0.pre.beta.3 → 2.21.0.pre.beta.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/Gemfile.lock +12 -10
- data/README.md +0 -21
- data/Rakefile +0 -1
- data/adiwg-mdtranslator.gemspec +2 -2
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +45 -7
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_dataQuality.rb +103 -59
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_acquisition.rb +133 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_conformanceResult.rb +5 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coverageResult.rb +4 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataQuality.rb +7 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_descriptiveResult.rb +4 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_environment.rb +47 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_event.rb +88 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrument.rb +73 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrumentationEvent.rb +77 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrumentationEventList.rb +62 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_metadata.rb +11 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_objective.rb +104 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_operation.rb +119 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_pass.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_plan.rb +80 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_platform.rb +87 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb +4 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_requestedDate.rb +51 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_requirement.rb +98 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_revision.rb +50 -0
- data/lib/adiwg/mdtranslator/version.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_dataQuality.rb +101 -31
- data/lib/adiwg/mdtranslator/writers/html/sections/html_acquisition.rb +199 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +19 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQuality.rb +17 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataQualityReport.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_environment.rb +58 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_event.rb +121 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_instrument.rb +98 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_instrumentationEvent.rb +84 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_instrumentationEventList.rb +90 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_objective.rb +155 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_operation.rb +178 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_pass.rb +72 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_plan.rb +93 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_platform.rb +117 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_requestedDate.rb +33 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_requirement.rb +139 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_revision.rb +55 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataIdentification.rb +29 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_dataQualityReport.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_gcoDateTime.rb +10 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_acquisition.rb +42 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_conformanceResult.rb +6 -5
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageResult.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_descriptiveResult.rb +1 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_environment.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_event.rb +37 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrument.rb +35 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrumentationEvent.rb +30 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrumentationEventList.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb +2 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_objective.rb +37 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_onlineResource.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_operation.rb +34 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_pass.rb +30 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_plan.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_platform.rb +35 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_quantitativeResult.rb +6 -5
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requestedDate.rb +26 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requirement.rb +36 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_resourceInfo.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_revision.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_citation.rb +9 -26
- data/lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQuality.rb +1 -1
- data/lib/adiwg/mdtranslator_cli.rb +1 -1
- metadata +48 -39
- data/DCAT-US.md +0 -67
- data/lib/adiwg/mdtranslator/writers/dcat_us/dcat_us_writer.rb +0 -98
- data/lib/adiwg/mdtranslator/writers/dcat_us/readme.md +0 -10
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_level.rb +0 -55
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_url.rb +0 -17
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_accrualPeriodicity.rb +0 -45
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_bureau_code.rb +0 -33
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_contact_point.rb +0 -29
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_dcat_us.rb +0 -104
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by.rb +0 -29
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by_type.rb +0 -33
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_description.rb +0 -19
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_distribution.rb +0 -59
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_download_url.rb +0 -17
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_identifier.rb +0 -29
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_is_part_of.rb +0 -27
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_issued.rb +0 -19
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_keyword.rb +0 -19
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_landing_page.rb +0 -27
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_language.rb +0 -23
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_license.rb +0 -18
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_media_type.rb +0 -17
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_modified.rb +0 -29
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_primaryITInvestmentUII.rb +0 -19
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_program_code.rb +0 -33
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_publisher.rb +0 -74
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_references.rb +0 -50
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_rights.rb +0 -32
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_spatial.rb +0 -32
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_system_of_records.rb +0 -28
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_temporal.rb +0 -40
- data/lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_theme.rb +0 -28
- data/lib/adiwg/mdtranslator/writers/dcat_us/version.rb +0 -14
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adiwg-mdtranslator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.21.0.pre.beta.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Smith
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-05-
|
12
|
+
date: 2024-05-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -129,28 +129,28 @@ dependencies:
|
|
129
129
|
requirements:
|
130
130
|
- - '='
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 2.
|
132
|
+
version: 2.10.0.pre.beta.5
|
133
133
|
type: :runtime
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - '='
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 2.
|
139
|
+
version: 2.10.0.pre.beta.5
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: adiwg-mdcodes
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
144
|
- - '='
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: 2.
|
146
|
+
version: 2.10.0
|
147
147
|
type: :runtime
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
151
|
- - '='
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: 2.
|
153
|
+
version: 2.10.0
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: jbuilder
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,7 +232,6 @@ files:
|
|
232
232
|
- ".jsbeautifyrc"
|
233
233
|
- ".travis.yml"
|
234
234
|
- CHANGELOG.md
|
235
|
-
- DCAT-US.md
|
236
235
|
- Gemfile
|
237
236
|
- Gemfile.lock
|
238
237
|
- LICENSE.txt
|
@@ -336,6 +335,7 @@ files:
|
|
336
335
|
- lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb
|
337
336
|
- lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader_messages_eng.yml
|
338
337
|
- lib/adiwg/mdtranslator/readers/mdJson/mdJson_validator.rb
|
338
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_acquisition.rb
|
339
339
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_additionalDocumentation.rb
|
340
340
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_address.rb
|
341
341
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_algorithm.rb
|
@@ -369,7 +369,9 @@ files:
|
|
369
369
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_entityAttribute.rb
|
370
370
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_entityForeignKey.rb
|
371
371
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_entityIndex.rb
|
372
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_environment.rb
|
372
373
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_evaluationMethod.rb
|
374
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_event.rb
|
373
375
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_extent.rb
|
374
376
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_featureCollection.rb
|
375
377
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_format.rb
|
@@ -389,6 +391,9 @@ files:
|
|
389
391
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_gridRepresentation.rb
|
390
392
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_identifier.rb
|
391
393
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_imageDescription.rb
|
394
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrument.rb
|
395
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrumentationEvent.rb
|
396
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_instrumentationEventList.rb
|
392
397
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_keyword.rb
|
393
398
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_keywordObject.rb
|
394
399
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_legalConstraint.rb
|
@@ -403,11 +408,16 @@ files:
|
|
403
408
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_metadataInfo.rb
|
404
409
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_metadataRepository.rb
|
405
410
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_nominalResolution.rb
|
411
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_objective.rb
|
406
412
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_obliqueLinePoint.rb
|
407
413
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_onlineResource.rb
|
414
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_operation.rb
|
408
415
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_orderProcess.rb
|
409
416
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_party.rb
|
417
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_pass.rb
|
410
418
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_phone.rb
|
419
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_plan.rb
|
420
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_platform.rb
|
411
421
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_processReport.rb
|
412
422
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_processStep.rb
|
413
423
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_processing.rb
|
@@ -418,10 +428,13 @@ files:
|
|
418
428
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_rangeElementDescription.rb
|
419
429
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_referenceSystemParameters.rb
|
420
430
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_releasability.rb
|
431
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_requestedDate.rb
|
432
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_requirement.rb
|
421
433
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_resourceInfo.rb
|
422
434
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_resourceType.rb
|
423
435
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_resourceUsage.rb
|
424
436
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_responsibleParty.rb
|
437
|
+
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_revision.rb
|
425
438
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_schema.rb
|
426
439
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_scope.rb
|
427
440
|
- lib/adiwg/mdtranslator/readers/mdJson/modules/module_scopeDescription.rb
|
@@ -475,38 +488,6 @@ files:
|
|
475
488
|
- lib/adiwg/mdtranslator/readers/sbJson/sbJson_reader.rb
|
476
489
|
- lib/adiwg/mdtranslator/readers/sbJson/version.rb
|
477
490
|
- lib/adiwg/mdtranslator/version.rb
|
478
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/dcat_us_writer.rb
|
479
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/readme.md
|
480
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_level.rb
|
481
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_access_url.rb
|
482
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_accrualPeriodicity.rb
|
483
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_bureau_code.rb
|
484
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_contact_point.rb
|
485
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_dcat_us.rb
|
486
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by.rb
|
487
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_described_by_type.rb
|
488
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_description.rb
|
489
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_distribution.rb
|
490
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_download_url.rb
|
491
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_identifier.rb
|
492
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_is_part_of.rb
|
493
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_issued.rb
|
494
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_keyword.rb
|
495
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_landing_page.rb
|
496
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_language.rb
|
497
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_license.rb
|
498
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_media_type.rb
|
499
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_modified.rb
|
500
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_primaryITInvestmentUII.rb
|
501
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_program_code.rb
|
502
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_publisher.rb
|
503
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_references.rb
|
504
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_rights.rb
|
505
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_spatial.rb
|
506
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_system_of_records.rb
|
507
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_temporal.rb
|
508
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/sections/dcat_us_theme.rb
|
509
|
-
- lib/adiwg/mdtranslator/writers/dcat_us/version.rb
|
510
491
|
- lib/adiwg/mdtranslator/writers/fgdc/classes/class_address.rb
|
511
492
|
- lib/adiwg/mdtranslator/writers/fgdc/classes/class_attribute.rb
|
512
493
|
- lib/adiwg/mdtranslator/writers/fgdc/classes/class_browse.rb
|
@@ -567,6 +548,7 @@ files:
|
|
567
548
|
- lib/adiwg/mdtranslator/writers/fgdc/version.rb
|
568
549
|
- lib/adiwg/mdtranslator/writers/html/html_writer.rb
|
569
550
|
- lib/adiwg/mdtranslator/writers/html/readme.md
|
551
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_acquisition.rb
|
570
552
|
- lib/adiwg/mdtranslator/writers/html/sections/html_additionalDocumentation.rb
|
571
553
|
- lib/adiwg/mdtranslator/writers/html/sections/html_algorithm.rb
|
572
554
|
- lib/adiwg/mdtranslator/writers/html/sections/html_allocation.rb
|
@@ -600,6 +582,8 @@ files:
|
|
600
582
|
- lib/adiwg/mdtranslator/writers/html/sections/html_entityAttribute.rb
|
601
583
|
- lib/adiwg/mdtranslator/writers/html/sections/html_entityForeignKey.rb
|
602
584
|
- lib/adiwg/mdtranslator/writers/html/sections/html_entityIndex.rb
|
585
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_environment.rb
|
586
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_event.rb
|
603
587
|
- lib/adiwg/mdtranslator/writers/html/sections/html_extent.rb
|
604
588
|
- lib/adiwg/mdtranslator/writers/html/sections/html_feature.rb
|
605
589
|
- lib/adiwg/mdtranslator/writers/html/sections/html_featureCollection.rb
|
@@ -621,6 +605,9 @@ files:
|
|
621
605
|
- lib/adiwg/mdtranslator/writers/html/sections/html_identifier.rb
|
622
606
|
- lib/adiwg/mdtranslator/writers/html/sections/html_imageInfo.rb
|
623
607
|
- lib/adiwg/mdtranslator/writers/html/sections/html_inlineCss.css
|
608
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_instrument.rb
|
609
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_instrumentationEvent.rb
|
610
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_instrumentationEventList.rb
|
624
611
|
- lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
|
625
612
|
- lib/adiwg/mdtranslator/writers/html/sections/html_legalConstraint.rb
|
626
613
|
- lib/adiwg/mdtranslator/writers/html/sections/html_lineage.rb
|
@@ -631,9 +618,14 @@ files:
|
|
631
618
|
- lib/adiwg/mdtranslator/writers/html/sections/html_metadataInfo.rb
|
632
619
|
- lib/adiwg/mdtranslator/writers/html/sections/html_metadataRepository.rb
|
633
620
|
- lib/adiwg/mdtranslator/writers/html/sections/html_nominalResolution.rb
|
621
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_objective.rb
|
634
622
|
- lib/adiwg/mdtranslator/writers/html/sections/html_obliqueLinePoint.rb
|
635
623
|
- lib/adiwg/mdtranslator/writers/html/sections/html_onlineResource.rb
|
624
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_operation.rb
|
636
625
|
- lib/adiwg/mdtranslator/writers/html/sections/html_orderProcess.rb
|
626
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_pass.rb
|
627
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_plan.rb
|
628
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_platform.rb
|
637
629
|
- lib/adiwg/mdtranslator/writers/html/sections/html_processReport.rb
|
638
630
|
- lib/adiwg/mdtranslator/writers/html/sections/html_processStep.rb
|
639
631
|
- lib/adiwg/mdtranslator/writers/html/sections/html_processing.rb
|
@@ -641,11 +633,14 @@ files:
|
|
641
633
|
- lib/adiwg/mdtranslator/writers/html/sections/html_rangeElementDescription.rb
|
642
634
|
- lib/adiwg/mdtranslator/writers/html/sections/html_referenceSystemParameters.rb
|
643
635
|
- lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
|
636
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_requestedDate.rb
|
637
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_requirement.rb
|
644
638
|
- lib/adiwg/mdtranslator/writers/html/sections/html_resourceFormat.rb
|
645
639
|
- lib/adiwg/mdtranslator/writers/html/sections/html_resourceInfo.rb
|
646
640
|
- lib/adiwg/mdtranslator/writers/html/sections/html_resourceType.rb
|
647
641
|
- lib/adiwg/mdtranslator/writers/html/sections/html_responsibility.rb
|
648
642
|
- lib/adiwg/mdtranslator/writers/html/sections/html_resultFile.rb
|
643
|
+
- lib/adiwg/mdtranslator/writers/html/sections/html_revision.rb
|
649
644
|
- lib/adiwg/mdtranslator/writers/html/sections/html_scope.rb
|
650
645
|
- lib/adiwg/mdtranslator/writers/html/sections/html_scopeDescription.rb
|
651
646
|
- lib/adiwg/mdtranslator/writers/html/sections/html_securityConstraint.rb
|
@@ -900,6 +895,7 @@ files:
|
|
900
895
|
- lib/adiwg/mdtranslator/writers/iso19115_3/version.rb
|
901
896
|
- lib/adiwg/mdtranslator/writers/mdJson/mdJson_writer.rb
|
902
897
|
- lib/adiwg/mdtranslator/writers/mdJson/readme.md
|
898
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_acquisition.rb
|
903
899
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_additionalDocumentation.rb
|
904
900
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_address.rb
|
905
901
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_algorithm.rb
|
@@ -934,7 +930,9 @@ files:
|
|
934
930
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_entityAttribute.rb
|
935
931
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_entityForeignKey.rb
|
936
932
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_entityIndex.rb
|
933
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_environment.rb
|
937
934
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_evaluationMethod.rb
|
935
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_event.rb
|
938
936
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_extent.rb
|
939
937
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_format.rb
|
940
938
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_funding.rb
|
@@ -949,6 +947,9 @@ files:
|
|
949
947
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_identifier.rb
|
950
948
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_imageDescription.rb
|
951
949
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_imageInfo.rb
|
950
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrument.rb
|
951
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrumentationEvent.rb
|
952
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_instrumentationEventList.rb
|
952
953
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_keyword.rb
|
953
954
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_keywordObject.rb
|
954
955
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_legalConstraint.rb
|
@@ -962,11 +963,16 @@ files:
|
|
962
963
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb
|
963
964
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb
|
964
965
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_nominalResolution.rb
|
966
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_objective.rb
|
965
967
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_obliqueLinePoint.rb
|
966
968
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_onlineResource.rb
|
969
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_operation.rb
|
967
970
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_orderProcess.rb
|
968
971
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_party.rb
|
972
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_pass.rb
|
969
973
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_phone.rb
|
974
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_plan.rb
|
975
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_platform.rb
|
970
976
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processReport.rb
|
971
977
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb
|
972
978
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processing.rb
|
@@ -976,9 +982,12 @@ files:
|
|
976
982
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_quantitativeResult.rb
|
977
983
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_releasability.rb
|
978
984
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_repository.rb
|
985
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requestedDate.rb
|
986
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requirement.rb
|
979
987
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_resourceInfo.rb
|
980
988
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_resourceType.rb
|
981
989
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_responsibleParty.rb
|
990
|
+
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_revision.rb
|
982
991
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_scope.rb
|
983
992
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_scopeDescription.rb
|
984
993
|
- lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_securityConstraint.rb
|
data/DCAT-US.md
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
# DCAT-US - mdTranslator proposed mappings
|
2
|
-
## Quick references
|
3
|
-
- DCAT-US [element definitions](https://resources.data.gov/resources/dcat-us/)
|
4
|
-
- DCAT-US v1.1 [catalog.json schema](https://resources.data.gov/schemas/dcat-us/v1.1/schema/catalog.json)
|
5
|
-
- DCAT-US v1.1 [dataset.json schema](https://resources.data.gov/schemas/dcat-us/v1.1/schema/dataset.json)
|
6
|
-
- DCAT-US v1.1 [JSON-LD catalog.json schema](https://resources.data.gov/schemas/dcat-us/v1.1/schema/catalog.jsonld)
|
7
|
-
- [Element crosswalks](https://resources.data.gov/resources/podm-field-mapping/#field-mappings) to other standards
|
8
|
-
|
9
|
-
## DCAT-US - mdTranslator
|
10
|
-
|
11
|
-
### Always (always required)
|
12
|
-
|
13
|
-
| Field Name | DCAT Name | Condition | mdJson Source |
|
14
|
-
| --- | --- | --- | --- |
|
15
|
-
| Title | title | exists | citation.title |
|
16
|
-
| Description | description | exists | resourceInfo.abstract |
|
17
|
-
| Tags | keyword | exists | [resourceInfo.keyword.keyword[0, n] *flatten*] |
|
18
|
-
| Last Update | modified | if resourceInfo.citation.date[any].dateType = "lastUpdated" or "lastRevised" or "revision" | resourceInfo.citation.date[most recent] |
|
19
|
-
| Publisher | publisher{name} | if citation.responsibleParty.[any].role = "publisher" | contactId -> contact.name where isOrganization IS TRUE |
|
20
|
-
| | | if exists resourceDistribution.distributor.contact | [first contact] contactId -> contact.name where isOrganization IS TRUE |
|
21
|
-
| Publisher Parent Organization | publisher{subOrganizationOf} | if citation.responsibleParty[any].role = "publisher" and exists contactId -> memberOfOrganization[0] and isOrganization is true | contactId -> contact.name |
|
22
|
-
| | | if exists resourceDistribution.distributor.contact and exists contactId -> memberOfOrganization[0] and isOrganization IS TRUE | contactId -> contact.name |
|
23
|
-
| Contact Name | contactPoint{fn} | exists | resourceInfo.pointOfContact.parties[0].contactId -> contact.name |
|
24
|
-
| Contact Email | contactPoint{email} | exists | resourceInfo.pointOfContact.parties[0].contactId -> contact.eMailList[0] |
|
25
|
-
| Unique Identifier | identifier | if resourceInfo.citation.identifier.namespace = "DOI" | resourceInfo.citation.onlineResource.uri |
|
26
|
-
| | | if "DOI" within resourceInfo.citation.onlineResource.uri | resourceInfo.citation.onlineResource.uri |
|
27
|
-
| Public Access Level | accessLevel | [*extend codelist MD_RestrictionCode to include "public", "restricted public", "non-public"*] <br> if resourceInfo.constraints.legal[any] one of {"public", "restricted public", "non-public"} | resourceInfo.constraints.legal[first]. Also resourceInfo.constraint.security.classification [[MD_ClassificationCode](https://mdtools.adiwg.org/#codes-page?c=iso_classification)] |
|
28
|
-
| Bureau Code | bureauCode | | [*extend role codelist to include "bureau", extend namespace codelist to include "bureauCode"*] <br> for each resourceInfo.citation.responsibleParty[any] role = "bureau" <br>contactId -> contact.identifier [*identifier must conform to https://resources.data.gov/schemas/dcat-us/v1.1/omb_bureau_codes.csv*] |
|
29
|
-
| Program Code | programCode | | [*add new element of program resourceInfo.programCode, add new codelist of programCode*] <br> resourceInfo.program[0,n] |
|
30
|
-
|
31
|
-
### If-Applicable (required if it exists)
|
32
|
-
|
33
|
-
| Field Name | DCAT Name | Condition | mdJson Source |
|
34
|
-
| --- | --- | --- | --- |
|
35
|
-
| Distribution | distribution | if exists resourceDistribution[any] and if exists resourceDistribution.distributor[any].transferOption[any].onlineOption[any].uri <br> for each resourceDistribution[0, n] where exists resourceDistribution.distributor.transferOption.onlineOption.uri then <br> {description, accessURL, downloadURL, mediaType, title} |
|
36
|
-
| - Description | distribution.description | exists | resourceDistribution.description |
|
37
|
-
| - AccessURL | distribution.accessURL | if citation.onlineResources[first occurence].uri [path ends in ".html"] [*required if applicable*] | resourceDistribution.distributor.transferOption.onlineOption.uri |
|
38
|
-
| - DownloadURL | dcat.distribution.downloadURL | if citation.onlineResources[first occurence].uri [path does not end in ".html"] [*required if applicable*] |resourceDistribution.distributor.transferOption.onlineOption.uri |
|
39
|
-
| - MediaType | distribution.mediaType | [*add codelist of "dataFormat"*] <br> transferOption.distributionFormat.formatSpecification.title [dataFormat] [*dataFormat should conform to: https://www.iana.org/assignments/media-types/media-types.xhtml*] |
|
40
|
-
| - Title | distribution.title | exists | resourceDistribution.distributor.transferOption.onlineOption.name |
|
41
|
-
| License | license | [*add resourceInfo.constraint.reference to mdEditor*] <br> if exists resourceInfo.constraint.reference[0] | resourceInfo.constraint.reference[0] <br> |
|
42
|
-
| | | else | https://creativecommons.org/publicdomain/zero/1.0/ <br> [*allows author to identify a license to use, or default to CC0 if none provided, CC0 would cover international usage as opposed to publicdomain*] <br> [*others: http://www.usa.gov/publicdomain/label/1.0/, http://opendatacommons.org/licenses/pddl/1.0*] |
|
43
|
-
| Rights | rights | if constraint.accessLevel in {"restricted public", "non-public"} | resourceInfo.constraint.releasibility.statement + " " + each constraint.releasibility.dessiminationConstraint[0, n] |
|
44
|
-
| Endpoint | *removed* | *ignored* | *ignored* |
|
45
|
-
| Spatial | spatial | if exists resourceInfo.extents[0].geographicExtents[0].boundingBox | boundingBox.eastLongitude + "," + boundingBox.southLatitude + "," + boundingBox.westLongitude + "," + boundingBox.northLatitude [*decimal degrees*] |
|
46
|
-
| | | else | if exists resourceInfo.extents[0].geographicExtents[0].geographicElement[0].type = "point" then <br> geographicElement[0].coordinate[1] + "," + geographicElement[0].coordinate[0] [*lat, long decimal degrees*] |
|
47
|
-
| Temporal | temporal | if exists resourceInfo.extent[0].temporalExtent[0] then <br> if exists tempororalExtent[0].timePeriod.startDate and exists temporaralExtent[0].timePeriod.endDate | timePeriod[0].startDate + "/" + timePeriod.endDate |
|
48
|
-
| | | if exists tempororalExtent[0].timePeriod.startDate and not exists temporaralExtent[0].timePeriod.endDate | tempororalExtent[0].timePeriod.startDate |
|
49
|
-
| | | if not exists temporalExtent[0].timePeriod.startDate and exists temporaralExtent[0].timePeriod.endDate | tempororalExtent[0].timePeriod.endDate <br> [*may need revisiting relative to decision on date only formatting*] |
|
50
|
-
|
51
|
-
### No (not required)
|
52
|
-
|
53
|
-
| Field Name | DCAT Name | Condition | mdJson Source |
|
54
|
-
| --- | --- | --- | --- |
|
55
|
-
| Release Date | issued | if resourceInfo.citation.date[any].dateType = "publication" or "distributed" | resourceInfo.citation.date[earliest] |
|
56
|
-
| Frequency | accrualPeriodicity | | [*ISO codelist MD_maintenanceFrequency can be used and several codes intersect with accrualPeriod codelist they are partially corresponding. A column of ISO8601 code equivalents could be added to MD_maintenanceFrequency to provide the coding expected https://resources.data.gov/schemas/dcat-us/v1.1/iso8601_guidance/#accrualperiodicity, community valuation should be determined*] |
|
57
|
-
| Language | language | | [*language codelist could be used but needs to be bound with country corresponding to the RFC 5646 format https://datatracker.ietf.org/doc/html/rfc5646, such as "en-US", community valuation should be determined* |
|
58
|
-
| Data Quality | dataQuality | | [*this is a boolean to indicate whether data "conforms" to agency standards, value seems negligble*] |
|
59
|
-
| Category | theme | where resourceInfo.keyword[any].thesaurus.title = "ISO Topic Category" | [resourceInfo.keyword.keyword[0, n] *flatten*] |
|
60
|
-
| Related Documents | references | | associatedResource[all].resourceCitation.onlineResource[all].uri + additionalDocumentation[all].citation[all].onlineResource[all].uri [*comma separated*]|
|
61
|
-
| Homepage URL | landingPage | [*Add code "landingPage" to CI_OnlineFunctionCode*] <br> if resourceInfo.citation.onlineResource[any].function = "landingPage" | resourceInfo.citation.onlineResource.uri |
|
62
|
-
| Collection | isPartOf | for each associatedResource[0, n].initiativeType = "collection" and associatedResource.associationType = "collectiveTitle" | associatedResource.resourceCitation[0].uri |
|
63
|
-
| System of Records | systemOfRecords | [*Add code "sorn" to DS_InitiativeTypeCode*] <br> for each associatedResource[0, n].initiativeType = "sorn" | associatedResource.resourceCitation[0].uri |
|
64
|
-
| Primary IT Investment | primaryITInvestmentUII | | [*Links data to an IT investment identifier relative to Exhibit 53 docs, community valuation should be determined*] |
|
65
|
-
| Data Dictionary | describedBy | if dataDictionary.dictionaryIncludedWithResource IS NOT TRUE and citation.onlineResource[0].uri exists | dataDictionary.citation.onlineResource[0].uri |
|
66
|
-
| Data Dictionary Type | describedByType | | [*For simplicity, leave blank implying html page, community decision needed whether to support other format types using mime type and in the form of "application/pdf"*]|
|
67
|
-
| Data Standard | conformsTo | | [*Currently not able to identify the schema standard the data conforms to, though this has been proposed. Should this be built and there is community decision to support it, then it can be mapped*] |
|
@@ -1,98 +0,0 @@
|
|
1
|
-
require 'jbuilder'
|
2
|
-
require_relative 'version'
|
3
|
-
require_relative 'sections/dcat_us_dcat_us'
|
4
|
-
|
5
|
-
module ADIWG
|
6
|
-
module Mdtranslator
|
7
|
-
module Writers
|
8
|
-
module Dcat_us
|
9
|
-
|
10
|
-
def self.startWriter(intObj, responseObj)
|
11
|
-
# set the contact array for use by the writer
|
12
|
-
@contacts = intObj[:contacts]
|
13
|
-
|
14
|
-
# set output flag for null properties
|
15
|
-
Jbuilder.ignore_nil(!responseObj[:writerShowTags])
|
16
|
-
|
17
|
-
# set the format of the output file based on the writer specified
|
18
|
-
responseObj[:writerOutputFormat] = 'json'
|
19
|
-
responseObj[:writerVersion] = ADIWG::Mdtranslator::Writers::Dcat_us::VERSION
|
20
|
-
|
21
|
-
# write the dcat_us metadata record
|
22
|
-
metadata = Dcat_us.build(intObj, responseObj)
|
23
|
-
|
24
|
-
# set writer pass to true if no messages
|
25
|
-
# false or warning state will be set by writer code
|
26
|
-
responseObj[:writerPass] = true if responseObj[:writerMessages].empty?
|
27
|
-
|
28
|
-
# encode the metadata target as JSON
|
29
|
-
metadata.target!
|
30
|
-
end
|
31
|
-
|
32
|
-
# find contact in contact array and return the contact hash
|
33
|
-
def self.get_contact_by_index(contactIndex)
|
34
|
-
if @contacts[contactIndex]
|
35
|
-
return @contacts[contactIndex]
|
36
|
-
end
|
37
|
-
{}
|
38
|
-
end
|
39
|
-
|
40
|
-
# find contact in contact array and return the contact hash
|
41
|
-
def self.get_contact_by_id(contactId)
|
42
|
-
@contacts.each do |hContact|
|
43
|
-
if hContact[:contactId] == contactId
|
44
|
-
return hContact
|
45
|
-
end
|
46
|
-
end
|
47
|
-
{}
|
48
|
-
end
|
49
|
-
|
50
|
-
# find contact in contact array and return the contact index
|
51
|
-
def self.get_contact_index_by_id(contactId)
|
52
|
-
@contacts.each_with_index do |hContact, index|
|
53
|
-
if hContact[:contactId] == contactId
|
54
|
-
return index
|
55
|
-
end
|
56
|
-
end
|
57
|
-
{}
|
58
|
-
end
|
59
|
-
|
60
|
-
# ignore jBuilder object mapping when array is empty
|
61
|
-
def self.json_map(collection = [], _class)
|
62
|
-
if collection.nil? || collection.empty?
|
63
|
-
return nil
|
64
|
-
else
|
65
|
-
collection.map { |item| _class.build(item).attributes! }
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
# find all nested objects in 'obj' that contain the element 'ele'
|
70
|
-
def self.nested_objs_by_element(obj, ele, excludeList = [])
|
71
|
-
aCollected = []
|
72
|
-
obj.each do |key, value|
|
73
|
-
skipThisOne = false
|
74
|
-
excludeList.each do |exclude|
|
75
|
-
if key == exclude.to_sym
|
76
|
-
skipThisOne = true
|
77
|
-
end
|
78
|
-
end
|
79
|
-
next if skipThisOne
|
80
|
-
if key == ele.to_sym
|
81
|
-
aCollected << obj
|
82
|
-
elsif obj.is_a?(Array)
|
83
|
-
if key.respond_to?(:each)
|
84
|
-
aReturn = nested_objs_by_element(key, ele, excludeList)
|
85
|
-
aCollected = aCollected.concat(aReturn) unless aReturn.empty?
|
86
|
-
end
|
87
|
-
elsif obj[key].respond_to?(:each)
|
88
|
-
aReturn = nested_objs_by_element(value, ele, excludeList)
|
89
|
-
aCollected = aCollected.concat(aReturn) unless aReturn.empty?
|
90
|
-
end
|
91
|
-
end
|
92
|
-
aCollected
|
93
|
-
end
|
94
|
-
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
require 'jbuilder'
|
2
|
-
|
3
|
-
module ADIWG
|
4
|
-
module Mdtranslator
|
5
|
-
module Writers
|
6
|
-
module Dcat_us
|
7
|
-
module AccessLevel
|
8
|
-
|
9
|
-
def self.build(intObj)
|
10
|
-
|
11
|
-
publicArray = ['unclassified', 'unrestricted', 'licenseUnrestricted', 'licenseEndUser']
|
12
|
-
nonPublicArray = ['restricted','confidential','secret','topSecret','forOfficialUseOnly','protected','intellectualPropertyRights','restricted','otherRestrictions','private','statutory','confidential','traditionalKnowledge','personallyIdentifiableInformation']
|
13
|
-
restrictedPublicArray = ['sensitiveButUnclassified','limitedDistribution','copyright','patent','patentPending','trademark','license','licenseDistributor','in-confidence','threatenedOrEndangered']
|
14
|
-
|
15
|
-
resourceInfo = intObj[:metadata][:resourceInfo]
|
16
|
-
legalConstraints = resourceInfo[:constraints]&.select { |constraint| constraint[:type] == 'legal' }
|
17
|
-
securityConstraints = resourceInfo[:constraints]&.select { |constraint| constraint[:type] == 'security' }
|
18
|
-
|
19
|
-
accessLevelCodes = []
|
20
|
-
|
21
|
-
# Gather codes from security constraints and legal constraints
|
22
|
-
unless securityConstraints.empty?
|
23
|
-
securityConstraints.each do |securityConstraint|
|
24
|
-
code = securityConstraint[:securityConstraint][:classCode]
|
25
|
-
accessLevelCodes << code
|
26
|
-
end
|
27
|
-
end
|
28
|
-
unless legalConstraints.empty?
|
29
|
-
legalConstraints.each do |legalConstraint|
|
30
|
-
codes = legalConstraint.dig(:legalConstraint, :accessCodes)
|
31
|
-
accessLevelCodes.push(*codes)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# return access level that is most restrictive
|
36
|
-
accessLevelCodes.uniq.each do |code|
|
37
|
-
if nonPublicArray.include? code
|
38
|
-
return 'non-public'
|
39
|
-
end
|
40
|
-
end
|
41
|
-
accessLevelCodes.uniq.each do |code|
|
42
|
-
if restrictedPublicArray.include? code
|
43
|
-
return 'restricted public'
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
return 'public'
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'jbuilder'
|
2
|
-
|
3
|
-
module ADIWG
|
4
|
-
module Mdtranslator
|
5
|
-
module Writers
|
6
|
-
module Dcat_us
|
7
|
-
module AccrualPeriodicity
|
8
|
-
|
9
|
-
def self.build(intObj)
|
10
|
-
|
11
|
-
frequency_mapping = {
|
12
|
-
'decennial' => 'R/P10Y',
|
13
|
-
'quadrennial' => 'R/P4Y',
|
14
|
-
'annual' => 'R/P1Y',
|
15
|
-
'bimonthly' => 'R/P2M or R/P0.5M',
|
16
|
-
'semiweekly' => 'R/P3.5D',
|
17
|
-
'daily' => 'R/P1D',
|
18
|
-
'biweekly' => 'R/P2W or R/P0.5W',
|
19
|
-
'semiannual' => 'R/P6M',
|
20
|
-
'biennial' => 'R/P2Y',
|
21
|
-
'triennial' => 'R/P3Y',
|
22
|
-
'three times a week' => 'R/P0.33W',
|
23
|
-
'three times a month' => 'R/P0.33M',
|
24
|
-
'continuously updated' => 'R/PT1S',
|
25
|
-
'monthly' => 'R/P1M',
|
26
|
-
'quarterly' => 'R/P3M',
|
27
|
-
'semimonthly' => 'R/P0.5M',
|
28
|
-
'three times a year' => 'R/P4M',
|
29
|
-
'weekly' => 'R/P1W',
|
30
|
-
'hourly' => 'R/PT1H'
|
31
|
-
}
|
32
|
-
|
33
|
-
frequency = intObj[:metadata][:metadataInfo][:metadataMaintenance][:frequency]
|
34
|
-
|
35
|
-
unless frequency.nil?
|
36
|
-
frequency_code = frequency_mapping[frequency.downcase]
|
37
|
-
end
|
38
|
-
return frequency_code
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'jbuilder'
|
2
|
-
|
3
|
-
module ADIWG
|
4
|
-
module Mdtranslator
|
5
|
-
module Writers
|
6
|
-
module Dcat_us
|
7
|
-
module BureauCode
|
8
|
-
|
9
|
-
def self.build(intObj)
|
10
|
-
|
11
|
-
responsibleParties = intObj[:metadata][:resourceInfo][:citation][:responsibleParties]
|
12
|
-
contacts = []
|
13
|
-
responsibleParties.each do |party|
|
14
|
-
contactId = party[:parties][0][:contactId]
|
15
|
-
contacts << Dcat_us.get_contact_by_id(contactId)
|
16
|
-
end
|
17
|
-
|
18
|
-
bureauContacts = contacts&.select { |contact| contact[:externalIdentifier].any? { |id| id[:namespace] == 'bureauCode'} }
|
19
|
-
|
20
|
-
bureauCodes = []
|
21
|
-
bureauContacts.each do |contact|
|
22
|
-
bureauCode = contact[:externalIdentifier].find { |id| id[:namespace] == 'bureauCode' }
|
23
|
-
bureauCodes << bureauCode[:identifier]
|
24
|
-
end
|
25
|
-
|
26
|
-
return bureauCodes
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'jbuilder'
|
2
|
-
|
3
|
-
module ADIWG
|
4
|
-
module Mdtranslator
|
5
|
-
module Writers
|
6
|
-
module Dcat_us
|
7
|
-
module ContactPoint
|
8
|
-
|
9
|
-
def self.build(intObj)
|
10
|
-
resourceInfo = intObj[:metadata][:resourceInfo]
|
11
|
-
pointOfContact = resourceInfo[:pointOfContacts][0]
|
12
|
-
contactId = pointOfContact[:parties][0][:contactId]
|
13
|
-
|
14
|
-
contact = Dcat_us.get_contact_by_id(contactId)
|
15
|
-
fn = contact[:name]
|
16
|
-
hasEmail = contact[:eMailList][0]
|
17
|
-
|
18
|
-
Jbuilder.new do |json|
|
19
|
-
json.set!('@type', 'vcard:Contact')
|
20
|
-
json.set!('fn', fn)
|
21
|
-
json.set!('hasEmail', hasEmail)
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|