1 |
48139
|
alessia.ba
|
SELECT
|
2 |
|
|
d.id AS datasourceid,
|
3 |
55131
|
alessia.ba
|
d.id || array_agg(distinct di.pid) AS identities,
|
4 |
48139
|
alessia.ba
|
d.officialname AS officialname,
|
5 |
|
|
d.englishname AS englishname,
|
6 |
|
|
CASE
|
7 |
55697
|
claudio.at
|
WHEN (array_agg(DISTINCT COALESCE (a.compatibility_override, a.compatibility):: TEXT) @> ARRAY ['openaire-cris_1.1'])
|
8 |
55762
|
claudio.at
|
THEN
|
9 |
|
|
'openaire-cris_1.1@@@OpenAIRE CRIS v1.1@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel'
|
10 |
50489
|
michele.ar
|
WHEN (array_agg(DISTINCT COALESCE (a.compatibility_override, a.compatibility):: TEXT) @> ARRAY ['driver', 'openaire2.0'])
|
11 |
|
|
THEN
|
12 |
|
|
'driver-openaire2.0@@@OpenAIRE 2.0+ (DRIVER OA, EC funding)@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel'
|
13 |
|
|
WHEN (array_agg(DISTINCT COALESCE (a.compatibility_override, a.compatibility) :: TEXT) @> ARRAY ['driver'])
|
14 |
|
|
THEN
|
15 |
|
|
'driver@@@OpenAIRE Basic (DRIVER OA)@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel'
|
16 |
|
|
WHEN (array_agg(DISTINCT COALESCE (a.compatibility_override, a.compatibility) :: TEXT) @> ARRAY ['openaire2.0'])
|
17 |
|
|
THEN
|
18 |
|
|
'openaire2.0@@@OpenAIRE 2.0 (EC funding)@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel'
|
19 |
|
|
WHEN (array_agg(DISTINCT COALESCE (a.compatibility_override, a.compatibility) :: TEXT) @> ARRAY ['openaire3.0'])
|
20 |
|
|
THEN
|
21 |
|
|
'openaire3.0@@@OpenAIRE 3.0 (OA, funding)@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel'
|
22 |
|
|
WHEN (array_agg(DISTINCT COALESCE (a.compatibility_override, a.compatibility) :: TEXT) @> ARRAY ['openaire2.0_data'])
|
23 |
|
|
THEN
|
24 |
|
|
'openaire2.0_data@@@OpenAIRE Data (funded, referenced datasets)@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel'
|
25 |
|
|
WHEN (array_agg(DISTINCT COALESCE (a.compatibility_override, a.compatibility) :: TEXT) @> ARRAY ['native'])
|
26 |
|
|
THEN
|
27 |
|
|
'native@@@proprietary@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel'
|
28 |
|
|
WHEN (array_agg(DISTINCT COALESCE (a.compatibility_override, a.compatibility) :: TEXT) @> ARRAY ['hostedBy'])
|
29 |
|
|
THEN
|
30 |
|
|
'hostedBy@@@collected from a compatible aggregator@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel'
|
31 |
|
|
WHEN (array_agg(DISTINCT COALESCE (a.compatibility_override, a.compatibility) :: TEXT) @> ARRAY ['notCompatible'])
|
32 |
|
|
THEN
|
33 |
48139
|
alessia.ba
|
'notCompatible@@@under validation@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel'
|
34 |
|
|
ELSE
|
35 |
|
|
'UNKNOWN@@@not available@@@dnet:datasourceCompatibilityLevel@@@dnet:datasourceCompatibilityLevel'
|
36 |
|
|
END AS openairecompatibility,
|
37 |
|
|
d.websiteurl AS websiteurl,
|
38 |
|
|
d.logourl AS logourl,
|
39 |
50489
|
michele.ar
|
array_agg(DISTINCT CASE WHEN a.protocol = 'oai' THEN a.baseurl ELSE NULL END) AS accessinfopackage,
|
40 |
48139
|
alessia.ba
|
d.latitude AS latitude,
|
41 |
|
|
d.longitude AS longitude,
|
42 |
|
|
d.namespaceprefix AS namespaceprefix,
|
43 |
50489
|
michele.ar
|
NULL AS odnumberofitems,
|
44 |
|
|
NULL AS odnumberofitemsdate,
|
45 |
51591
|
claudio.at
|
|
46 |
|
|
(SELECT array_agg(s|| '###keywords@@@keywords@@@dnet:subject_classification_typologies@@@dnet:subject_classification_typologies')
|
47 |
|
|
FROM UNNEST(
|
48 |
|
|
ARRAY(
|
49 |
|
|
SELECT trim(s)
|
50 |
|
|
FROM unnest(string_to_array(d.subjects, '@@')) AS s)) AS s) AS subjects,
|
51 |
|
|
|
52 |
48139
|
alessia.ba
|
d.description AS description,
|
53 |
50489
|
michele.ar
|
NULL AS odpolicies,
|
54 |
51591
|
claudio.at
|
ARRAY(SELECT trim(s)
|
55 |
|
|
FROM unnest(string_to_array(d.languages, ',')) AS s) AS odlanguages,
|
56 |
|
|
ARRAY(SELECT trim(s)
|
57 |
|
|
FROM unnest(string_to_array(d.od_contenttypes, '-')) AS s) AS odcontenttypes,
|
58 |
50489
|
michele.ar
|
false AS inferred,
|
59 |
|
|
false AS deletedbyinference,
|
60 |
|
|
0.9 AS trust,
|
61 |
|
|
NULL AS inferenceprovenance,
|
62 |
48139
|
alessia.ba
|
d.dateofcollection AS dateofcollection,
|
63 |
|
|
d.dateofvalidation AS dateofvalidation,
|
64 |
50489
|
michele.ar
|
-- re3data fields
|
65 |
48139
|
alessia.ba
|
d.releasestartdate AS releasestartdate,
|
66 |
|
|
d.releaseenddate AS releaseenddate,
|
67 |
|
|
d.missionstatementurl AS missionstatementurl,
|
68 |
|
|
d.dataprovider AS dataprovider,
|
69 |
|
|
d.serviceprovider AS serviceprovider,
|
70 |
|
|
d.databaseaccesstype AS databaseaccesstype,
|
71 |
|
|
d.datauploadtype AS datauploadtype,
|
72 |
|
|
d.databaseaccessrestriction AS databaseaccessrestriction,
|
73 |
|
|
d.datauploadrestriction AS datauploadrestriction,
|
74 |
|
|
d.versioning AS versioning,
|
75 |
|
|
d.citationguidelineurl AS citationguidelineurl,
|
76 |
|
|
d.qualitymanagementkind AS qualitymanagementkind,
|
77 |
|
|
d.pidsystems AS pidsystems,
|
78 |
|
|
d.certificates AS certificates,
|
79 |
50489
|
michele.ar
|
ARRAY[]::text[] AS policies,
|
80 |
48139
|
alessia.ba
|
dc.id AS collectedfromid,
|
81 |
|
|
dc.officialname AS collectedfromname,
|
82 |
51596
|
claudio.at
|
d.typology || '@@@' || CASE
|
83 |
|
|
WHEN (d.typology = 'crissystem') THEN 'CRIS System'
|
84 |
|
|
WHEN (d.typology = 'datarepository::unknown') THEN 'Data Repository'
|
85 |
|
|
WHEN (d.typology = 'aggregator::datarepository') THEN 'Data Repository Aggregator'
|
86 |
|
|
WHEN (d.typology = 'infospace') THEN 'Information Space'
|
87 |
|
|
WHEN (d.typology = 'pubsrepository::institutional') THEN 'Institutional Repository'
|
88 |
|
|
WHEN (d.typology = 'aggregator::pubsrepository::institutional') THEN 'Institutional Repository Aggregator'
|
89 |
|
|
WHEN (d.typology = 'pubsrepository::journal') THEN 'Journal'
|
90 |
|
|
WHEN (d.typology = 'aggregator::pubsrepository::journals') THEN 'Journal Aggregator/Publisher'
|
91 |
|
|
WHEN (d.typology = 'pubsrepository::mock') THEN 'Other'
|
92 |
|
|
WHEN (d.typology = 'pubscatalogue::unknown') THEN 'Publication Catalogue'
|
93 |
|
|
WHEN (d.typology = 'pubsrepository::unknown') THEN 'Publication Repository'
|
94 |
|
|
WHEN (d.typology = 'aggregator::pubsrepository::unknown') THEN 'Publication Repository Aggregator'
|
95 |
|
|
WHEN (d.typology = 'entityregistry') THEN 'Registry'
|
96 |
|
|
WHEN (d.typology = 'scholarcomminfra') THEN 'Scholarly Comm. Infrastructure'
|
97 |
|
|
WHEN (d.typology = 'pubsrepository::thematic') THEN 'Thematic Repository'
|
98 |
|
|
WHEN (d.typology = 'websource') THEN 'Web Source'
|
99 |
|
|
WHEN (d.typology = 'entityregistry::projects') THEN 'Funder database'
|
100 |
|
|
WHEN (d.typology = 'entityregistry::repositories') THEN 'Registry of repositories'
|
101 |
51906
|
alessia.ba
|
WHEN (d.typology = 'softwarerepository') THEN 'Software Repository'
|
102 |
51914
|
alessia.ba
|
WHEN (d.typology = 'aggregator::softwarerepository') THEN 'Software Repository Aggregator'
|
103 |
51906
|
alessia.ba
|
WHEN (d.typology = 'orprepository') THEN 'Repository'
|
104 |
51596
|
claudio.at
|
ELSE 'Other'
|
105 |
|
|
END || '@@@dnet:datasource_typologies@@@dnet:datasource_typologies' AS datasourcetype,
|
106 |
55878
|
alessia.ba
|
'sysimport:crosswalk:entityregistry@@@sysimport:crosswalk:entityregistry@@@dnet:provenance_actions@@@dnet:provenance_actions' AS provenanceaction,
|
107 |
|
|
CONCAT(d.issn, '@@@', d.eissn, '@@@', d.lissn) AS journal
|
108 |
48139
|
alessia.ba
|
|
109 |
50489
|
michele.ar
|
FROM dsm_datasources d
|
110 |
48139
|
alessia.ba
|
|
111 |
50489
|
michele.ar
|
LEFT OUTER JOIN dsm_datasources dc on (d.collectedfrom = dc.id)
|
112 |
|
|
LEFT OUTER JOIN dsm_api a ON (d.id = a.datasource)
|
113 |
|
|
LEFT OUTER JOIN dsm_datasourcepids di ON (d.id = di.datasource)
|
114 |
48139
|
alessia.ba
|
|
115 |
|
|
GROUP BY
|
116 |
|
|
d.id,
|
117 |
|
|
d.officialname,
|
118 |
|
|
d.englishname,
|
119 |
|
|
d.websiteurl,
|
120 |
|
|
d.logourl,
|
121 |
|
|
d.contactemail,
|
122 |
|
|
d.namespaceprefix,
|
123 |
|
|
d.description,
|
124 |
|
|
d.latitude,
|
125 |
|
|
d.longitude,
|
126 |
|
|
d.dateofcollection,
|
127 |
|
|
d.dateofvalidation,
|
128 |
|
|
d.releasestartdate,
|
129 |
|
|
d.releaseenddate,
|
130 |
|
|
d.missionstatementurl,
|
131 |
|
|
d.dataprovider,
|
132 |
|
|
d.serviceprovider,
|
133 |
|
|
d.databaseaccesstype,
|
134 |
|
|
d.datauploadtype,
|
135 |
|
|
d.databaseaccessrestriction,
|
136 |
|
|
d.datauploadrestriction,
|
137 |
|
|
d.versioning,
|
138 |
|
|
d.citationguidelineurl,
|
139 |
|
|
d.qualitymanagementkind,
|
140 |
|
|
d.pidsystems,
|
141 |
|
|
d.certificates,
|
142 |
50489
|
michele.ar
|
dc.id,
|
143 |
55878
|
alessia.ba
|
dc.officialname,
|
144 |
|
|
d.issn,
|
145 |
|
|
d.eissn,
|
146 |
|
|
d.lissn
|