Class CuratedPublicationComparator

  • All Implemented Interfaces:
    Comparator<Publication>
    Direct Known Subclasses:
    UnambiguousCuratedPublicationComparator

    public class CuratedPublicationComparator
    extends Object
    implements Comparator<Publication>
    Simple comparator for curated publications. It uses a AbstractPublicationComparator to compares the bibliographic details and then will compare first the curation depth, then the source and then the released date.
    Since:
    21/12/12
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Constructor Detail

      • CuratedPublicationComparator

        public CuratedPublicationComparator​(Comparator<Publication> pubComparator,
                                            Comparator<CvTerm> sourceComparator)
        Creates a new CuratedPublicationComparator.
        Parameters:
        pubComparator - : the comparator for the publication (not curation information). It is required
        sourceComparator - : the source comparator
    • Method Detail

      • getPublicationComparator

        public Comparator<Publication> getPublicationComparator()

        Getter for the field publicationComparator.

        Returns:
        a Comparator object.
      • getSourceComparator

        public Comparator<CvTerm> getSourceComparator()

        Getter for the field sourceComparator.

        Returns:
        a Comparator object.
      • compare

        public int compare​(Publication publication1,
                           Publication publication2)
        It uses a AbstractPublicationComparator to compares the bibliographic details and then will compare first the curation depth, then the source and then the released date.
        Specified by:
        compare in interface Comparator<Publication>
        Parameters:
        publication1 - a Publication object.
        publication2 - a Publication object.
        Returns:
        a int.