[dumpCSV] remove not needed code
This commit is contained in:
parent
0482648131
commit
2566b97138
|
@ -150,9 +150,9 @@ public class SparkDumpResults implements Serializable {
|
||||||
ar.setRank(String.valueOf(count));
|
ar.setRank(String.valueOf(count));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ar.setFirstName(replace(a.getName()));
|
ar.setFirstName(removeBreaks(a.getName()));
|
||||||
ar.setLastName(replace(a.getSurname()));
|
ar.setLastName(removeBreaks(a.getSurname()));
|
||||||
ar.setFullName(replace(a.getFullname()));
|
ar.setFullName(removeBreaks(a.getFullname()));
|
||||||
Tuple2<String, Boolean> orcid = getOrcid(a.getPid());
|
Tuple2<String, Boolean> orcid = getOrcid(a.getPid());
|
||||||
if (Optional.ofNullable(orcid).isPresent()) {
|
if (Optional.ofNullable(orcid).isPresent()) {
|
||||||
ar.setOrcid(orcid._1());
|
ar.setOrcid(orcid._1());
|
||||||
|
@ -217,13 +217,6 @@ public class SparkDumpResults implements Serializable {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String replace(String input) {
|
|
||||||
if (Optional.ofNullable(input).isPresent())
|
|
||||||
return input.replace("\t", " ").replace("\n", " ").replace("\r", " ").replace("\"", " ");
|
|
||||||
else
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<CSVPid> mapPid(List<StructuredProperty> pid, String resultId) {
|
private static List<CSVPid> mapPid(List<StructuredProperty> pid, String resultId) {
|
||||||
return pid
|
return pid
|
||||||
.stream()
|
.stream()
|
||||||
|
@ -354,7 +347,8 @@ public class SparkDumpResults implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String removeBreaks(String input) {
|
private static String removeBreaks(String input) {
|
||||||
return input.replace("\n", " ").replace("\t", " ")
|
return input.replace("\n", " ")
|
||||||
|
.replace("\t", " ")
|
||||||
.replace("\r", " ")
|
.replace("\r", " ")
|
||||||
.replace("\\\"", " ")
|
.replace("\\\"", " ")
|
||||||
.replace("\"", " ")
|
.replace("\"", " ")
|
||||||
|
|
Loading…
Reference in New Issue