2021-04-23 12:15:36 +02:00
|
|
|
|
|
|
|
package eu.dnetlib.dhp.schema.dump.oaf;
|
|
|
|
|
2021-11-18 09:16:59 +01:00
|
|
|
import java.io.Serializable;
|
|
|
|
|
2021-11-18 11:01:44 +01:00
|
|
|
import com.github.imifou.jsonschema.module.addon.annotation.JsonSchema;
|
|
|
|
|
2021-04-23 12:15:36 +02:00
|
|
|
/**
|
2021-11-18 09:16:59 +01:00
|
|
|
* Represents the country associated to the generic entity. It extends eu.dnetlib.dhp.schema.dump.oaf.Qualifier with a
|
2021-04-23 12:15:36 +02:00
|
|
|
* provenance parameter of type eu.dnetlib.dhp.schema.dumo.oaf.Provenance. The country in not mapped if its value in the
|
|
|
|
* result reprensented in the internal format is Unknown. The value for this element correspond to: - code corresponds
|
|
|
|
* to the classid of eu.dnetlib.dhp.schema.oaf.Country - label corresponds to the classname of
|
|
|
|
* eu.dnetlib.dhp.schema.oaf.Country - provenance set only if the dataInfo associated to the Country of the result to be
|
|
|
|
* dumped is not null. In this case : - provenance corresponds to dataInfo.provenanceaction.classid (to be modified with
|
|
|
|
* datainfo.provenanceaction.classname) - trust corresponds to dataInfo.trust
|
|
|
|
*/
|
2021-11-18 09:16:59 +01:00
|
|
|
public class Country implements Serializable {
|
|
|
|
@JsonSchema(description="ISO 3166-1 alpha-2 country code (i.e. IT)")
|
|
|
|
private String code; // the classid in the Qualifier
|
|
|
|
|
|
|
|
@JsonSchema(description="The label for that code (i.e. Italy)")
|
|
|
|
private String label; // the classname in the Qualifier
|
|
|
|
|
|
|
|
public String getCode() {
|
|
|
|
return code;
|
|
|
|
}
|
2021-04-23 12:15:36 +02:00
|
|
|
|
2021-11-18 09:16:59 +01:00
|
|
|
public void setCode(String code) {
|
|
|
|
this.code = code;
|
|
|
|
}
|
2021-04-23 12:15:36 +02:00
|
|
|
|
2021-11-18 09:16:59 +01:00
|
|
|
public String getLabel() {
|
|
|
|
return label;
|
2021-04-23 12:15:36 +02:00
|
|
|
}
|
|
|
|
|
2021-11-18 09:16:59 +01:00
|
|
|
public void setLabel(String label) {
|
|
|
|
this.label = label;
|
2021-04-23 12:15:36 +02:00
|
|
|
}
|
|
|
|
|
2021-11-18 09:16:59 +01:00
|
|
|
public static Country newInstance(String code, String label) {
|
2021-04-23 12:15:36 +02:00
|
|
|
Country c = new Country();
|
|
|
|
c.setCode(code);
|
|
|
|
c.setLabel(label);
|
|
|
|
return c;
|
|
|
|
}
|
|
|
|
|
2021-11-18 09:16:59 +01:00
|
|
|
|
2021-04-23 12:15:36 +02:00
|
|
|
|
|
|
|
}
|