new-exporter #5

Merged
michele.artini merged 21 commits from new-exporter into master 2022-04-22 10:27:22 +02:00
15 changed files with 93 additions and 203 deletions
Showing only changes of commit 00ed2922da - Show all commits

View File

@ -262,14 +262,14 @@ public class DsmCore {
} }
} }
public Long countRegisteredAfter(final String fromDate, final String typologyFilter) throws Throwable { public Long countRegisteredAfter(final String fromDate, final String typeFilter) throws Throwable {
try { try {
if (StringUtils.isNotBlank(typologyFilter)) { if (StringUtils.isNotBlank(typeFilter)) {
final String sql = final String sql =
IOUtils.toString(getClass().getResourceAsStream("/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate_typology.st.sql"), Charset IOUtils.toString(getClass().getResourceAsStream("/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate_typology.st.sql"), Charset
.defaultCharset()); .defaultCharset());
return jdbcTemplate.queryForObject(sql, Long.class, fromDate, typologyFilter + "%"); return jdbcTemplate.queryForObject(sql, Long.class, fromDate, typeFilter + "%");
} else { } else {
final String sql = final String sql =
IOUtils.toString(getClass().getResourceAsStream("/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate.st.sql"), Charset IOUtils.toString(getClass().getResourceAsStream("/eu/dnetlib/openaire/sql/recent_registered_datasources_fromDate.st.sql"), Charset

View File

@ -2,6 +2,8 @@ package eu.dnetlib.openaire.dsm.dao;
import java.util.List; import java.util.List;
import org.springframework.data.domain.Page;
import eu.dnetlib.enabling.datasources.common.Api; import eu.dnetlib.enabling.datasources.common.Api;
import eu.dnetlib.enabling.datasources.common.Datasource; import eu.dnetlib.enabling.datasources.common.Datasource;
import eu.dnetlib.enabling.datasources.common.DatasourceManagerCommon; import eu.dnetlib.enabling.datasources.common.DatasourceManagerCommon;
@ -10,7 +12,6 @@ import eu.dnetlib.openaire.dsm.domain.RequestFilter;
import eu.dnetlib.openaire.dsm.domain.RequestSort; import eu.dnetlib.openaire.dsm.domain.RequestSort;
import eu.dnetlib.openaire.dsm.domain.RequestSortOrder; import eu.dnetlib.openaire.dsm.domain.RequestSortOrder;
import eu.dnetlib.openaire.vocabularies.Country; import eu.dnetlib.openaire.vocabularies.Country;
import org.springframework.data.domain.Page;
public interface DatasourceDao<DS extends Datasource<?, ?>, API extends Api<?>> extends DatasourceManagerCommon<DS, API> { public interface DatasourceDao<DS extends Datasource<?, ?>, API extends Api<?>> extends DatasourceManagerCommon<DS, API> {
@ -32,7 +33,7 @@ public interface DatasourceDao<DS extends Datasource<?, ?>, API extends Api<?>>
void updateTimezone(String dsId, String timezone) throws DsmException; void updateTimezone(String dsId, String timezone) throws DsmException;
void updateTypology(String dsId, String timezone) throws DsmException; void updateEoscDatasourceType(String dsId, String timezone) throws DsmException;
void updateRegisteringUser(String dsId, String registeredBy) throws DsmException; void updateRegisteringUser(String dsId, String registeredBy) throws DsmException;
@ -54,5 +55,6 @@ public interface DatasourceDao<DS extends Datasource<?, ?>, API extends Api<?>>
void updateApiBaseUrl(String apiId, String baseUrl) throws DsmException; void updateApiBaseUrl(String apiId, String baseUrl) throws DsmException;
@Override
void addApi(final API api) throws DsmException; void addApi(final API api) throws DsmException;
} }

View File

@ -238,15 +238,15 @@ public class DatasourceDaoImpl implements DatasourceDao<DatasourceDbEntry, ApiDb
} }
@Override @Override
public void updateTypology(final String dsId, final String typology) throws DsmException { public void updateEoscDatasourceType(final String dsId, final String type) throws DsmException {
final Vocabulary typologies = vocabularyClient.getDatasourceTypologies(); final Vocabulary typologies = vocabularyClient.getDatasourceTypologies();
if (!typologies.hasCode(typology)) { if (!typologies.hasCode(type)) {
throw new DsmException( throw new DsmException(
HttpStatus.SC_BAD_REQUEST, HttpStatus.SC_BAD_REQUEST,
String.format("invalid datasource typology '%s', provide one according to vocabulary %s", typology, config.getVocabularies() String.format("invalid datasource type '%s', provide one according to vocabulary %s", type, config.getVocabularies()
.getDatasourceTypologiesEndpoint())); .getDatasourceTypologiesEndpoint()));
} }
dsRepository.setTypology(dsId, typology); dsRepository.setEoscDatasourceType(dsId, type);
} }
@Override @Override

View File

@ -53,8 +53,8 @@ public interface DatasourceDbEntryRepository extends JpaRepository<DatasourceDbE
@Modifying @Modifying
@Transactional @Transactional
@Query("update #{#entityName} d set d.typology = ?2 where d.id = ?1") @Query("update #{#entityName} d set d.eosc_datasource_type = ?2 where d.id = ?1")
void setTypology(String dsId, String typology); void setEoscDatasourceType(String dsId, String type);
@Modifying @Modifying
@Transactional @Transactional

View File

@ -7,8 +7,6 @@ import java.util.stream.Collectors;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapper;
import org.springframework.beans.BeanWrapperImpl; import org.springframework.beans.BeanWrapperImpl;
@ -16,7 +14,6 @@ import org.springframework.beans.BeanWrapperImpl;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions; import eu.dnetlib.data.transform.xml.AbstractDNetXsltFunctions;
import eu.dnetlib.miscutils.datetime.DateUtils;
import eu.dnetlib.openaire.dsm.domain.ApiDetails; import eu.dnetlib.openaire.dsm.domain.ApiDetails;
import eu.dnetlib.openaire.dsm.domain.DatasourceDetails; import eu.dnetlib.openaire.dsm.domain.DatasourceDetails;
import eu.dnetlib.openaire.dsm.domain.DatasourceDetailsUpdate; import eu.dnetlib.openaire.dsm.domain.DatasourceDetailsUpdate;
@ -50,7 +47,7 @@ public class DsmMappingUtils {
ds.setEnglishname(d.getEnglishname()); ds.setEnglishname(d.getEnglishname());
ds.setRegisteredby(d.getRegisteredby()); ds.setRegisteredby(d.getRegisteredby());
ds.setWebsiteurl(d.getWebsiteurl()); ds.setWebsiteurl(d.getWebsiteurl());
ds.setTypology(d.getTypology()); ds.setEoscDatasourceType(d.getEoscDatasourceType());
ds.setRegistrationdate(d.getRegistrationdate()); ds.setRegistrationdate(d.getRegistrationdate());
ds.setLogoUrl(d.getLogourl()); ds.setLogoUrl(d.getLogourl());
ds.setDescription(d.getDescription()); ds.setDescription(d.getDescription());
@ -104,112 +101,6 @@ public class DsmMappingUtils {
return _convert(d, DatasourceDbEntry.class); return _convert(d, DatasourceDbEntry.class);
} }
public static String asRepositoryProfile(final DatasourceDetails ds) {
final Element root = DocumentHelper.createElement("RESOURCE_PROFILE");
final Element header = root.addElement("HEADER");
header.addElement("RESOURCE_IDENTIFIER").addAttribute("value", "");
header.addElement("RESOURCE_TYPE").addAttribute("value", "RepositoryServiceResourceType");
header.addElement("RESOURCE_KIND").addAttribute("value", "RepositoryServiceResources");
header.addElement("RESOURCE_URI").addAttribute("value", "");
header.addElement("DATE_OF_CREATION").addAttribute("value", DateUtils.now_ISO8601());
header.addElement("PROTOCOL");
final Element body = root.addElement("BODY");
final Element conf = body.addElement("CONFIGURATION");
conf.addElement("DATASOURCE_TYPE").setText(ds.getTypology());
final Element origId = conf.addElement("DATASOURCE_ORIGINAL_ID");
origId.addAttribute("provenance", "D-NET");
origId.setText(ds.getId());
conf.addElement("DATASOURCE_AGGREGATED").setText("false");
conf.addElement("ENVIRONMENTS").addElement("ENVIRONMENT").setText("OPENAIRE");
conf.addElement("TYPOLOGY").setText("" + ds.getTypology());
conf.addElement("MAX_SIZE_OF_DATASTRUCTURE").setText("0");
conf.addElement("AVAILABLE_DISKSPACE").setText("0");
conf.addElement("MAX_NUMBER_OF_DATASTRUCTURE").setText("0");
final String officialName = ds.getOfficialname();
conf.addElement("OFFICIAL_NAME").setText(officialName);
final String englishName = ds.getEnglishname();
conf.addElement("ENGLISH_NAME").setText(StringUtils.isNotBlank(englishName) ? englishName : officialName);
conf.addElement("ICON_URI").setText("" + ds.getLogourl());
final OrganizationDetails org = getOrganization(ds);
conf.addElement("COUNTRY").setText(org != null ? org.getCountry() : "");
final Element location = conf.addElement("LOCATION");
location.addElement("LONGITUDE").setText("" + ds.getLongitude());
location.addElement("LATITUDE").setText("" + ds.getLatitude());
location.addElement("TIMEZONE").setText("" + ds.getTimezone());
conf.addElement("REPOSITORY_WEBPAGE").setText(ds.getWebsiteurl());
getOrganization(ds);
conf.addElement("REPOSITORY_INSTITUTION").setText(org != null ? org.getLegalname() : "");
conf.addElement("ADMIN_INFO").setText(ds.getContactemail());
conf.addElement("INTERFACES");
final Element extraFields = conf.addElement("EXTRA_FIELDS");
addExtraField(extraFields, "OpenAireDataSourceId", ds.getId());
addExtraField(extraFields, "ACTIVATION_ID", ds.getActivationId());
addExtraField(extraFields, "NamespacePrefix", ds.getNamespaceprefix());
addExtraField(extraFields, "aggregatorName", ds.getAggregator());
addExtraField(extraFields, "dateOfCollection", "" + ds.getDateofcollection());
addExtraField(extraFields, "dateOfValidation", "" + ds.getDateofvalidation());
conf.addElement("REGISTERED_BY").setText(ds.getRegisteredby());
final Element status = body.addElement("STATUS");
status.addElement("NUMBER_OF_OBJECTS").setText("0");
status.addElement("LAST_UPDATE").addAttribute("value", DateUtils.now_ISO8601());
final Element qos = body.addElement("QOS");
qos.addElement("AVAILABILITY").setText("0");
qos.addElement("CAPACITY");
qos.addElement("THROUGHPUT").setText("0");
body.addElement("SECURITY_PARAMETERS");
body.addElement("BLACKBOARD");
return root.asXML();
}
public static String asRepositoryInterfce(final ApiDetails api) {
final Element iface = DocumentHelper.createElement("INTERFACE");
iface.addAttribute("active", String.valueOf(api.getActive()))
.addAttribute("compliance", api.getCompatibility())
.addAttribute("contentDescription", api.getContentdescription())
.addAttribute("id", api.getId())
.addAttribute("label", String.format("%s (%s)", api.getTypology(), api.getCompatibility()))
.addAttribute("removable", String.valueOf(api.getRemovable()))
.addAttribute("typology", api.getTypology());
iface.addElement("ACCESS_PROTOCOL").setText(api.getProtocol());
if (api.getApiParams() != null) {
final Element accessProtocol = (Element) iface.selectSingleNode("./ACCESS_PROTOCOL");
api.getApiParams().forEach(ap -> {
accessProtocol.addAttribute(ap.getParam(), ap.getValue());
});
}
iface.addElement("BASE_URL").setText(api.getBaseurl());
iface.addElement("INTERFACE_EXTRA_FIELD").addAttribute("name", "last_collection_date");
iface.addElement("INTERFACE_EXTRA_FIELD").addAttribute("name", "last_collection_mdId");
iface.addElement("INTERFACE_EXTRA_FIELD").addAttribute("name", "last_collection_total");
iface.addElement("INTERFACE_EXTRA_FIELD").addAttribute("name", "last_aggregation_date");
iface.addElement("INTERFACE_EXTRA_FIELD").addAttribute("name", "last_aggregation_mdId");
iface.addElement("INTERFACE_EXTRA_FIELD").addAttribute("name", "last_aggregation_total");
final Element mdPathNode = iface.addElement("INTERFACE_EXTRA_FIELD");
mdPathNode.addAttribute("name", "metadata_identifier_path");
if (StringUtils.isNotBlank(api.getMetadataIdentifierPath())) {
mdPathNode.setText(api.getMetadataIdentifierPath());
}
return iface.asXML();
}
// HELPERS // HELPERS
private static <T> T _convert(final Object o, final Class<T> clazz) { private static <T> T _convert(final Object o, final Class<T> clazz) {
@ -217,17 +108,6 @@ public class DsmMappingUtils {
return mapper.convertValue(o, clazz); return mapper.convertValue(o, clazz);
} }
private static OrganizationDetails getOrganization(final DatasourceDetails ds) {
if (ds.getOrganizations() != null && !ds.getOrganizations().isEmpty()) { return ds.getOrganizations().stream().findFirst().get(); }
return null;
}
private static void addExtraField(final Element extraFields, final String field, final String value) {
final Element f = extraFields.addElement("FIELD");
f.addElement("key").setText(field);
f.addElement("value").setText(value != null ? value : "");
}
private static String asOpenaireId(final String id) { private static String asOpenaireId(final String id) {
final String prefix = StringUtils.substringBefore(id, ID_SEPARATOR); final String prefix = StringUtils.substringBefore(id, ID_SEPARATOR);
final String md5 = StringUtils.substringAfter(id, ID_SEPARATOR); final String md5 = StringUtils.substringAfter(id, ID_SEPARATOR);

View File

@ -25,7 +25,7 @@ public class ApiDetails extends ApiIgnoredProperties {
private String contentdescription = null; private String contentdescription = null;
@ApiModelProperty(position = 4) @ApiModelProperty(position = 4)
private String typology = null; private String eoscDatasourceType = null;
@ApiModelProperty(position = 5) @ApiModelProperty(position = 5)
private String compatibility; private String compatibility;
@ -79,10 +79,6 @@ public class ApiDetails extends ApiIgnoredProperties {
return contentdescription; return contentdescription;
} }
public String getTypology() {
return typology;
}
public String getCompatibility() { public String getCompatibility() {
return compatibility; return compatibility;
} }
@ -135,11 +131,6 @@ public class ApiDetails extends ApiIgnoredProperties {
return this; return this;
} }
public ApiDetails setTypology(final String typology) {
this.typology = typology;
return this;
}
public ApiDetails setCompatibility(final String compatibility) { public ApiDetails setCompatibility(final String compatibility) {
this.compatibility = compatibility; this.compatibility = compatibility;
return this; return this;
@ -192,23 +183,35 @@ public class ApiDetails extends ApiIgnoredProperties {
return compatibilityOverride; return compatibilityOverride;
} }
public void setCompatibilityOverride(final String compatibilityOverride) { public ApiDetails setCompatibilityOverride(final String compatibilityOverride) {
this.compatibilityOverride = compatibilityOverride; this.compatibilityOverride = compatibilityOverride;
return this;
} }
public Boolean getRemovable() { public Boolean getRemovable() {
return removable; return removable;
} }
public void setRemovable(final Boolean removable) { public ApiDetails setRemovable(final Boolean removable) {
this.removable = removable; this.removable = removable;
return this;
} }
public String getMetadataIdentifierPath() { public String getMetadataIdentifierPath() {
return metadataIdentifierPath; return metadataIdentifierPath;
} }
public void setMetadataIdentifierPath(final String metadataIdentifierPath) { public ApiDetails setMetadataIdentifierPath(final String metadataIdentifierPath) {
this.metadataIdentifierPath = metadataIdentifierPath; this.metadataIdentifierPath = metadataIdentifierPath;
return this;
}
public String getEoscDatasourceType() {
return eoscDatasourceType;
}
public ApiDetails setEoscDatasourceType(final String eoscDatasourceType) {
this.eoscDatasourceType = eoscDatasourceType;
return this;
} }
} }

View File

@ -66,7 +66,7 @@ public class DatasourceDetails extends DatasourceIgnoredProperties {
@NotBlank @NotBlank
@ApiModelProperty(position = 13) @ApiModelProperty(position = 13)
private String typology; private String eoscDatasourceType;
@ApiModelProperty(position = 14) @ApiModelProperty(position = 14)
private Date dateofcollection; private Date dateofcollection;
@ -172,8 +172,8 @@ public class DatasourceDetails extends DatasourceIgnoredProperties {
return dateofvalidation; return dateofvalidation;
} }
public String getTypology() { public String getEoscDatasourceType() {
return typology; return eoscDatasourceType;
} }
public Date getDateofcollection() { public Date getDateofcollection() {
@ -305,8 +305,8 @@ public class DatasourceDetails extends DatasourceIgnoredProperties {
return this; return this;
} }
public DatasourceDetails setTypology(final String typology) { public DatasourceDetails setEoscDatasourceType(final String eoscDatasourceType) {
this.typology = typology; this.eoscDatasourceType = eoscDatasourceType;
return this; return this;
} }

View File

@ -51,7 +51,7 @@ public class DatasourceDetailsUpdate {
@NotBlank @NotBlank
@ApiModelProperty(position = 13) @ApiModelProperty(position = 13)
private String typology; private String eoscDatasourceType;
@ApiModelProperty(position = 15) @ApiModelProperty(position = 15)
private String platform; private String platform;
@ -114,8 +114,8 @@ public class DatasourceDetailsUpdate {
return timezone; return timezone;
} }
public String getTypology() { public String getEoscDatasourceType() {
return typology; return eoscDatasourceType;
} }
public String getPlatform() { public String getPlatform() {
@ -183,8 +183,8 @@ public class DatasourceDetailsUpdate {
return this; return this;
} }
public DatasourceDetailsUpdate setTypology(final String typology) { public DatasourceDetailsUpdate setEoscDatasourceType(final String eoscDatasourceType) {
this.typology = typology; this.eoscDatasourceType = eoscDatasourceType;
return this; return this;
} }

View File

@ -38,7 +38,7 @@ public class DatasourceSnippetExtended {
private Date registrationdate; private Date registrationdate;
@ApiModelProperty(position = 7) @ApiModelProperty(position = 7)
private String typology; private String eoscDatasourceType;
@ApiModelProperty(position = 8) @ApiModelProperty(position = 8)
private String logoUrl; private String logoUrl;
@ -106,12 +106,12 @@ public class DatasourceSnippetExtended {
this.registrationdate = registrationdate; this.registrationdate = registrationdate;
} }
public String getTypology() { public String getEoscDatasourceType() {
return typology; return eoscDatasourceType;
} }
public void setTypology(final String typology) { public void setEoscDatasourceType(final String eoscDatasourceType) {
this.typology = typology; this.eoscDatasourceType = eoscDatasourceType;
} }
public String getLogoUrl() { public String getLogoUrl() {

View File

@ -1,34 +1,43 @@
package eu.dnetlib.openaire.dsm.domain; package eu.dnetlib.openaire.dsm.domain;
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonAutoDetect;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
@JsonAutoDetect @JsonAutoDetect
@ApiModel(value = "Filter name", description = "List of the field names used to filter datasources") @ApiModel(value = "Filter name", description = "List of the field names used to filter datasources")
public enum public enum FilterName {
FilterName {
id, managed, collectedfrom, // exact match id,
officialname, englishname, websiteurl, contactemail, registeredby, typology, platform, // like match managed,
collectedfrom, // exact match
officialname,
englishname,
websiteurl,
contactemail,
registeredby,
eoscDatasourceType,
platform, // like match
country; // exact match on related organization country; // exact match on related organization
public static FilterType type(FilterName filterName) { public static FilterType type(final FilterName filterName) {
switch (filterName) { switch (filterName) {
case id: case id:
case managed: case managed:
case collectedfrom: case collectedfrom:
return FilterType.exact; return FilterType.exact;
case officialname: case officialname:
case englishname: case englishname:
case websiteurl: case websiteurl:
case contactemail: case contactemail:
case registeredby: case registeredby:
case typology: case eoscDatasourceType:
case platform: case platform:
return FilterType.search; return FilterType.search;
case country: case country:
return FilterType.searchOrgs; return FilterType.searchOrgs;
default: default:
throw new IllegalStateException("unmapped filter type for: " + filterName); throw new IllegalStateException("unmapped filter type for: " + filterName);
} }
} }

View File

@ -6,7 +6,7 @@ public class RegisteredDatasourceInfo {
private String officialName; private String officialName;
private String englishName; private String englishName;
private String organization; private String organization;
private String typology; private String eoscDatasourceType;
private String registeredBy; private String registeredBy;
private String registrationDate; private String registrationDate;
private String compatibility; private String compatibility;
@ -45,12 +45,12 @@ public class RegisteredDatasourceInfo {
this.organization = organization; this.organization = organization;
} }
public String getTypology() { public String getEoscDatasourceType() {
return typology; return eoscDatasourceType;
} }
public void setTypology(final String typology) { public void setEoscDatasourceType(final String eoscDatasourceType) {
this.typology = typology; this.eoscDatasourceType = eoscDatasourceType;
} }
public String getRegisteredBy() { public String getRegisteredBy() {
@ -92,4 +92,5 @@ public class RegisteredDatasourceInfo {
public void setLastCollectionTotal(final long lastCollectionTotal) { public void setLastCollectionTotal(final long lastCollectionTotal) {
this.lastCollectionTotal = lastCollectionTotal; this.lastCollectionTotal = lastCollectionTotal;
} }
} }

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.Id; import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
@ -26,7 +27,8 @@ public class DatasourceApiDbEntry {
private String contactemail; private String contactemail;
private String collectedfrom; private String collectedfrom;
private String registeredby; private String registeredby;
private String typology; @Column(name = "eosc_datasource_type")
private String eoscDatasourceType;
private String platform; private String platform;
private Boolean managed; private Boolean managed;
@ -34,7 +36,7 @@ public class DatasourceApiDbEntry {
protected String contentdescription = null; protected String contentdescription = null;
protected Boolean active = false; protected Boolean active = false;
protected Boolean removable = false; protected Boolean removable = false;
protected String apitypology = null;
protected String compatibility; protected String compatibility;
private String baseurl; private String baseurl;
@ -96,12 +98,12 @@ public class DatasourceApiDbEntry {
this.websiteurl = websiteurl; this.websiteurl = websiteurl;
} }
public String getTypology() { public String getEoscDatasourceType() {
return typology; return eoscDatasourceType;
} }
public void setTypology(final String typology) { public void setEoscDatasourceType(final String eoscDatasourceType) {
this.typology = typology; this.eoscDatasourceType = eoscDatasourceType;
} }
public String getPlatform() { public String getPlatform() {
@ -152,14 +154,6 @@ public class DatasourceApiDbEntry {
this.removable = removable; this.removable = removable;
} }
public String getApitypology() {
return apitypology;
}
public void setApitypology(final String apitypology) {
this.apitypology = apitypology;
}
public String getCompatibility() { public String getCompatibility() {
return compatibility; return compatibility;
} }
@ -183,4 +177,5 @@ public class DatasourceApiDbEntry {
public void setCollectedfrom(final String collectedfrom) { public void setCollectedfrom(final String collectedfrom) {
this.collectedfrom = collectedfrom; this.collectedfrom = collectedfrom;
} }
} }

View File

@ -3,7 +3,7 @@ select
d.officialname as "officialName", d.officialname as "officialName",
d.englishname as "englishName", d.englishname as "englishName",
o.legalname as organization, o.legalname as organization,
d.typology as typology, d.eosc_datasource_type as eosc_datasource_type,
d.registeredby as "registeredBy", d.registeredby as "registeredBy",
d.registrationdate::text as "registrationDate", d.registrationdate::text as "registrationDate",
a.compatibility as compatibility, a.compatibility as compatibility,

View File

@ -6,7 +6,7 @@ from
left outer join dsm_organizations o on (o.id = dso.organization) left outer join dsm_organizations o on (o.id = dso.organization)
where where
d.registrationdate >= cast(? as date) d.registrationdate >= cast(? as date)
and d.typology like ? and d.eosc_datasource_type like ?
and d.registrationdate < a.last_collection_date and d.registrationdate < a.last_collection_date
and d.registeredby is not null and d.registeredby is not null
and d.managed = true and d.managed = true

View File

@ -102,4 +102,4 @@ openaire.exporter.swaggerInfo.apiContactEmail = ${openaire.exporter.swaggerD
# VOCABULARIES # VOCABULARIES
openaire.exporter.vocabularies.baseUrl = http://localhost:8980/provision/mvc/vocabularies openaire.exporter.vocabularies.baseUrl = http://localhost:8980/provision/mvc/vocabularies
openaire.exporter.vocabularies.countriesEndpoint = ${openaire.exporter.vocabularies.baseUrl}/dnet:countries.json openaire.exporter.vocabularies.countriesEndpoint = ${openaire.exporter.vocabularies.baseUrl}/dnet:countries.json
openaire.exporter.vocabularies.datasourceTypologiesEndpoint = ${openaire.exporter.vocabularies.baseUrl}/dnet:datasource_typologies.json openaire.exporter.vocabularies.datasourceTypologiesEndpoint = ${openaire.exporter.vocabularies.baseUrl}/dnet:eosc_datasource_types.json