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.
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for constructing anAuthorMatcherStep. -
Method Summary
Modifier and TypeMethodDescriptionstatic <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.java.util.function.Predicate<List<AuthorMatch<BA, EA>>> Gets the exclusion predicate used in this step.Gets the matching function used in this step.getName()Gets the name of this matching step.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.
-
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
-
getExclusionPredicate
Gets the exclusion predicate used in this step.- Returns:
- The exclusion predicate.
-
getName
Gets the name of this matching step.- Returns:
- The name of the matching step.
-