Class AuthorMatcherStep<BA,EA>

java.lang.Object
eu.openaire.common.author.AuthorMatcherStep<BA,EA>
Type Parameters:
BA - The type containing the base author data.
EA - The type containing the enriching author data.

public class AuthorMatcherStep<BA,EA> extends Object
Represents a step in the author matching process, which applies a specific matching logic between a base author (BA) and an enriching author (EA).

This class encapsulates a matching function, an exclusion predicate, and a name for the matching step. It allows defining different strategies for comparing authors, such as full name matching and abbreviation-based matching.

  • Method Details

    • stringIgnoreCaseMatcher

      public static <BA, EA> AuthorMatcherStep.Builder<BA,EA> stringIgnoreCaseMatcher(java.util.function.Function<BA,String> ex1, java.util.function.Function<EA,String> ex2)
      Creates a builder for a matching step that compares strings ignoring case.
      Type Parameters:
      BA - The type of the base author.
      EA - The type of the enriching author.
      Parameters:
      ex1 - Function to extract the string from a base author.
      ex2 - Function to extract the string from an enriching author.
      Returns:
      A builder to further configure the matching step.
    • abbreviationsMatcher

      public static <BA, EA> AuthorMatcherStep.Builder<BA,EA> abbreviationsMatcher(java.util.function.Function<BA,String> ex1, java.util.function.Function<EA,String> ex2)
      Creates a builder for a matching step that compares names based on abbreviations.
      Type Parameters:
      BA - The type of the base author.
      EA - The type of the enriching author.
      Parameters:
      ex1 - Function to extract the author name from a base author.
      ex2 - Function to extract the author name from an enriching author.
      Returns:
      A builder to further configure the matching step.
    • getMatchingFunc

      public java.util.function.BiFunction<BA,EA,Optional<AuthorMatch<BA,EA>>> getMatchingFunc()
      Gets the matching function used in this step.
      Returns:
      The matching function.
    • getExclusionPredicate

      public java.util.function.Predicate<List<AuthorMatch<BA,EA>>> getExclusionPredicate()
      Gets the exclusion predicate used in this step.
      Returns:
      The exclusion predicate.
    • getName

      public String getName()
      Gets the name of this matching step.
      Returns:
      The name of the matching step.