[dump] removed usage stats info from the datasource and project

This commit is contained in:
Miriam Baglioni 2023-07-11 12:40:21 +02:00
parent 8661bc0c90
commit 95125d704a
4 changed files with 40 additions and 40 deletions

View File

@ -129,16 +129,16 @@ public class Datasource implements Serializable {
@JsonSchema(description = "Information about the journal, if this data source is of type Journal.")
private Container journal; // issn etc del Journal
@JsonSchema(description = "Indicators computed for this Datasource, for example UsageCount ones")
private Indicator indicators;
public Indicator getIndicators() {
return indicators;
}
public void setIndicators(Indicator indicators) {
this.indicators = indicators;
}
// @JsonSchema(description = "Indicators computed for this Datasource, for example UsageCount ones")
// private Indicator indicators;
//
// public Indicator getIndicators() {
// return indicators;
// }
//
// public void setIndicators(Indicator indicators) {
// this.indicators = indicators;
// }
public String getId() {
return id;

View File

@ -70,16 +70,16 @@ public class Project implements Serializable {
@JsonSchema(description = "The h2020 programme funding the project")
private List<Programme> h2020programme;
@JsonSchema(description = "Indicators computed for this project, for example UsageCount ones")
private Indicator indicators;
public Indicator getIndicators() {
return indicators;
}
public void setIndicators(Indicator indicators) {
this.indicators = indicators;
}
// @JsonSchema(description = "Indicators computed for this project, for example UsageCount ones")
// private Indicator indicators;
//
// public Indicator getIndicators() {
// return indicators;
// }
//
// public void setIndicators(Indicator indicators) {
// this.indicators = indicators;
// }
public String getId() {
return id;

View File

@ -173,20 +173,20 @@ public class ResultMapper implements Serializable {
.ifPresent(
value -> value
.stream()
.filter(
s -> !((s.getQualifier().getClassid().equalsIgnoreCase("fos") &&
Optional.ofNullable(s.getDataInfo()).isPresent()
&& Optional.ofNullable(s.getDataInfo().getProvenanceaction()).isPresent() &&
s.getDataInfo().getProvenanceaction().getClassid().equalsIgnoreCase("subject:fos"))
||
(s.getQualifier().getClassid().equalsIgnoreCase("sdg") &&
Optional.ofNullable(s.getDataInfo()).isPresent()
&& Optional.ofNullable(s.getDataInfo().getProvenanceaction()).isPresent() &&
s
.getDataInfo()
.getProvenanceaction()
.getClassid()
.equalsIgnoreCase("subject:sdg"))))
// .filter(
// s -> !((s.getQualifier().getClassid().equalsIgnoreCase("fos") &&
// Optional.ofNullable(s.getDataInfo()).isPresent()
// && Optional.ofNullable(s.getDataInfo().getProvenanceaction()).isPresent() &&
// s.getDataInfo().getProvenanceaction().getClassid().equalsIgnoreCase("subject:fos"))
// ||
// (s.getQualifier().getClassid().equalsIgnoreCase("sdg") &&
// Optional.ofNullable(s.getDataInfo()).isPresent()
// && Optional.ofNullable(s.getDataInfo().getProvenanceaction()).isPresent() &&
// s
// .getDataInfo()
// .getProvenanceaction()
// .getClassid()
// .equalsIgnoreCase("subject:sdg"))))
.forEach(s -> subjectList.add(getSubject(s))));
out.setSubjects(subjectList);

View File

@ -337,9 +337,9 @@ public class SparkDumpEntitiesJob implements Serializable {
.ofNullable(d.getJournal())
.ifPresent(j -> datasource.setJournal(getContainer(j)));
Optional
.ofNullable(d.getMeasures())
.ifPresent(m -> datasource.setIndicators(Utils.getIndicator(d.getMeasures())));
// Optional
// .ofNullable(d.getMeasures())
// .ifPresent(m -> datasource.setIndicators(Utils.getIndicator(d.getMeasures())));
return datasource;
@ -506,9 +506,9 @@ public class SparkDumpEntitiesJob implements Serializable {
}
project.setFunding(funList);
if (Optional.ofNullable(p.getMeasures()).isPresent()) {
project.setIndicators(Utils.getIndicator(p.getMeasures()));
}
// if (Optional.ofNullable(p.getMeasures()).isPresent()) {
// project.setIndicators(Utils.getIndicator(p.getMeasures()));
// }
return project;
}