This commit is contained in:
parent
5523ab8657
commit
c990fc945b
|
@ -15,13 +15,15 @@ import org.hibernate.annotations.TypeDefs;
|
||||||
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
import com.vladmihalcea.hibernate.type.json.JsonStringType;
|
import com.vladmihalcea.hibernate.type.json.JsonStringType;
|
||||||
|
|
||||||
|
import eu.dnetlib.organizations.model.utils.OpenaireGraphNode;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "organizations_view")
|
@Table(name = "organizations_view")
|
||||||
@TypeDefs({
|
@TypeDefs({
|
||||||
@TypeDef(name = "json", typeClass = JsonStringType.class),
|
@TypeDef(name = "json", typeClass = JsonStringType.class),
|
||||||
@TypeDef(name = "jsonb", typeClass = JsonBinaryType.class)
|
@TypeDef(name = "jsonb", typeClass = JsonBinaryType.class)
|
||||||
})
|
})
|
||||||
public class OrganizationView implements Serializable {
|
public class OrganizationView extends OpenaireGraphNode implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -533,6 +533,8 @@ CREATE VIEW organizations_view AS SELECT
|
||||||
org.ec_enterprise,
|
org.ec_enterprise,
|
||||||
org.ec_smevalidated,
|
org.ec_smevalidated,
|
||||||
org.ec_nutscode,
|
org.ec_nutscode,
|
||||||
|
substr(org.id, 1, 14)||md5(substr(org.id, 15)) as openaire_id,
|
||||||
|
count(po.id) > 0 as openaire_persistent,
|
||||||
COALESCE(jsonb_agg(DISTINCT jsonb_build_object('id', oid.otherid, 'type', oid.type)) FILTER (WHERE oid.otherid IS NOT NULL), '[]') AS other_ids,
|
COALESCE(jsonb_agg(DISTINCT jsonb_build_object('id', oid.otherid, 'type', oid.type)) FILTER (WHERE oid.otherid IS NOT NULL), '[]') AS other_ids,
|
||||||
COALESCE(jsonb_agg(DISTINCT jsonb_build_object('name', n.name, 'lang', n.lang)) FILTER (WHERE n.name IS NOT NULL), '[]') AS other_names,
|
COALESCE(jsonb_agg(DISTINCT jsonb_build_object('name', n.name, 'lang', n.lang)) FILTER (WHERE n.name IS NOT NULL), '[]') AS other_names,
|
||||||
COALESCE(jsonb_agg(DISTINCT a.acronym) FILTER (WHERE a.acronym IS NOT NULL), '[]') AS acronyms,
|
COALESCE(jsonb_agg(DISTINCT a.acronym) FILTER (WHERE a.acronym IS NOT NULL), '[]') AS acronyms,
|
||||||
|
@ -546,6 +548,7 @@ FROM
|
||||||
LEFT OUTER JOIN urls u ON (org.id = u.id)
|
LEFT OUTER JOIN urls u ON (org.id = u.id)
|
||||||
LEFT OUTER JOIN relationships r ON (org.id = r.id1)
|
LEFT OUTER JOIN relationships r ON (org.id = r.id1)
|
||||||
LEFT OUTER JOIN organizations relorg ON (relorg.id = r.id2)
|
LEFT OUTER JOIN organizations relorg ON (relorg.id = r.id2)
|
||||||
|
LEFT OUTER JOIN persistent_orgs po ON (org.id = po.id)
|
||||||
GROUP BY
|
GROUP BY
|
||||||
org.id,
|
org.id,
|
||||||
org.name,
|
org.name,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
'text-white bg-success' : show == 'success',
|
'text-white bg-success' : show == 'success',
|
||||||
'text-white bg-info' : show == 'info',
|
'text-white bg-info' : show == 'info',
|
||||||
'bg-secondary' : show == 'secondary',
|
'bg-secondary' : show == 'secondary',
|
||||||
}">{{orgTitle}}</div>
|
}">{{orgTitle}} <span class="badge badge-warning" title="It is probably related to an Institutional Dashboard" ng-show="org.persistent">persistent ID</span></div>
|
||||||
<table class="table table-sm table-condensed" style="table-layout: fixed">
|
<table class="table table-sm table-condensed" style="table-layout: fixed">
|
||||||
<tr class="d-flex">
|
<tr class="d-flex">
|
||||||
<th class="col-4 pl-3">Name</th>
|
<th class="col-4 pl-3">Name</th>
|
||||||
|
|
Loading…
Reference in New Issue