Skip to content

Commit

Permalink
Update module files to include 'name' attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaspin committed May 9, 2024
1 parent a5f4bc5 commit fb11e0d
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ def self.unpack(hConformanceResult, responseObj)
intConformanceResult[:scope] = Scope.unpack(hConformanceResult['scope'], responseObj)
end

# name
if hConformanceResult.has_key?('name')
intConformanceResult[:name] = hConformanceResult['name']
end

#specification
if hConformanceResult.has_key?('specification')
intConformanceResult[:specification] = Citation.unpack(hConformanceResult['specification'], responseObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def self.unpack(hResult, responseObj)
intResult[:scope] = Scope.unpack(hResult['scope'], responseObj)
end

# name
if hResult.has_key?('name')
intResult[:name] = hResult['name']
end

# spatialRepresentationType
if hResult.has_key?('spatialRepresentationType')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def self.unpack(hResult, responseObj, inContext = nil)
intResult[:scope] = Scope.unpack(hResult['scope'], responseObj)
end

if hResult.has_key?('name')
intResult[:name] = hResult['name']
end

if hResult.has_key?('statement')
intResult[:statement] = hResult['statement']
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def self.unpack(hResult, responseObj, inContext = nil)
intResult[:scope] = Scope.unpack(hResult['scope'], responseObj)
end

if hResult.has_key?('name')
intResult[:name] = hResult['name']
end

if hResult.has_key?('value')
intResult[:values] = hResult['value']
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ module MdJson
module ConformanceResult
def self.build(hConformanceResult)
Jbuilder.new do |json|
json.dateTime hConformanceResult[:dateTime]
json.scope Scope.build(hConformanceResult[:scope])
json.specification Citation.build(hConformanceResult[:specification])
json.explanation hConformanceResult[:explanation]
json.pass hConformanceResult[:pass]
json.dateTime hConformanceResult[:dateTime] unless hConformanceResult[:dateTime].nil?
json.scope Scope.build(hConformanceResult[:scope]) unless hConformanceResult[:scope].empty?
json.name hConformanceResult[:name] unless hConformanceResult[:name].nil?
json.specification Citation.build(hConformanceResult[:specification]) unless hConformanceResult[:specification].empty?
json.explanation hConformanceResult[:explanation] unless hConformanceResult[:explanation].nil?
json.pass hConformanceResult[:pass] unless hConformanceResult[:pass].nil?
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def self.build(hCoverageResult)
Jbuilder.new do |json|
json.dateTime hCoverageResult[:dateTime]
json.scope Scope.build(hCoverageResult[:scope]) unless hCoverageResult[:scope].empty?
json.name hCoverageResult[:name] unless hCoverageResult[:name].nil?
json.spatialRepresentationType hCoverageResult[:spatialRepresentationType]
json.spatialRepresentation SpatialRepresentation.build(hCoverageResult[:spatialRepresentation]) unless hCoverageResult[:spatialRepresentation].empty?
json.resultContentDescription CoverageDescription.build(hCoverageResult[:resultContentDescription]) unless hCoverageResult[:resultContentDescription].empty?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def self.build(hResult)
Jbuilder.new do |json|
json.dateTime hResult[:dateTime] unless hResult[:dateTime].nil?
json.scope Scope.build(hResult[:scope]) unless hResult[:scope].empty?
json.name hResult[:name] unless hResult[:name].nil?
json.statement hResult[:statement] unless hResult[:statement].nil?
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ module MdJson
module QuantitativeResult
def self.build(hResult)
Jbuilder.new do |json|
json.dateTime hResult[:dateTime]
json.scope Scope.build(hResult[:scope]) if hResult[:scope]
json.value hResult[:values]
json.valueUnits hResult[:valueUnits]
json.valueRecordType hResult[:valueRecordType]
json.dateTime hResult[:dateTime] unless hResult[:dateTime].nil?
json.scope Scope.build(hResult[:scope]) unless hResult[:scope].empty?
json.name hResult[:name] unless hResult[:name].nil?
json.value hResult[:values] unless hResult[:values].empty?
json.valueUnits hResult[:valueUnits] unless hResult[:valueUnits].nil?
json.valueRecordType hResult[:valueRecordType] unless hResult[:valueRecordType].nil?
end
end
end
Expand Down

0 comments on commit fb11e0d

Please sign in to comment.