Package com.senzing.g2.engine.plugin
Class G2ScoringPlugin.ScoringContext
- java.lang.Object
-
- com.senzing.g2.engine.plugin.G2ScoringPlugin.ScoringContext
-
- Enclosing interface:
- G2ScoringPlugin
public static class G2ScoringPlugin.ScoringContext extends Object
Context for scoring.
-
-
Constructor Summary
Constructors Constructor Description ScoringContext(FeatureInfo feature1, FeatureInfo feature2)
Constructs with the features to compare for scoring.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getErrorMessage()
Get the error message (if any).FeatureInfo
getFeature1()
Gets the first feature to compare for scoring.FeatureInfo
getFeature2()
Gets the second feature to compare for scoring.Map<String,String>
getResults()
Returns aMap
which can be directly modified to set the results for this context.void
setErrorMessage(String message)
Sets the error message (if any).
-
-
-
Constructor Detail
-
ScoringContext
public ScoringContext(FeatureInfo feature1, FeatureInfo feature2)
Constructs with the features to compare for scoring.- Parameters:
feature1
- The first feature to compare.feature2
- The second feature to compare.
-
-
Method Detail
-
getFeature1
public FeatureInfo getFeature1()
Gets the first feature to compare for scoring.- Returns:
- The first feature to compare for scoring.
-
getFeature2
public FeatureInfo getFeature2()
Gets the second feature to compare for scoring.- Returns:
- The second feature to compare for scoring.
-
getErrorMessage
public String getErrorMessage()
Get the error message (if any).- Returns:
- The error message that was set or
null
if no error.
-
setErrorMessage
public void setErrorMessage(String message)
Sets the error message (if any).- Parameters:
message
- The error message to set if an error occurs, ornull
to clear an error.
-
-