[Dump] Changed the name for isgreen and isindiamonfjournal per the set methos. Dumping only the FOS level1 and level2
This commit is contained in:
parent
30d3ae6b69
commit
9a97f1423c
|
@ -56,8 +56,8 @@ public class ResultMapper implements Serializable {
|
|||
mapCountry(out, input);
|
||||
mapCoverage(out, input);
|
||||
out.setDateOfCollection(input.getDateofcollection());
|
||||
out.setGreen(input.getIsGreen());
|
||||
out.setInDiamondJournal(input.getIsInDiamondJournal());
|
||||
out.setIsGreen(input.getIsGreen());
|
||||
out.setIsInDiamondJournal(input.getIsInDiamondJournal());
|
||||
out.setPubliclyFunded(input.getPubliclyFunded());
|
||||
mapOpenAccessColor(out, input);
|
||||
mapDescription(out, input);
|
||||
|
@ -196,6 +196,10 @@ public class ResultMapper implements Serializable {
|
|||
.ifPresent(
|
||||
value -> value
|
||||
.stream()
|
||||
.filter(
|
||||
s -> !(s.getQualifier().getClassid().equalsIgnoreCase("fos")) ||
|
||||
(s.getQualifier().getClassid().equalsIgnoreCase("fos") &&
|
||||
s.getValue().split(" ")[0].trim().length() < 5))
|
||||
// .filter(
|
||||
// s -> !((s.getQualifier().getClassid().equalsIgnoreCase("fos") &&
|
||||
// Optional.ofNullable(s.getDataInfo()).isPresent()
|
||||
|
@ -226,17 +230,13 @@ public class ResultMapper implements Serializable {
|
|||
private static void mapPublisher(Result out, eu.dnetlib.dhp.schema.oaf.Result input) {
|
||||
Optional<Field<String>> oStr;
|
||||
oStr = Optional.ofNullable(input.getPublisher());
|
||||
if (oStr.isPresent()) {
|
||||
out.setPublisher(oStr.get().getValue());
|
||||
}
|
||||
oStr.ifPresent(stringField -> out.setPublisher(stringField.getValue()));
|
||||
}
|
||||
|
||||
private static void mapDateOfAcceptance(Result out, eu.dnetlib.dhp.schema.oaf.Result input) {
|
||||
Optional<Field<String>> oStr;
|
||||
oStr = Optional.ofNullable(input.getDateofacceptance());
|
||||
if (oStr.isPresent()) {
|
||||
out.setPublicationDate(oStr.get().getValue());
|
||||
}
|
||||
oStr.ifPresent(stringField -> out.setPublicationDate(stringField.getValue()));
|
||||
}
|
||||
|
||||
private static void mapPid(Result out, eu.dnetlib.dhp.schema.oaf.Result input) {
|
||||
|
@ -279,9 +279,7 @@ public class ResultMapper implements Serializable {
|
|||
|
||||
private static void mapLastUpdateTimestamp(Result out, eu.dnetlib.dhp.schema.oaf.Result input) {
|
||||
Optional<Long> oLong = Optional.ofNullable(input.getLastupdatetimestamp());
|
||||
if (oLong.isPresent()) {
|
||||
out.setLastUpdateTimeStamp(oLong.get());
|
||||
}
|
||||
oLong.ifPresent(out::setLastUpdateTimeStamp);
|
||||
}
|
||||
|
||||
private static void mapLanguage(Result out, eu.dnetlib.dhp.schema.oaf.Result input) {
|
||||
|
@ -337,9 +335,7 @@ public class ResultMapper implements Serializable {
|
|||
|
||||
private static void mapEmbargo(Result out, eu.dnetlib.dhp.schema.oaf.Result input) {
|
||||
Optional<Field<String>> oStr = Optional.ofNullable(input.getEmbargoenddate());
|
||||
if (oStr.isPresent()) {
|
||||
out.setEmbargoEndDate(oStr.get().getValue());
|
||||
}
|
||||
oStr.ifPresent(stringField -> out.setEmbargoEndDate(stringField.getValue()));
|
||||
}
|
||||
|
||||
private static void mapDescription(Result out, eu.dnetlib.dhp.schema.oaf.Result input) {
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -103,7 +103,7 @@
|
|||
<dhp.commons.lang.version>3.5</dhp.commons.lang.version>
|
||||
<dhp.guava.version>11.0.2</dhp.guava.version>
|
||||
<dhp-schemas.version>[6.1.3]</dhp-schemas.version>
|
||||
<dhp-dump-schemas.version>[8.0.0-SNAPSHOT]</dhp-dump-schemas.version>
|
||||
<dhp-dump-schemas.version>[8.0.0]</dhp-dump-schemas.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
Loading…
Reference in New Issue