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.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
public class DataInfo implements Serializable {
|
public class DataInfo implements Serializable {
|
||||||
|
|
||||||
private Boolean inferred;
|
private Boolean inferred;
|
||||||
private float trust;
|
private Float trust;
|
||||||
private String inferenceprovenance;
|
private String inferenceprovenance;
|
||||||
private Qualifier provenanceaction;
|
private Qualifier provenanceaction;
|
||||||
|
|
||||||
|
@ -20,11 +19,11 @@ public class DataInfo implements Serializable {
|
||||||
this.inferred = inferred;
|
this.inferred = inferred;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getTrust() {
|
public Float getTrust() {
|
||||||
return trust;
|
return trust;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTrust(float trust) {
|
public void setTrust(Float trust) {
|
||||||
this.trust = trust;
|
this.trust = trust;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,46 @@ package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.util.Objects;
|
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 invisible = false;
|
||||||
private Boolean deletedbyinference = 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() {
|
public Boolean getInvisible() {
|
||||||
return invisible;
|
return invisible;
|
||||||
}
|
}
|
||||||
|
@ -30,14 +65,18 @@ public class EntityDataInfo extends DataInfo {
|
||||||
if (o == null || getClass() != o.getClass())
|
if (o == null || getClass() != o.getClass())
|
||||||
return false;
|
return false;
|
||||||
EntityDataInfo dataInfo = (EntityDataInfo) o;
|
EntityDataInfo dataInfo = (EntityDataInfo) o;
|
||||||
return super.equals(o) && Objects.equals(invisible, dataInfo.invisible)
|
return Objects.equals(inferred, dataInfo.inferred)
|
||||||
&& Objects.equals(deletedbyinference, dataInfo.deletedbyinference);
|
&& 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
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects
|
return Objects.hash(
|
||||||
.hash(super.hashCode(), invisible, deletedbyinference);
|
inferred, trust, inferenceprovenance, provenanceaction, deletedbyinference, invisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue