lib/bolognese/readers/schema_org_reader.rb in bolognese-1.0.26 vs lib/bolognese/readers/schema_org_reader.rb in bolognese-1.0.27

- old
+ new

@@ -61,12 +61,12 @@ "citeproc" => Bolognese::Utils::SO_TO_CP_TRANSLATIONS[schema_org] || "article-journal", "bibtex" => Bolognese::Utils::SO_TO_BIB_TRANSLATIONS[schema_org] || "misc", "ris" => Bolognese::Utils::SO_TO_RIS_TRANSLATIONS[resource_type_general.to_s.dasherize] || "GEN" }.compact authors = meta.fetch("author", nil) || meta.fetch("creator", nil) - author = get_authors(from_schema_org(Array.wrap(authors))) - contributor = get_authors(from_schema_org(Array.wrap(meta.fetch("editor", nil)))) + creators = get_authors(from_schema_org(Array.wrap(authors))) + contributors = get_authors(from_schema_org(Array.wrap(meta.fetch("editor", nil)))) publisher = parse_attributes(meta.fetch("publisher", nil), content: "name", first: true) ct = (schema_org == "Dataset") ? "includedInDataCatalog" : "Periodical" periodical = if meta.fetch(ct, nil).present? { @@ -143,11 +143,11 @@ "url" => normalize_id(meta.fetch("url", nil)), "content_url" => Array.wrap(meta.fetch("contentUrl", nil)), "sizes" => Array.wrap(meta.fetch("contenSize", nil)).presence, "formats" => Array.wrap(meta.fetch("encodingFormat", nil) || meta.fetch("fileFormat", nil)), "titles" => meta.fetch("name", nil).present? ? [{ "title" => meta.fetch("name", nil) }] : nil, - "creator" => author, - "contributor" => contributor, + "creators" => creators, + "contributors" => contributors, "publisher" => publisher, "agency" => parse_attributes(meta.fetch("provider", nil), content: "name", first: true), "periodical" => periodical, "related_identifiers" => related_identifiers, "publication_year" => publication_year,