2020-06-08 15:11:37 +02:00
|
|
|
|
2020-08-12 18:16:45 +02:00
|
|
|
package eu.dnetlib.dhp.schema.dump.oaf.community;
|
|
|
|
|
2020-06-09 15:37:46 +02:00
|
|
|
import java.util.List;
|
2020-07-24 17:23:57 +02:00
|
|
|
import java.util.Objects;
|
2020-06-09 15:37:46 +02:00
|
|
|
|
2020-08-13 17:06:49 +02:00
|
|
|
import eu.dnetlib.dhp.schema.dump.oaf.Provenance;
|
|
|
|
import eu.dnetlib.dhp.schema.dump.oaf.Qualifier;
|
|
|
|
|
|
|
|
/**
|
2020-08-13 17:17:49 +02:00
|
|
|
* Reference to a relevant research infrastructure, initiative or community (RI/RC) among those collaborating with OpenAIRE.
|
|
|
|
* It extend eu.dnetlib.dhp.shema.dump.oaf.Qualifier with a parameter provenance of type
|
|
|
|
* List<eu.dnetlib.dhp.schema.dump.oaf.Provenance> to store the provenances of the association between the result
|
|
|
|
* and the RC/RI. The values for this element correspond to:
|
|
|
|
* - code: it corresponds to the id of the context in the result to be mapped.
|
|
|
|
* If the context id refers to a RC/RI and contains '::' only the part of the id before the first "::"
|
|
|
|
* will be used as value for code
|
2020-08-13 17:06:49 +02:00
|
|
|
* - label it corresponds to the label associated to the id. The information id taken from the profile of the RC/RI
|
2020-08-13 17:17:49 +02:00
|
|
|
* - provenance it is set only if the dataInfo associated to the contenxt element of the result to be dumped
|
|
|
|
* is not null. For each dataInfo one instance of type eu.dnetlib.dhp.schema.dump.oaf.Provenance
|
|
|
|
* is instantiated if the element datainfo.provenanceaction is not null. In this case
|
2020-08-13 17:06:49 +02:00
|
|
|
* - provenance corresponds to dataInfo.provenanceaction.classname
|
|
|
|
* - trust corresponds to dataInfo.trust
|
|
|
|
*/
|
2020-06-08 15:11:37 +02:00
|
|
|
public class Context extends Qualifier {
|
2020-07-20 17:46:27 +02:00
|
|
|
private List<Provenance> provenance;
|
2020-06-08 15:11:37 +02:00
|
|
|
|
2020-07-20 17:46:27 +02:00
|
|
|
public List<Provenance> getProvenance() {
|
2020-06-08 15:11:37 +02:00
|
|
|
return provenance;
|
|
|
|
}
|
|
|
|
|
2020-07-20 17:46:27 +02:00
|
|
|
public void setProvenance(List<Provenance> provenance) {
|
2020-06-08 15:11:37 +02:00
|
|
|
this.provenance = provenance;
|
|
|
|
}
|
2020-07-24 17:23:57 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public int hashCode() {
|
|
|
|
String provenance = new String();
|
|
|
|
this.provenance.forEach(p -> provenance.concat(p.toString()));
|
|
|
|
return Objects.hash(getCode(), getLabel(), provenance);
|
|
|
|
}
|
|
|
|
|
2020-06-08 15:11:37 +02:00
|
|
|
}
|