ma.glasnost.orika.metadata
Class ScoringClassMapBuilder.PropertyMatchingWeights

java.lang.Object
  extended by ma.glasnost.orika.metadata.ScoringClassMapBuilder.PropertyMatchingWeights
Enclosing class:
ScoringClassMapBuilder<A,B>

public static final class ScoringClassMapBuilder.PropertyMatchingWeights
extends Object

PropertyMatchingWeights is a class used to describe how different matching scenarios should be weighted when computing a match score for a set of properties.

Author:
matt.deboer@gmail.com

Constructor Summary
ScoringClassMapBuilder.PropertyMatchingWeights()
           
 
Method Summary
 double commonWordCount()
           
 ScoringClassMapBuilder.PropertyMatchingWeights commonWordCount(double weight)
          Set the weight associated with the number of words found in common between two property expressions
 double containsName()
           
 ScoringClassMapBuilder.PropertyMatchingWeights containsName(double weight)
          Set the weight associated with one property containing the entire name of another property.
 double editDistance()
           
 ScoringClassMapBuilder.PropertyMatchingWeights editDistance(double weight)
          Set the weight associated with the edit distance between words in two property expressions
 double minimumScore()
           
 ScoringClassMapBuilder.PropertyMatchingWeights minimumScore(double weight)
          Set the weight applied to the minimum score needed to accept a given match; setting higher values makes the matching more restrictive, lower scores make matching more lenient.
 double nestedDepth()
           
 ScoringClassMapBuilder.PropertyMatchingWeights nestedDepth(double weight)
          Set the weight modifier associated with a property word's edit distance based on it's nesting depth; higher values here causes the matching to be more focused toward the final name of a nested property, lower values focus on the entire name more evenly
 double typeMatch()
           
 ScoringClassMapBuilder.PropertyMatchingWeights typeMatch(double weight)
          Set the weight associated with one property matching the type of the other
 double unmatchedWords()
           
 ScoringClassMapBuilder.PropertyMatchingWeights unmatchedWords(double weight)
          Set the weight associated with the number of unmatched words between two property expressions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScoringClassMapBuilder.PropertyMatchingWeights

public ScoringClassMapBuilder.PropertyMatchingWeights()
Method Detail

commonWordCount

public double commonWordCount()
Returns:
the weight associated with the number of words found in common between two property expressions

commonWordCount

public ScoringClassMapBuilder.PropertyMatchingWeights commonWordCount(double weight)
Set the weight associated with the number of words found in common between two property expressions

Parameters:
weight - the weight associated with the number of words found in common
Returns:
this instance of PropertyMatchingWeights between two property expressions

containsName

public double containsName()
Returns:
the weight associated with one property containing the entire name of another property

containsName

public ScoringClassMapBuilder.PropertyMatchingWeights containsName(double weight)
Set the weight associated with one property containing the entire name of another property.

Parameters:
weight - the weight associated with one property containing the entire name of another property
Returns:
this instance of PropertyMatchingWeights

typeMatch

public double typeMatch()
Returns:
the weight associated with one property matching the type of the other

typeMatch

public ScoringClassMapBuilder.PropertyMatchingWeights typeMatch(double weight)
Set the weight associated with one property matching the type of the other

Parameters:
weight - the weight associated with one property matching the type of the other
Returns:
this instance of PropertyMatchingWeights

nestedDepth

public double nestedDepth()
Returns:
the weight modifier associated with a property word's edit distance based on it's nesting depth

nestedDepth

public ScoringClassMapBuilder.PropertyMatchingWeights nestedDepth(double weight)
Set the weight modifier associated with a property word's edit distance based on it's nesting depth; higher values here causes the matching to be more focused toward the final name of a nested property, lower values focus on the entire name more evenly

Parameters:
weight - the weight modifier associated with a property word's edit distance based on it's nesting depth
Returns:
this instance of PropertyMatchingWeights

unmatchedWords

public double unmatchedWords()
Returns:
the weight associated with the number of unmatched words between two property expressions

unmatchedWords

public ScoringClassMapBuilder.PropertyMatchingWeights unmatchedWords(double weight)
Set the weight associated with the number of unmatched words between two property expressions

Parameters:
weight - the weight associated with the number of unmatched words between two property expressions
Returns:
this instance of PropertyMatchingWeights

editDistance

public double editDistance()
Returns:
the weight associated with the edit distance between words in two property expressions

editDistance

public ScoringClassMapBuilder.PropertyMatchingWeights editDistance(double weight)
Set the weight associated with the edit distance between words in two property expressions

Parameters:
weight - the weight associated with the edit distance between words in two property expressions
Returns:
this instance of PropertyMatchingWeights

minimumScore

public double minimumScore()
Returns:
the weight applied to the minimum score needed to accept a given match

minimumScore

public ScoringClassMapBuilder.PropertyMatchingWeights minimumScore(double weight)
Set the weight applied to the minimum score needed to accept a given match; setting higher values makes the matching more restrictive, lower scores make matching more lenient.

Parameters:
weight - the weight applied to the minimum score needed to accept a given match
Returns:
this instance of PropertyMatchingWeights


Copyright © 2013 Glasnost. All Rights Reserved.