Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #804 from zinggAI/selectCols
overloaded getPairs getActualDupes method and event listener bugs removed
- Loading branch information
Showing
7 changed files
with
115 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
common/client/src/main/java/zingg/common/client/cols/PredictionColsSelector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package zingg.common.client.cols; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import zingg.common.client.util.ColName; | ||
|
||
public class PredictionColsSelector extends SelectedCols { | ||
|
||
public PredictionColsSelector() { | ||
|
||
List<String> cols = new ArrayList<String>(); | ||
cols.add(ColName.ID_COL); | ||
cols.add(ColName.COL_PREFIX + ColName.ID_COL); | ||
cols.add(ColName.PREDICTION_COL); | ||
cols.add(ColName.SCORE_COL); | ||
|
||
setCols(cols); | ||
|
||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
common/core/src/main/java/zingg/common/core/filter/IFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package zingg.common.core.filter; | ||
|
||
import zingg.common.client.ZFrame; | ||
|
||
public interface IFilter<D, R, C> { | ||
|
||
public ZFrame<D, R, C> filter(ZFrame<D, R, C> df); | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
common/core/src/main/java/zingg/common/core/filter/PredictionFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package zingg.common.core.filter; | ||
|
||
import org.apache.commons.logging.Log; | ||
import org.apache.commons.logging.LogFactory; | ||
|
||
import zingg.common.client.ZFrame; | ||
import zingg.common.client.util.ColName; | ||
import zingg.common.client.util.ColValues; | ||
|
||
public class PredictionFilter<D, R, C> implements IFilter<D, R, C> { | ||
|
||
public static final Log LOG = LogFactory.getLog(PredictionFilter.class); | ||
|
||
public PredictionFilter() { | ||
super(); | ||
} | ||
|
||
@Override | ||
public ZFrame<D, R, C> filter(ZFrame<D, R, C> dupes) { | ||
dupes = filterMatches(dupes); | ||
return dupes; | ||
} | ||
|
||
protected ZFrame<D, R, C> filterMatches(ZFrame<D, R, C> dupes) { | ||
dupes = dupes.filter(dupes.equalTo(ColName.PREDICTION_COL,ColValues.IS_MATCH_PREDICTION)); | ||
return dupes; | ||
} | ||
|
||
} |