changed to consider and logic within constraints

This commit is contained in:
Miriam Baglioni 2020-11-18 12:12:48 +01:00
parent a708652093
commit a4781ddf65
1 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package eu.dnetlib.dhp.oa.graph.clean.authorpids;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.Map;
import eu.dnetlib.dhp.oa.graph.clean.authorpids.constraints.ConstraintResolver; import eu.dnetlib.dhp.oa.graph.clean.authorpids.constraints.ConstraintResolver;
import eu.dnetlib.dhp.oa.graph.clean.authorpids.constraints.Selection; import eu.dnetlib.dhp.oa.graph.clean.authorpids.constraints.Selection;
@ -48,7 +49,7 @@ public class Constraints implements Serializable {
selection = resolver.getSelectionCriteria(verb, value); selection = resolver.getSelectionCriteria(verb, value);
} }
public boolean verifyCriteria(String metadata) { public boolean verifyCriteria(Map<String, String> metadata) {
return selection.apply(metadata); return selection.apply(metadata.get(field));
} }
} }