lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataDictionary.rb in adiwg-mdtranslator-2.8.0 vs lib/adiwg/mdtranslator/readers/mdJson/modules/module_dataDictionary.rb in adiwg-mdtranslator-2.9.0

- old
+ new

@@ -1,9 +1,10 @@ # unpack a data dictionary # Reader - ADIwg JSON to internal data structure # History: +# Stan Smith 2018-01-25 rename dictionaryFormat to dictionaryFunctionalLanguage # Stan Smith 2017-11-09 add dictionary description # Stan Smith 2017-01-20 refactored for mdJson/mdTranslator 2.0 # 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 @@ -110,14 +111,18 @@ responseObj[:readerExecutionPass] = false return nil end # dictionary - dictionary format - if hDictionary.has_key?('dictionaryFormat') + # deprecate dictionaryFormat in favor of dictionaryFunctionalLanguage + s = nil + if hDictionary.has_key?('dictionaryFunctionalLanguage') + s = hDictionary['dictionaryFunctionalLanguage'] + elsif hDictionary.has_key?('dictionaryFormat') s = hDictionary['dictionaryFormat'] - unless s == '' - intDictionary[:dictionaryFormat] = s - end + end + unless s.nil? || s == '' + intDictionary[:dictionaryFunctionalLanguage] = s end # dictionary - dictionary included with resource if hDictionary.has_key?('dictionaryIncludedWithResource') if hDictionary['dictionaryIncludedWithResource'] === true \ No newline at end of file