From bb0ddc1c4455a85acf6b896d243192f996835ff0 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 30 Nov 2022 09:56:24 +0100 Subject: [PATCH] [BulkTag] adding verb starts_with --- .../dhp/bulktag/criteria/StartsWithVerb.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/criteria/StartsWithVerb.java diff --git a/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/criteria/StartsWithVerb.java b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/criteria/StartsWithVerb.java new file mode 100644 index 0000000000..f22e1a8647 --- /dev/null +++ b/dhp-workflows/dhp-enrichment/src/main/java/eu/dnetlib/dhp/bulktag/criteria/StartsWithVerb.java @@ -0,0 +1,30 @@ + +package eu.dnetlib.dhp.bulktag.criteria; + +import java.io.Serializable; + +@VerbClass("starts_with") +public class StartsWithVerb implements Selection, Serializable { + + private String param; + + public StartsWithVerb() { + } + + public StartsWithVerb(final String param) { + this.param = param; + } + + @Override + public boolean apply(String value) { + return value.startsWith(param); + } + + public String getParam() { + return param; + } + + public void setParam(String param) { + this.param = param; + } +}