refactoring after compilation

This commit is contained in:
Miriam Baglioni 2023-04-06 14:45:01 +02:00
parent 831055a1fc
commit c6a7602b3e
5 changed files with 41 additions and 43 deletions

View File

@ -58,9 +58,12 @@ public class MakeTarArchive implements Serializable {
makeTArArchive(fileSystem, inputPath, outputPath, gBperSplit, rename); makeTArArchive(fileSystem, inputPath, outputPath, gBperSplit, rename);
} }
public static void makeTArArchive(FileSystem fileSystem, String inputPath, String outputPath, int gBperSplit) throws IOException{
makeTArArchive(fileSystem,inputPath,outputPath,gBperSplit,false); public static void makeTArArchive(FileSystem fileSystem, String inputPath, String outputPath, int gBperSplit)
throws IOException {
makeTArArchive(fileSystem, inputPath, outputPath, gBperSplit, false);
} }
public static void makeTArArchive(FileSystem fileSystem, String inputPath, String outputPath, int gBperSplit, public static void makeTArArchive(FileSystem fileSystem, String inputPath, String outputPath, int gBperSplit,
boolean rename) boolean rename)
throws IOException { throws IOException {

View File

@ -25,7 +25,7 @@ public class Community implements Serializable {
return !getSubjects().isEmpty() return !getSubjects().isEmpty()
|| !getProviders().isEmpty() || !getProviders().isEmpty()
|| !getZenodoCommunities().isEmpty() || !getZenodoCommunities().isEmpty()
|| getConstraints().getCriteria() != null; || getConstraints().getCriteria() != null;
} }
public String getId() { public String getId() {

View File

@ -139,7 +139,7 @@ public class ResultTagger implements Serializable {
.getSelectionConstraintsMap() .getSelectionConstraintsMap()
.keySet() .keySet()
.forEach(communityId -> { .forEach(communityId -> {
if (conf.getSelectionConstraintsMap().get(communityId) != null && if (conf.getSelectionConstraintsMap().get(communityId).getCriteria() != null &&
conf conf
.getSelectionConstraintsMap() .getSelectionConstraintsMap()
.get(communityId) .get(communityId)

View File

@ -1,8 +1,8 @@
package eu.dnetlib.dhp.bulktag.criteria; package eu.dnetlib.dhp.bulktag.criteria;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @author miriam.baglioni * @author miriam.baglioni
* @Date 06/04/23 * @Date 06/04/23
@ -10,25 +10,25 @@ import java.io.Serializable;
@VerbClass("starts_with_caseinsensitive") @VerbClass("starts_with_caseinsensitive")
public class StartsWithIgnoreCaseVerb implements Selection, Serializable { public class StartsWithIgnoreCaseVerb implements Selection, Serializable {
private String param; private String param;
public StartsWithIgnoreCaseVerb() { public StartsWithIgnoreCaseVerb() {
} }
public StartsWithIgnoreCaseVerb(final String param) { public StartsWithIgnoreCaseVerb(final String param) {
this.param = param; this.param = param;
} }
@Override @Override
public boolean apply(String value) { public boolean apply(String value) {
return value.toLowerCase().startsWith(param.toLowerCase()); return value.toLowerCase().startsWith(param.toLowerCase());
} }
public String getParam() { public String getParam() {
return param; return param;
} }
public void setParam(String param) { public void setParam(String param) {
this.param = param; this.param = param;
} }
} }

View File

@ -1,3 +1,4 @@
package eu.dnetlib.dhp.bulktag.criteria; package eu.dnetlib.dhp.bulktag.criteria;
import java.io.Serializable; import java.io.Serializable;
@ -9,31 +10,25 @@ import java.io.Serializable;
@VerbClass("starts_with") @VerbClass("starts_with")
public class StartsWithVerb implements Selection, Serializable { public class StartsWithVerb implements Selection, Serializable {
private String param; private String param;
public StartsWithVerb() { public StartsWithVerb() {
} }
public StartsWithVerb(final String param) { public StartsWithVerb(final String param) {
this.param = param; this.param = param;
} }
@Override @Override
public boolean apply(String value) { public boolean apply(String value) {
return value.startsWith(param); return value.startsWith(param);
} }
public String getParam() { public String getParam() {
return param; return param;
} }
public void setParam(String param) { public void setParam(String param) {
this.param = param; this.param = param;
} }
} }