lib/adiwg/mdtranslator/readers/mdJson/modules/module_onlineResource.rb in adiwg-mdtranslator-2.15.0 vs lib/adiwg/mdtranslator/readers/mdJson/modules/module_onlineResource.rb in adiwg-mdtranslator-2.16.1
- old
+ new
@@ -1,9 +1,10 @@
# unpack online resources
# Reader - ADIwg JSON V1 to internal data structure
# History:
+# Stan Smith 2018-09-18 add applicationProfile and protocolRequest
# Stan Smith 2018-06-22 refactored error and warning messaging
# Stan Smith 2016-10-03 original script
# Stan Smith 2015-07-14 refactored to remove global namespace constants
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
# Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
@@ -40,34 +41,48 @@
end
if intOLRes[:olResURI].nil? || intOLRes[:olResURI] == ''
@MessagePath.issueError(601, responseObj, inContext)
end
- # resource - web link protocol
- if hOnlineRes.has_key?('protocol')
- unless hOnlineRes['protocol'] == ''
- intOLRes[:olResProtocol] = hOnlineRes['protocol']
- end
- end
-
- # resource - web link name
+ # resource - name
if hOnlineRes.has_key?('name')
unless hOnlineRes['name'] == ''
intOLRes[:olResName] = hOnlineRes['name']
end
end
- # resource - web link description
+ # resource - description
if hOnlineRes.has_key?('description')
unless hOnlineRes['description'] == ''
intOLRes[:olResDesc] = hOnlineRes['description']
end
end
- # resource - web link function
+ # resource - unction
if hOnlineRes.has_key?('function')
unless hOnlineRes['function'] == ''
intOLRes[:olResFunction] = hOnlineRes['function']
+ end
+ end
+
+ # resource - application profile
+ if hOnlineRes.has_key?('applicationProfile')
+ unless hOnlineRes['applicationProfile'] == ''
+ intOLRes[:olResApplicationProfile] = hOnlineRes['applicationProfile']
+ end
+ end
+
+ # resource - protocol
+ if hOnlineRes.has_key?('protocol')
+ unless hOnlineRes['protocol'] == ''
+ intOLRes[:olResProtocol] = hOnlineRes['protocol']
+ end
+ end
+
+ # resource - protocol request
+ if hOnlineRes.has_key?('protocolRequest')
+ unless hOnlineRes['protocolRequest'] == ''
+ intOLRes[:olResProtocolRequest] = hOnlineRes['protocolRequest']
end
end
return intOLRes
end