lib/bolognese/readers/schema_org_reader.rb in bolognese-1.0.4 vs lib/bolognese/readers/schema_org_reader.rb in bolognese-1.0.5
- old
+ new
@@ -60,11 +60,11 @@
"bibtex" => Bolognese::Utils::SO_TO_BIB_TRANSLATIONS[type] || "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)))
- editor = get_authors(from_schema_org(Array.wrap(meta.fetch("editor", nil))))
+ contributor = get_authors(from_schema_org(Array.wrap(meta.fetch("editor", nil))))
publisher = parse_attributes(meta.fetch("publisher", nil), content: "name", first: true)
ct = (type == "Dataset") ? "includedInDataCatalog" : "Periodical"
periodical = if meta.fetch(ct, nil).present?
{
@@ -134,10 +134,10 @@
"content_url" => Array.wrap(meta.fetch("contentUrl", nil)).unwrap,
"size" => meta.fetch("contenSize", nil),
"formats" => Array.wrap(meta.fetch("encodingFormat", nil) || meta.fetch("fileFormat", nil)).unwrap,
"title" => meta.fetch("name", nil).present? ? [{ "text" => meta.fetch("name", nil) }] : nil,
"creator" => author,
- "editor" => editor,
+ "contributor" => contributor,
"publisher" => publisher,
"service_provider" => parse_attributes(meta.fetch("provider", nil), content: "name", first: true),
"periodical" => periodical,
"related_identifiers" => related_identifiers,
"publication_year" => publication_year,