readded typology field for compatibility

This commit is contained in:
Michele Artini 2022-04-12 13:05:57 +02:00
parent 7078467e97
commit 44e170946f
4 changed files with 44 additions and 0 deletions

View File

@ -57,6 +57,7 @@ public class DsmMappingUtils {
if (d.getOrganizations() != null) { if (d.getOrganizations() != null) {
ds.setOrganizations(d.getOrganizations().stream().map(DsmMappingUtils::asOrganizationDetail).collect(Collectors.toSet())); ds.setOrganizations(d.getOrganizations().stream().map(DsmMappingUtils::asOrganizationDetail).collect(Collectors.toSet()));
} }
ds.setTypology(d.getTypology());
return ds; return ds;
} }

View File

@ -123,6 +123,10 @@ public class DatasourceDetails extends DatasourceIgnoredProperties {
@ApiModelProperty(position = 32) @ApiModelProperty(position = 32)
private String status; private String status;
@Deprecated
@ApiModelProperty(position = 32)
private String typology;
public String getId() { public String getId() {
return id; return id;
} }
@ -411,4 +415,14 @@ public class DatasourceDetails extends DatasourceIgnoredProperties {
return this; return this;
} }
@Deprecated
public String getTypology() {
return typology;
}
@Deprecated
public void setTypology(final String typology) {
this.typology = typology;
}
} }

View File

@ -58,6 +58,10 @@ public class DatasourceSnippetExtended {
@ApiModelProperty(position = 13) @ApiModelProperty(position = 13)
private Set<OrganizationDetails> organizations; private Set<OrganizationDetails> organizations;
@Deprecated
@ApiModelProperty(position = 14)
private String typology;
public String getId() { public String getId() {
return id; return id;
} }
@ -167,4 +171,14 @@ public class DatasourceSnippetExtended {
this.organizations = organizations; this.organizations = organizations;
} }
@Deprecated
public String getTypology() {
return typology;
}
@Deprecated
public void setTypology(final String typology) {
this.typology = typology;
}
} }

View File

@ -1,5 +1,6 @@
package eu.dnetlib.openaire.dsm.domain.db; package eu.dnetlib.openaire.dsm.domain.db;
import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient; import javax.persistence.Transient;
@ -21,6 +22,10 @@ public class DatasourceDbEntry extends Datasource<OrganizationDbEntry, IdentityD
@Transient @Transient
private String openaireId; private String openaireId;
@Deprecated
@Column(name = "_typology_to_remove_")
private String typology;
public String getOpenaireId() { public String getOpenaireId() {
return openaireId; return openaireId;
} }
@ -28,4 +33,14 @@ public class DatasourceDbEntry extends Datasource<OrganizationDbEntry, IdentityD
public void setOpenaireId(final String openaireId) { public void setOpenaireId(final String openaireId) {
this.openaireId = openaireId; this.openaireId = openaireId;
} }
@Deprecated
public String getTypology() {
return typology;
}
@Deprecated
public void setTypology(final String typology) {
this.typology = typology;
}
} }