adiwg-mdtranslator 2.0.0rc13 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_browseCategory.rb +47 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_budget.rb +79 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_contact.rb +248 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_date.rb +49 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_extent.rb +62 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_id.rb +10 -3
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_identifier.rb +17 -15
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_materialRequest.rb +72 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_parentId.rb +44 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_project.rb +48 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_publication.rb +77 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_sbJson.rb +90 -7
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_spatial.rb +56 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_tag.rb +125 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_webLinkDocument.rb +99 -0
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/module_webLinkGraphic.rb +92 -0
- data/lib/adiwg/mdtranslator/version.rb +2 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_bodyScript.js +6 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_citation.rb +6 -2
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_fcFeatureCatalogue.rb +1 -2
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_budget.rb +29 -2
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_codelists.rb +0 -1
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb +7 -1
- metadata +18 -22
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_additionalDocumentation.rb +0 -52
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_boundingBox.rb +0 -54
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_browseGraphic.rb +0 -66
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_citation.rb +0 -125
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_contacts.rb +0 -143
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_dateTime.rb +0 -31
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_distributionInfo.rb +0 -64
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_extent.rb +0 -61
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_geoCoordSystem.rb +0 -50
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_geoProperties.rb +0 -91
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_geographicElement.rb +0 -161
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_metadata.rb +0 -75
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_metadataInfo.rb +0 -130
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_onlineResource.rb +0 -71
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_resourceIdentifier.rb +0 -73
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_resourceInfo.rb +0 -437
- data/lib/adiwg/mdtranslator/readers/sbJson/modules/Old/module_responsibleParty.rb +0 -53
@@ -1,53 +0,0 @@
|
|
1
|
-
module ADIWG
|
2
|
-
module Mdtranslator
|
3
|
-
module Readers
|
4
|
-
module SbJson
|
5
|
-
|
6
|
-
module ResponsibleParty
|
7
|
-
|
8
|
-
def self.unpack(hRParty, responseObj)
|
9
|
-
|
10
|
-
# return nil object if input is empty
|
11
|
-
intResById = nil
|
12
|
-
return if hRParty.empty?
|
13
|
-
|
14
|
-
# instance classes needed in script
|
15
|
-
intMetadataClass = InternalMetadata.new
|
16
|
-
intResById = intMetadataClass.newRespParty
|
17
|
-
|
18
|
-
# responsible party - contact
|
19
|
-
if hRParty.has_key?('contactId')
|
20
|
-
s = hRParty['contactId']
|
21
|
-
if s != ''
|
22
|
-
intResById[:contactId] = s
|
23
|
-
if (!ADIWG::Mdtranslator::Readers::SbJson.findContact(s))
|
24
|
-
responseObj[:readerExecutionPass] = false
|
25
|
-
responseObj[:readerExecutionMessages] << "Responsible Party contact ID #{s} does not match with any contact provided\n"
|
26
|
-
end
|
27
|
-
else
|
28
|
-
responseObj[:readerExecutionPass] = false
|
29
|
-
responseObj[:readerExecutionMessages] << 'Responsible Party is missing the contact ID\n'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
# responsible party - role - required
|
34
|
-
if hRParty.has_key?('role')
|
35
|
-
s = hRParty['role']
|
36
|
-
if s != ''
|
37
|
-
intResById[:roleName] = s
|
38
|
-
else
|
39
|
-
responseObj[:readerExecutionPass] = false
|
40
|
-
responseObj[:readerExecutionMessages] << 'Responsible Party is missing the contact role\n'
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
return intResById
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|