forked from D-Net/dnet-hadoop
added the ignore case for both the constraints
This commit is contained in:
parent
ec5b5c3a23
commit
457c07a522
|
@ -17,7 +17,7 @@ public class ContainsConstraint implements Selection, Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(String value) {
|
public boolean apply(String value) {
|
||||||
return value.contains(param);
|
return value.contains(param.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getParam() {
|
public String getParam() {
|
||||||
|
|
|
@ -3,6 +3,10 @@ package eu.dnetlib.dhp.oa.graph.clean.authorpids.constraints;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import py4j.StringUtil;
|
||||||
|
|
||||||
@ConstraintClass("equals")
|
@ConstraintClass("equals")
|
||||||
public class EqualConstraint implements Selection, Serializable {
|
public class EqualConstraint implements Selection, Serializable {
|
||||||
|
|
||||||
|
@ -17,7 +21,9 @@ public class EqualConstraint implements Selection, Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(String value) {
|
public boolean apply(String value) {
|
||||||
return value.equals(param);
|
if (StringUtils.isEmpty(value))
|
||||||
|
return false;
|
||||||
|
return value.equalsIgnoreCase(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getParam() {
|
public String getParam() {
|
||||||
|
|
Loading…
Reference in New Issue