lib/bolognese/utils.rb in bolognese-1.9.5 vs lib/bolognese/utils.rb in bolognese-1.9.6

- old
+ new

@@ -1304,12 +1304,12 @@ if subject return [{ "subject" => sanitize(hsh["__content__"] || hsh["subject"]), "subjectScheme" => hsh["subjectScheme"], - "schemeUri" => hsh["schemeURI"], - "valueUri" => hsh["valueURI"], + "schemeUri" => hsh["schemeURI"] || hsh["schemeURI"], + "valueUri" => hsh["valueURI"] || hsh["valueURI"], "classificationCode" => hsh["classificationCode"], "lang" => hsh["lang"] }.compact, { "subject" => "FOS: " + subject["fosLabel"], "subjectScheme" => "Fields of Science and Technology (FOS)", @@ -1337,12 +1337,12 @@ if subject [{ "subject" => sanitize(hsh["__content__"] || hsh["subject"]), "subjectScheme" => hsh["subjectScheme"], "classificationCode" => hsh["classificationCode"], - "schemeUri" => hsh["schemeURI"], - "valueUri" => hsh["valueURI"], + "schemeUri" => hsh["schemeURI"] || hsh["schemeURI"], + "valueUri" => hsh["valueURI"] || hsh["valueURI"], "lang" => hsh["lang"] }.compact, { "subject" => "FOS: " + subject["fosLabel"], "subjectScheme" => "Fields of Science and Technology (FOS)", "schemeUri" => "http://www.oecd.org/science/inno/38235147.pdf" @@ -1350,11 +1350,11 @@ else [{ "subject" => sanitize(hsh["__content__"] || hsh["subject"]), "subjectScheme" => hsh["subjectScheme"], "classificationCode" => hsh["classificationCode"], - "schemeUri" => hsh["schemeURI"], - "valueUri" => hsh["valueURI"], + "schemeUri" => hsh["schemeURI"] || hsh["schemeURI"], + "valueUri" => hsh["valueURI"] || hsh["valueURI"], "lang" => hsh["lang"] }.compact] end end end end