bulkTaggingPathMapExtention #381
|
@ -95,7 +95,7 @@ public class SparkAtomicActionScoreJob implements Serializable {
|
||||||
|
|
||||||
return projectScores.map((MapFunction<BipProjectModel, Project>) bipProjectScores -> {
|
return projectScores.map((MapFunction<BipProjectModel, Project>) bipProjectScores -> {
|
||||||
Project project = new Project();
|
Project project = new Project();
|
||||||
project.setId(bipProjectScores.getProjectId());
|
//project.setId(bipProjectScores.getProjectId());
|
||||||
project.setMeasures(bipProjectScores.toMeasures());
|
project.setMeasures(bipProjectScores.toMeasures());
|
||||||
return project;
|
return project;
|
||||||
}, Encoders.bean(Project.class))
|
}, Encoders.bean(Project.class))
|
||||||
|
|
|
@ -38,18 +38,8 @@ public class ExecSubstringAction implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String execSubstring() {
|
public String execSubstring() {
|
||||||
int to = Integer.valueOf(this.to);
|
|
||||||
int from = Integer.valueOf(this.from);
|
|
||||||
|
|
||||||
if (to < from || from > this.value.length())
|
return this.value.substring(Integer.valueOf(this.from), Integer.valueOf(this.to));
|
||||||
return "";
|
|
||||||
|
|
||||||
if (from < 0)
|
|
||||||
from = 0;
|
|
||||||
if (to > this.value.length())
|
|
||||||
to = this.value.length();
|
|
||||||
|
|
||||||
return this.value.substring(from, to);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue