dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/Provenance.java

50 lines
1.5 KiB
Java

package eu.dnetlib.dhp.schema.dump.oaf;
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
import java.io.Serializable;
/**
* Indicates the process that produced (or provided) the information, and the trust associated to the information. It
* has two parameters: - provenance of type String to store the provenance of the information, - trust of type String to
* store the trust associated to the information
*/
public class Provenance implements Serializable {
@JsonSchema(description="The process that produced/provided the information")
private String provenance;
@JsonSchema(description="The confidence on the goodness of the information. It is in the range [0,1]. Greater the number, more the trust. " +
"Harvested information has typically a high trust (0.9). The trust of inferred information is calculated by the inference algorithm that generated it," +
" as described in https://graph.openaire.eu/about#architecture (Enrichment --> Mining)")
private String trust;
public String getProvenance() {
return provenance;
}
public void setProvenance(String provenance) {
this.provenance = provenance;
}
public String getTrust() {
return trust;
}
public void setTrust(String trust) {
this.trust = trust;
}
public static Provenance newInstance(String provenance, String trust) {
Provenance p = new Provenance();
p.provenance = provenance;
p.trust = trust;
return p;
}
public String toString() {
return provenance + trust;
}
}