changed the definition of the model to intesert porvenance information to some classes

This commit is contained in:
Miriam Baglioni 2020-07-24 17:23:57 +02:00
parent c0f3059676
commit 00f2b8410a
6 changed files with 122 additions and 61 deletions

View File

@ -2,6 +2,7 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.util.List;
import java.util.Objects;
public class Context extends Qualifier {
private List<Provenance> provenance;
@ -13,4 +14,15 @@ public class Context extends Qualifier {
public void setProvenance(List<Provenance> provenance) {
this.provenance = provenance;
}
@Override
public int hashCode() {
String provenance = new String();
this.provenance.forEach(p -> provenance.concat(p.toString()));
return Objects.hash(getCode(), getLabel(), provenance);
}
}

View File

@ -1,3 +1,4 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;

View File

@ -1,3 +1,4 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
@ -28,4 +29,8 @@ public class Provenance implements Serializable {
p.trust = trust;
return p;
}
public String toString(){
return provenance + trust;
}
}

View File

@ -4,7 +4,9 @@ package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;
import java.util.List;
public class Result extends OafEntity implements Serializable {
import eu.dnetlib.dhp.schema.dump.oaf.community.Project;
public class Result implements Serializable {
private List<Author> author;
@ -40,8 +42,6 @@ public class Result extends OafEntity implements Serializable {
private AccessRight bestaccessright;
private List<Context> context;
private List<ExternalReference> externalReference;
private List<Instance> instance;
@ -66,6 +66,56 @@ public class Result extends OafEntity implements Serializable {
private List<GeoLocation> geolocation; // dataset
private String id;
private List<String> originalId;
private List<ControlledField> pid;
private String dateofcollection;
private Long lastupdatetimestamp;
public Long getLastupdatetimestamp() {
return lastupdatetimestamp;
}
public void setLastupdatetimestamp(Long lastupdatetimestamp) {
this.lastupdatetimestamp = lastupdatetimestamp;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public List<String> getOriginalId() {
return originalId;
}
public void setOriginalId(List<String> originalId) {
this.originalId = originalId;
}
public List<ControlledField> getPid() {
return pid;
}
public void setPid(List<ControlledField> pid) {
this.pid = pid;
}
public String getDateofcollection() {
return dateofcollection;
}
public void setDateofcollection(String dateofcollection) {
this.dateofcollection = dateofcollection;
}
public List<Author> getAuthor() {
return author;
}
@ -202,14 +252,6 @@ public class Result extends OafEntity implements Serializable {
this.bestaccessright = bestaccessright;
}
public List<Context> getContext() {
return context;
}
public void setContext(List<Context> context) {
this.context = context;
}
public List<ExternalReference> getExternalReference() {
return externalReference;
}

View File

@ -1,3 +1,4 @@
package eu.dnetlib.dhp.schema.dump.oaf;
import java.io.Serializable;