Class FeatureBaseComparator

  • All Implemented Interfaces:
    Comparator<Feature>
    Direct Known Subclasses:
    UnambiguousFeatureBaseComparator

    public class FeatureBaseComparator
    extends Object
    implements Comparator<Feature>
    feature comparator. It will look first at the feature shortnames (case insensitive). Then, it will compare the feature types using a UnambiguousCvTermComparator. If the feature types are the same, it will compare interactionEffect and then interactionDependency using UnambiguousCvTermComparator. Then it will compare interpro identifier and if the features do not have an interpro identifier, it will look for at the identifiers in the feature identifiers using UnambiguousIdentifierComparator. Finally, it will look at the ranges using UnambiguousRangeComparator.
    Since:
    16/01/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Method Detail

      • getExternalIdentifierCollectionComparator

        public CollectionComparator<Xref> getExternalIdentifierCollectionComparator()

        Getter for the field externalIdentifierCollectionComparator.

        Returns:
        a CollectionComparator object.
      • compare

        public int compare​(Feature feature1,
                           Feature feature2)
        It will look first at the feature shortnames (case insensitive). Then, it will compare the feature types using a UnambiguousCvTermComparator. If the feature types are the same, it will compare interactionEffect and then interactionDependency using UnambiguousCvTermComparator. Then it will compare interpro identifier and if the features do not have an interpro identifier, it will look for at the identifiers in the feature identifiers using UnambiguousIdentifierComparator. Finally, it will look at the ranges using UnambiguousRangeComparator.
        Specified by:
        compare in interface Comparator<Feature>
        Parameters:
        feature1 - a Feature object.
        feature2 - a Feature object.
        Returns:
        a int.
      • getCvTermComparator

        public Comparator<CvTerm> getCvTermComparator()

        Getter for the field cvTermComparator.

        Returns:
        a Comparator object.
      • getIdentifierComparator

        public Comparator<Xref> getIdentifierComparator()

        Getter for the field identifierComparator.

        Returns:
        a Comparator object.