Class GoogleBitstreamComparator

java.lang.Object
org.dspace.app.util.GoogleBitstreamComparator
All Implemented Interfaces:
Comparator<Bitstream>

public class GoogleBitstreamComparator extends Object implements 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 Details

    • GoogleBitstreamComparator

      public GoogleBitstreamComparator(Context context, Map<String,String> googleScholarSettings)
  • Method Details

    • compare

      public int compare(Bitstream b1, Bitstream b2)
      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:
      compare in interface Comparator<Bitstream>
      Parameters:
      b1 - first bitstream
      b2 - second bitstream
      Returns: