26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb', line 26
def self.build(hMetaInfo)
Jbuilder.new do |json|
json.metadataIdentifier Identifier.build(hMetaInfo[:metadataIdentifier]) unless hMetaInfo[:metadataIdentifier].empty?
json.parentMetadata Citation.build(hMetaInfo[:parentMetadata])
json.defaultMetadataLocale Locale.build(hMetaInfo[:defaultMetadataLocale]) unless hMetaInfo[:defaultMetadataLocale].empty?
json.otherMetadataLocale @Namespace.json_map(hMetaInfo[:otherMetadataLocales], Locale)
json.metadataContact @Namespace.json_map(hMetaInfo[:metadataContacts], ResponsibleParty)
json.metadataDate @Namespace.json_map(hMetaInfo[:metadataDates], Date)
json.metadataOnlineResource @Namespace.json_map(hMetaInfo[:metadataLinkages], OnlineResource)
json.metadataConstraint @Namespace.json_map(hMetaInfo[:metadataConstraints], Constraint)
json.metadataMaintenance Maintenance.build(hMetaInfo[:metadataMaintenance]) unless hMetaInfo[:metadataMaintenance].empty?
json.alternateMetadataReference @Namespace.json_map(hMetaInfo[:alternateMetadataReferences], Citation)
json.metadataStatus hMetaInfo[:metadataStatus]
end
end
|