Package org.dspace.app.util
Class GoogleBitstreamComparator
java.lang.Object
org.dspace.app.util.GoogleBitstreamComparator
- All Implemented Interfaces:
Comparator<Bitstream>
This comparator is used to order files of an item, so that they are ordered in a way that the first one
is the most useful for use in the citation_pdf_url for Google Scholar
-
Constructor Summary
ConstructorsConstructorDescriptionGoogleBitstreamComparator(Context context, Map<String, String> googleScholarSettings) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
GoogleBitstreamComparator
-
-
Method Details
-
compare
Compares two bitstreams based on their mimetypes, if mimetypes are the same,then the largest bitstream comes first See google-metadata.properties to define the order- Specified by:
comparein interfaceComparator<Bitstream>- Parameters:
b1- first bitstreamb2- second bitstream- Returns:
-