[DS-2679] Retain ordering of authors for Google Scholar metatags.

This commit is contained in:
Christian Scheible
2015-08-04 12:56:10 +02:00
committed by Bram Luyten
parent d83a46c823
commit b204a379f5

View File

@@ -30,6 +30,7 @@ import org.dspace.core.ConfigurationManager;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Map.Entry;
@@ -759,16 +760,17 @@ public class GoogleMetadata
}
/**
* Fetch all metadata mappings
*
* Fetch retaining the order of the values for any given key in which they
* where added (like authors).
*
* Usage: GoogleMetadata gmd = new GoogleMetadata(item); for(Entry<String,
* String> mapping : googlemd.getMappings()) { ... }
*
* @return Iterable of metadata fields mapped to Google-formatted values
*/
public Set<Entry<String, String>> getMappings()
public Collection<Entry<String, String>> getMappings()
{
return new HashSet<>(metadataMappings.entries());
return metadataMappings.entries();
}
/**