scholexplorer #4
|
@ -5,6 +5,7 @@
|
||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
*.iws
|
*.iws
|
||||||
|
*.java-version
|
||||||
*~
|
*~
|
||||||
/**/*.sh
|
/**/*.sh
|
||||||
/**/my_application.properties
|
/**/my_application.properties
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>apps</artifactId>
|
<artifactId>apps</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>apps</artifactId>
|
<artifactId>apps</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>apps</artifactId>
|
<artifactId>apps</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>apps</artifactId>
|
<artifactId>apps</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,19 @@ UPDATE tmp_dedup_events SET local_id = oa_original_id WHERE local_id = '' OR lo
|
||||||
UPDATE tmp_dedup_events SET oa_country = 'UNKNOWN' WHERE oa_country = '' OR oa_country IS NULL;
|
UPDATE tmp_dedup_events SET oa_country = 'UNKNOWN' WHERE oa_country = '' OR oa_country IS NULL;
|
||||||
UPDATE tmp_dedup_events SET oa_name = oa_acronym WHERE oa_name = '' OR oa_name IS NULL;
|
UPDATE tmp_dedup_events SET oa_name = oa_acronym WHERE oa_name = '' OR oa_name IS NULL;
|
||||||
DELETE FROM tmp_dedup_events WHERE oa_name = '' OR oa_name IS NULL;
|
DELETE FROM tmp_dedup_events WHERE oa_name = '' OR oa_name IS NULL;
|
||||||
|
|
||||||
|
-- delete invalid relations (a raw org can not be suggested as duplicate and as new org)
|
||||||
|
DELETE FROM tmp_dedup_events WHERE oa_original_id IN (
|
||||||
|
SELECT oa_original_id
|
||||||
|
FROM tmp_dedup_events
|
||||||
|
GROUP BY oa_original_id HAVING count(oa_original_id) > 1)
|
||||||
|
AND (local_id = '' OR local_id is NULL);
|
||||||
|
|
||||||
-- delete invalid relations (a raw org can not be suggested to multiple orgs)
|
-- delete invalid relations (a raw org can not be suggested to multiple orgs)
|
||||||
DELETE FROM tmp_dedup_events WHERE oa_original_id IN (
|
DELETE FROM tmp_dedup_events WHERE oa_original_id IN (
|
||||||
SELECT oa_original_id
|
SELECT oa_original_id
|
||||||
FROM tmp_dedup_events
|
FROM tmp_dedup_events
|
||||||
GROUP BY oa_original_id HAVING count(*) > 1)
|
GROUP BY oa_original_id HAVING count(oa_original_id) > 1)
|
||||||
AND local_id NOT LIKE 'openorgs____::%';
|
AND local_id NOT LIKE 'openorgs____::%';
|
||||||
|
|
||||||
-- IMPORT MISSING TERMS
|
-- IMPORT MISSING TERMS
|
||||||
|
@ -137,14 +145,4 @@ DELETE FROM oa_duplicates d
|
||||||
USING oa_duplicates d1
|
USING oa_duplicates d1
|
||||||
WHERE d.oa_original_id = d1.oa_original_id AND d.reltype = 'suggested' AND d1.reltype = 'is_similar';
|
WHERE d.oa_original_id = d1.oa_original_id AND d.reltype = 'suggested' AND d1.reltype = 'is_similar';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
|
@ -648,7 +648,6 @@ GROUP BY o.id, o.name, o.city, o.country
|
||||||
ORDER BY o.name;
|
ORDER BY o.name;
|
||||||
|
|
||||||
CREATE TABLE org_index_search(id text PRIMARY KEY, txt tsvector);
|
CREATE TABLE org_index_search(id text PRIMARY KEY, txt tsvector);
|
||||||
CREATE INDEX org_index_search_txt_idx ON org_index_search(txt);
|
|
||||||
CREATE INDEX org_index_search_txt_gin_idx ON org_index_search USING gin(txt);
|
CREATE INDEX org_index_search_txt_gin_idx ON org_index_search USING gin(txt);
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION refresh_index_search() RETURNS bigint AS $$
|
CREATE OR REPLACE FUNCTION refresh_index_search() RETURNS bigint AS $$
|
||||||
|
@ -656,9 +655,10 @@ CREATE OR REPLACE FUNCTION refresh_index_search() RETURNS bigint AS $$
|
||||||
WITH d as (
|
WITH d as (
|
||||||
INSERT INTO org_index_search(id, txt) SELECT
|
INSERT INTO org_index_search(id, txt) SELECT
|
||||||
o.id,
|
o.id,
|
||||||
to_tsvector(o.id||' '||o.name||' '||array_to_string(array_agg(DISTINCT n.name), ' ','')||' '||array_to_string(array_agg(DISTINCT a.acronym), ' ','')||' '||array_to_string(array_agg(DISTINCT u.url), ' ',''))
|
to_tsvector(o.id||' '||o.name||' '||array_to_string(array_agg(DISTINCT n.name), ' ','')||' '||array_to_string(array_agg(DISTINCT i.otherid), ' ','')||' '||array_to_string(array_agg(DISTINCT a.acronym), ' ','')||' '||array_to_string(array_agg(DISTINCT u.url), ' ',''))
|
||||||
FROM organizations o
|
FROM organizations o
|
||||||
LEFT OUTER JOIN other_names n on (o.id = n.id)
|
LEFT OUTER JOIN other_names n on (o.id = n.id)
|
||||||
|
LEFT OUTER JOIN other_ids i on (o.id = i.id)
|
||||||
LEFT OUTER JOIN acronyms a on (o.id = a.id)
|
LEFT OUTER JOIN acronyms a on (o.id = a.id)
|
||||||
LEFT OUTER JOIN urls u on (o.id = u.id)
|
LEFT OUTER JOIN urls u on (o.id = u.id)
|
||||||
GROUP BY o.id, o.name RETURNING *
|
GROUP BY o.id, o.name RETURNING *
|
||||||
|
@ -680,9 +680,10 @@ CREATE OR REPLACE FUNCTION insert_or_update_index_search_trigger() RETURNS trigg
|
||||||
BEGIN
|
BEGIN
|
||||||
INSERT INTO org_index_search(id, txt) (SELECT
|
INSERT INTO org_index_search(id, txt) (SELECT
|
||||||
o.id,
|
o.id,
|
||||||
to_tsvector(o.id||' '||o.name||' '||array_to_string(array_agg(DISTINCT n.name), ' ','')||' '||array_to_string(array_agg(DISTINCT a.acronym), ' ','')||' '||array_to_string(array_agg(DISTINCT u.url), ' ',''))
|
to_tsvector(o.id||' '||o.name||' '||array_to_string(array_agg(DISTINCT n.name), ' ','')||' '||array_to_string(array_agg(DISTINCT i.otherid), ' ','')||' '||array_to_string(array_agg(DISTINCT a.acronym), ' ','')||' '||array_to_string(array_agg(DISTINCT u.url), ' ',''))
|
||||||
FROM organizations o
|
FROM organizations o
|
||||||
LEFT OUTER JOIN other_names n on (o.id = n.id)
|
LEFT OUTER JOIN other_names n on (o.id = n.id)
|
||||||
|
LEFT OUTER JOIN other_ids i on (o.id = i.id)
|
||||||
LEFT OUTER JOIN acronyms a on (o.id = a.id)
|
LEFT OUTER JOIN acronyms a on (o.id = a.id)
|
||||||
LEFT OUTER JOIN urls u on (o.id = u.id)
|
LEFT OUTER JOIN urls u on (o.id = u.id)
|
||||||
WHERE o.id = new.id
|
WHERE o.id = new.id
|
||||||
|
|
|
@ -252,7 +252,7 @@
|
||||||
<tr ng-if="org.relations.length == 0">
|
<tr ng-if="org.relations.length == 0">
|
||||||
<td class="text-center text-muted" colspan="4">No relations</td>
|
<td class="text-center text-muted" colspan="4">No relations</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr ng-repeat="r in org.relations | orderBy:['type','relatedOrgName']">
|
<tr ng-repeat="r in org.relations">
|
||||||
<td class="pl-3" colspan="3">This organizazion
|
<td class="pl-3" colspan="3">This organizazion
|
||||||
<!-- NB: The showed value MUST be the inverse -->
|
<!-- NB: The showed value MUST be the inverse -->
|
||||||
<span ng-switch="r.type">
|
<span ng-switch="r.type">
|
||||||
|
|
|
@ -513,7 +513,7 @@ orgsModule.controller('byTypeCtrl', function ($scope, $http, $routeParams, $loca
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
orgsModule.controller('showEditCtrl', function ($scope, $http, $routeParams, $route, $location, $timeout, $window, vocabulariesService) {
|
orgsModule.controller('showEditCtrl', function ($scope, $http, $routeParams, $route, $location, $timeout, $window, $filter, vocabulariesService) {
|
||||||
$scope.orgId = $routeParams.id;
|
$scope.orgId = $routeParams.id;
|
||||||
$scope.org = {};
|
$scope.org = {};
|
||||||
$scope.duplicates = [];
|
$scope.duplicates = [];
|
||||||
|
@ -529,7 +529,10 @@ orgsModule.controller('showEditCtrl', function ($scope, $http, $routeParams, $ro
|
||||||
|
|
||||||
$scope.gotoTab = function(tab) {
|
$scope.gotoTab = function(tab) {
|
||||||
$scope.org = {};
|
$scope.org = {};
|
||||||
call_http_get($http, 'api/organizations/get?id=' + $scope.orgId, function(res) { $scope.org = res.data; });
|
call_http_get($http, 'api/organizations/get?id=' + $scope.orgId, function(res) {
|
||||||
|
res.data.relations = $filter('orderBy')(res.data.relations, ['type','relatedOrgName'], false);
|
||||||
|
$scope.org = res.data;
|
||||||
|
});
|
||||||
|
|
||||||
if (tab == 2) {
|
if (tab == 2) {
|
||||||
$scope.duplicates = [];
|
$scope.duplicates = [];
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>dnet-applications</artifactId>
|
<artifactId>dnet-applications</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>apps</artifactId>
|
<artifactId>apps</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>cmd-line-apps</artifactId>
|
<artifactId>cmd-line-apps</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>dnet-applications</artifactId>
|
<artifactId>dnet-applications</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>libs</artifactId>
|
<artifactId>libs</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>libs</artifactId>
|
<artifactId>libs</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>libs</artifactId>
|
<artifactId>libs</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>dnet-applications</artifactId>
|
<artifactId>dnet-applications</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>dnet-applications</artifactId>
|
<artifactId>dnet-applications</artifactId>
|
||||||
<version>3.2.3-SNAPSHOT</version>
|
<version>3.2.5-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
|
@ -398,7 +398,7 @@
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<maven.compiler.plugin.version>3.6.0</maven.compiler.plugin.version>
|
<maven.compiler.plugin.version>3.6.0</maven.compiler.plugin.version>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<dhp-schemas-version>2.10.30-SCHOLEXPLORER-SNAPSHOT</dhp-schemas-version>
|
<dhp-schemas-version>2.11.33</dhp-schemas-version>
|
||||||
<apache.solr.version>7.1.0</apache.solr.version>
|
<apache.solr.version>7.1.0</apache.solr.version>
|
||||||
<mongodb.driver.version>3.4.2</mongodb.driver.version>
|
<mongodb.driver.version>3.4.2</mongodb.driver.version>
|
||||||
<springfox-version>2.8.0</springfox-version>
|
<springfox-version>2.8.0</springfox-version>
|
||||||
|
|
Loading…
Reference in New Issue