Skip to content

Commit

Permalink
[DS-2679] Retain ordering of authors for Google Scholar metatags.
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-scheible authored and alanorth committed Feb 29, 2016
1 parent 8173cdc commit 7cb6790
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dspace-api/src/main/java/org/dspace/app/util/GoogleMetadata.java
Expand Up @@ -28,6 +28,7 @@
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;
Expand Down Expand Up @@ -757,16 +758,17 @@ private void parseItem()
}

/**
* 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();
}

/**
Expand Down

0 comments on commit 7cb6790

Please sign in to comment.