2019-10-24 11:39:41 +02:00
|
|
|
package eu.dnetlib.dhp.schema.oaf;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
import java.util.List;
|
2020-03-11 16:57:28 +01:00
|
|
|
import java.util.Objects;
|
2019-10-24 11:39:41 +02:00
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public class Organization extends OafEntity implements Serializable {
|
2019-10-24 11:39:41 +02:00
|
|
|
|
|
|
|
private Field<String> legalshortname;
|
|
|
|
|
|
|
|
private Field<String> legalname;
|
|
|
|
|
|
|
|
private List<Field<String>> alternativeNames;
|
|
|
|
|
|
|
|
private Field<String> websiteurl;
|
|
|
|
|
|
|
|
private Field<String> logourl;
|
|
|
|
|
|
|
|
private Field<String> eclegalbody;
|
|
|
|
|
|
|
|
private Field<String> eclegalperson;
|
|
|
|
|
|
|
|
private Field<String> ecnonprofit;
|
|
|
|
|
|
|
|
private Field<String> ecresearchorganization;
|
|
|
|
|
|
|
|
private Field<String> echighereducation;
|
|
|
|
|
|
|
|
private Field<String> ecinternationalorganizationeurinterests;
|
|
|
|
|
|
|
|
private Field<String> ecinternationalorganization;
|
|
|
|
|
|
|
|
private Field<String> ecenterprise;
|
|
|
|
|
|
|
|
private Field<String> ecsmevalidated;
|
|
|
|
|
|
|
|
private Field<String> ecnutscode;
|
|
|
|
|
|
|
|
private Qualifier country;
|
|
|
|
|
|
|
|
public Field<String> getLegalshortname() {
|
|
|
|
return legalshortname;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setLegalshortname(Field<String> legalshortname) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.legalshortname = legalshortname;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getLegalname() {
|
|
|
|
return legalname;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setLegalname(Field<String> legalname) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.legalname = legalname;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<Field<String>> getAlternativeNames() {
|
|
|
|
return alternativeNames;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setAlternativeNames(List<Field<String>> alternativeNames) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.alternativeNames = alternativeNames;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getWebsiteurl() {
|
|
|
|
return websiteurl;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setWebsiteurl(Field<String> websiteurl) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.websiteurl = websiteurl;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getLogourl() {
|
|
|
|
return logourl;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setLogourl(Field<String> logourl) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.logourl = logourl;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getEclegalbody() {
|
|
|
|
return eclegalbody;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setEclegalbody(Field<String> eclegalbody) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.eclegalbody = eclegalbody;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getEclegalperson() {
|
|
|
|
return eclegalperson;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setEclegalperson(Field<String> eclegalperson) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.eclegalperson = eclegalperson;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getEcnonprofit() {
|
|
|
|
return ecnonprofit;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setEcnonprofit(Field<String> ecnonprofit) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.ecnonprofit = ecnonprofit;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getEcresearchorganization() {
|
|
|
|
return ecresearchorganization;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setEcresearchorganization(Field<String> ecresearchorganization) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.ecresearchorganization = ecresearchorganization;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getEchighereducation() {
|
|
|
|
return echighereducation;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setEchighereducation(Field<String> echighereducation) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.echighereducation = echighereducation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getEcinternationalorganizationeurinterests() {
|
|
|
|
return ecinternationalorganizationeurinterests;
|
|
|
|
}
|
|
|
|
|
2020-04-18 12:42:58 +02:00
|
|
|
public void setEcinternationalorganizationeurinterests(
|
|
|
|
Field<String> ecinternationalorganizationeurinterests) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.ecinternationalorganizationeurinterests = ecinternationalorganizationeurinterests;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getEcinternationalorganization() {
|
|
|
|
return ecinternationalorganization;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setEcinternationalorganization(Field<String> ecinternationalorganization) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.ecinternationalorganization = ecinternationalorganization;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getEcenterprise() {
|
|
|
|
return ecenterprise;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setEcenterprise(Field<String> ecenterprise) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.ecenterprise = ecenterprise;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getEcsmevalidated() {
|
|
|
|
return ecsmevalidated;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setEcsmevalidated(Field<String> ecsmevalidated) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.ecsmevalidated = ecsmevalidated;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Field<String> getEcnutscode() {
|
|
|
|
return ecnutscode;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setEcnutscode(Field<String> ecnutscode) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.ecnutscode = ecnutscode;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Qualifier getCountry() {
|
|
|
|
return country;
|
|
|
|
}
|
|
|
|
|
2019-10-25 18:10:30 +02:00
|
|
|
public void setCountry(Qualifier country) {
|
2019-10-24 11:39:41 +02:00
|
|
|
this.country = country;
|
2019-10-25 10:55:35 +02:00
|
|
|
}
|
2019-12-11 16:57:37 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void mergeFrom(OafEntity e) {
|
|
|
|
super.mergeFrom(e);
|
2020-04-01 18:28:23 +02:00
|
|
|
|
2020-04-18 12:42:58 +02:00
|
|
|
if (!Organization.class.isAssignableFrom(e.getClass())) {
|
2020-04-01 18:28:23 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-12-11 16:57:37 +01:00
|
|
|
final Organization o = (Organization) e;
|
2020-04-18 12:42:58 +02:00
|
|
|
legalshortname =
|
|
|
|
o.getLegalshortname() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getLegalshortname()
|
|
|
|
: legalshortname;
|
|
|
|
legalname =
|
|
|
|
o.getLegalname() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getLegalname()
|
|
|
|
: legalname;
|
2019-12-11 16:57:37 +01:00
|
|
|
alternativeNames = mergeLists(o.getAlternativeNames(), alternativeNames);
|
2020-04-18 12:42:58 +02:00
|
|
|
websiteurl =
|
|
|
|
o.getWebsiteurl() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getWebsiteurl()
|
|
|
|
: websiteurl;
|
|
|
|
logourl = o.getLogourl() != null && compareTrust(this, e) < 0 ? o.getLogourl() : logourl;
|
|
|
|
eclegalbody =
|
|
|
|
o.getEclegalbody() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getEclegalbody()
|
|
|
|
: eclegalbody;
|
|
|
|
eclegalperson =
|
|
|
|
o.getEclegalperson() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getEclegalperson()
|
|
|
|
: eclegalperson;
|
|
|
|
ecnonprofit =
|
|
|
|
o.getEcnonprofit() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getEcnonprofit()
|
|
|
|
: ecnonprofit;
|
|
|
|
ecresearchorganization =
|
|
|
|
o.getEcresearchorganization() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getEcresearchorganization()
|
|
|
|
: ecresearchorganization;
|
|
|
|
echighereducation =
|
|
|
|
o.getEchighereducation() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getEchighereducation()
|
|
|
|
: echighereducation;
|
|
|
|
ecinternationalorganizationeurinterests =
|
|
|
|
o.getEcinternationalorganizationeurinterests() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getEcinternationalorganizationeurinterests()
|
|
|
|
: ecinternationalorganizationeurinterests;
|
|
|
|
ecinternationalorganization =
|
|
|
|
o.getEcinternationalorganization() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getEcinternationalorganization()
|
|
|
|
: ecinternationalorganization;
|
|
|
|
ecenterprise =
|
|
|
|
o.getEcenterprise() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getEcenterprise()
|
|
|
|
: ecenterprise;
|
|
|
|
ecsmevalidated =
|
|
|
|
o.getEcsmevalidated() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getEcsmevalidated()
|
|
|
|
: ecsmevalidated;
|
|
|
|
ecnutscode =
|
|
|
|
o.getEcnutscode() != null && compareTrust(this, e) < 0
|
|
|
|
? o.getEcnutscode()
|
|
|
|
: ecnutscode;
|
|
|
|
country = o.getCountry() != null && compareTrust(this, e) < 0 ? o.getCountry() : country;
|
2019-12-12 15:18:48 +01:00
|
|
|
mergeOAFDataInfo(o);
|
2019-12-11 16:57:37 +01:00
|
|
|
}
|
2020-03-11 16:57:28 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean equals(Object o) {
|
|
|
|
if (this == o) return true;
|
|
|
|
if (o == null || getClass() != o.getClass()) return false;
|
|
|
|
if (!super.equals(o)) return false;
|
|
|
|
Organization that = (Organization) o;
|
2020-04-18 12:42:58 +02:00
|
|
|
return Objects.equals(legalshortname, that.legalshortname)
|
|
|
|
&& Objects.equals(legalname, that.legalname)
|
|
|
|
&& Objects.equals(alternativeNames, that.alternativeNames)
|
|
|
|
&& Objects.equals(websiteurl, that.websiteurl)
|
|
|
|
&& Objects.equals(logourl, that.logourl)
|
|
|
|
&& Objects.equals(eclegalbody, that.eclegalbody)
|
|
|
|
&& Objects.equals(eclegalperson, that.eclegalperson)
|
|
|
|
&& Objects.equals(ecnonprofit, that.ecnonprofit)
|
|
|
|
&& Objects.equals(ecresearchorganization, that.ecresearchorganization)
|
|
|
|
&& Objects.equals(echighereducation, that.echighereducation)
|
|
|
|
&& Objects.equals(
|
|
|
|
ecinternationalorganizationeurinterests,
|
|
|
|
that.ecinternationalorganizationeurinterests)
|
|
|
|
&& Objects.equals(ecinternationalorganization, that.ecinternationalorganization)
|
|
|
|
&& Objects.equals(ecenterprise, that.ecenterprise)
|
|
|
|
&& Objects.equals(ecsmevalidated, that.ecsmevalidated)
|
|
|
|
&& Objects.equals(ecnutscode, that.ecnutscode)
|
|
|
|
&& Objects.equals(country, that.country);
|
2020-03-11 16:57:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int hashCode() {
|
2020-04-18 12:42:58 +02:00
|
|
|
return Objects.hash(
|
|
|
|
super.hashCode(),
|
|
|
|
legalshortname,
|
|
|
|
legalname,
|
|
|
|
alternativeNames,
|
|
|
|
websiteurl,
|
|
|
|
logourl,
|
|
|
|
eclegalbody,
|
|
|
|
eclegalperson,
|
|
|
|
ecnonprofit,
|
|
|
|
ecresearchorganization,
|
|
|
|
echighereducation,
|
|
|
|
ecinternationalorganizationeurinterests,
|
|
|
|
ecinternationalorganization,
|
|
|
|
ecenterprise,
|
|
|
|
ecsmevalidated,
|
|
|
|
ecnutscode,
|
|
|
|
country);
|
2020-03-11 16:57:28 +01:00
|
|
|
}
|
2019-10-24 11:39:41 +02:00
|
|
|
}
|