lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_sbJson.rb in adiwg-mdtranslator-2.0.0rc5 vs lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_sbJson.rb in adiwg-mdtranslator-2.0.0rc6
- old
+ new
@@ -6,18 +6,21 @@
require 'jbuilder'
require_relative 'sbJson_id'
require_relative 'sbJson_citation'
require_relative 'sbJson_identifier'
+require_relative 'sbJson_rights'
+require_relative 'sbJson_provenance'
module ADIWG
module Mdtranslator
module Writers
module SbJson
def self.build(intObj, responseObj)
+ metadataInfo = intObj[:metadata][:metadataInfo]
resourceInfo = intObj[:metadata][:resourceInfo]
hCitation = resourceInfo[:citation]
@Namespace = ADIWG::Mdtranslator::Writers::SbJson
@@ -44,9 +47,18 @@
# purpose
json.purpose resourceInfo[:purpose]
# rights
+ unless resourceInfo[:constraints].empty?
+ json.rights Rights.build(resourceInfo[:constraints])
+ end
+
+ # provenance
+ json.provenance Provenance.build(metadataInfo)
+
+ # material requisition instructions
+ json.materialRequisitionInstructions
end
end