neat separation between EntityDataInfo and DataInfo
This commit is contained in:
parent
bfe648193a
commit
c465b2b410
|
@ -3,12 +3,11 @@ package eu.dnetlib.dhp.schema.oaf;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class DataInfo implements Serializable {
|
||||
|
||||
private Boolean inferred;
|
||||
private float trust;
|
||||
private Float trust;
|
||||
private String inferenceprovenance;
|
||||
private Qualifier provenanceaction;
|
||||
|
||||
|
@ -20,11 +19,11 @@ public class DataInfo implements Serializable {
|
|||
this.inferred = inferred;
|
||||
}
|
||||
|
||||
public float getTrust() {
|
||||
public Float getTrust() {
|
||||
return trust;
|
||||
}
|
||||
|
||||
public void setTrust(float trust) {
|
||||
public void setTrust(Float trust) {
|
||||
this.trust = trust;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,11 +2,46 @@ package eu.dnetlib.dhp.schema.oaf;
|
|||
|
||||
import java.util.Objects;
|
||||
|
||||
public class EntityDataInfo extends DataInfo {
|
||||
|
||||
public class EntityDataInfo {
|
||||
private Boolean inferred;
|
||||
private Float trust;
|
||||
private String inferenceprovenance;
|
||||
private Qualifier provenanceaction;
|
||||
private Boolean invisible = false;
|
||||
private Boolean deletedbyinference = false;
|
||||
|
||||
public Boolean getInferred() {
|
||||
return inferred;
|
||||
}
|
||||
|
||||
public void setInferred(Boolean inferred) {
|
||||
this.inferred = inferred;
|
||||
}
|
||||
|
||||
public Float getTrust() {
|
||||
return trust;
|
||||
}
|
||||
|
||||
public void setTrust(Float trust) {
|
||||
this.trust = trust;
|
||||
}
|
||||
|
||||
public String getInferenceprovenance() {
|
||||
return inferenceprovenance;
|
||||
}
|
||||
|
||||
public void setInferenceprovenance(String inferenceprovenance) {
|
||||
this.inferenceprovenance = inferenceprovenance;
|
||||
}
|
||||
|
||||
public Qualifier getProvenanceaction() {
|
||||
return provenanceaction;
|
||||
}
|
||||
|
||||
public void setProvenanceaction(Qualifier provenanceaction) {
|
||||
this.provenanceaction = provenanceaction;
|
||||
}
|
||||
|
||||
public Boolean getInvisible() {
|
||||
return invisible;
|
||||
}
|
||||
|
@ -30,14 +65,18 @@ public class EntityDataInfo extends DataInfo {
|
|||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
EntityDataInfo dataInfo = (EntityDataInfo) o;
|
||||
return super.equals(o) && Objects.equals(invisible, dataInfo.invisible)
|
||||
&& Objects.equals(deletedbyinference, dataInfo.deletedbyinference);
|
||||
return Objects.equals(inferred, dataInfo.inferred)
|
||||
&& Objects.equals(trust, dataInfo.trust)
|
||||
&& Objects.equals(inferenceprovenance, dataInfo.inferenceprovenance)
|
||||
&& Objects.equals(provenanceaction, dataInfo.provenanceaction)
|
||||
&& Objects.equals(deletedbyinference, dataInfo.deletedbyinference)
|
||||
&& Objects.equals(invisible, dataInfo.invisible);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects
|
||||
.hash(super.hashCode(), invisible, deletedbyinference);
|
||||
return Objects.hash(
|
||||
inferred, trust, inferenceprovenance, provenanceaction, deletedbyinference, invisible);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue