pids and ec flags visualization and
This commit is contained in:
parent
a34939d4b1
commit
370da2ae10
|
@ -44,10 +44,43 @@ public class Organization implements Serializable {
|
|||
@Column(name = "status")
|
||||
private String status;
|
||||
|
||||
@Column(name = "ec_legalbody")
|
||||
private Boolean ecLegalBody;
|
||||
|
||||
@Column(name = "ec_legalperson")
|
||||
private Boolean ecLegalPerson;
|
||||
|
||||
@Column(name = "ec_nonprofit")
|
||||
private Boolean ecNonProfit;
|
||||
|
||||
@Column(name = "ec_researchorganization")
|
||||
private Boolean ecResearchOrganization;
|
||||
|
||||
@Column(name = "ec_highereducation")
|
||||
private Boolean ecHigherEducation;
|
||||
|
||||
@Column(name = "ec_internationalorganizationeurinterests")
|
||||
private Boolean ecInternationalOrganizationEurInterests;
|
||||
|
||||
@Column(name = "ec_internationalorganization")
|
||||
private Boolean ecInternationalOrganization;
|
||||
|
||||
@Column(name = "ec_enterprise")
|
||||
private Boolean ecEnterprise;
|
||||
|
||||
@Column(name = "ec_smevalidated")
|
||||
private Boolean ecSmeValidated;
|
||||
|
||||
@Column(name = "ec_nutscode")
|
||||
private Boolean ecNutscode;
|
||||
|
||||
public Organization() {}
|
||||
|
||||
public Organization(final String id, final String name, final String type, final Double lat, final Double lng, final String city, final String country,
|
||||
final String status) {
|
||||
final String status, final Boolean ecLegalBody,
|
||||
final Boolean ecLegalPerson, final Boolean ecNonProfit, final Boolean ecResearchOrganization, final Boolean ecHigherEducation,
|
||||
final Boolean ecInternationalOrganizationEurInterests,
|
||||
final Boolean ecInternationalOrganization, final Boolean ecEnterprise, final Boolean ecSmeValidated, final Boolean ecNutscode) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
|
@ -56,6 +89,16 @@ public class Organization implements Serializable {
|
|||
this.city = city;
|
||||
this.country = country;
|
||||
this.status = status;
|
||||
this.ecLegalBody = ecLegalBody;
|
||||
this.ecLegalPerson = ecLegalPerson;
|
||||
this.ecNonProfit = ecNonProfit;
|
||||
this.ecResearchOrganization = ecResearchOrganization;
|
||||
this.ecHigherEducation = ecHigherEducation;
|
||||
this.ecInternationalOrganizationEurInterests = ecInternationalOrganizationEurInterests;
|
||||
this.ecInternationalOrganization = ecInternationalOrganization;
|
||||
this.ecEnterprise = ecEnterprise;
|
||||
this.ecSmeValidated = ecSmeValidated;
|
||||
this.ecNutscode = ecNutscode;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
@ -122,4 +165,12 @@ public class Organization implements Serializable {
|
|||
this.status = status;
|
||||
}
|
||||
|
||||
public Boolean getEcNutscode() {
|
||||
return ecNutscode;
|
||||
}
|
||||
|
||||
public void setEcNutscode(final Boolean ecNutscode) {
|
||||
this.ecNutscode = ecNutscode;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package eu.dnetlib.organizations.model.view;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
|
@ -8,6 +9,8 @@ import javax.persistence.Id;
|
|||
import javax.persistence.IdClass;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import eu.dnetlib.organizations.model.OpenaireDuplicatePK;
|
||||
|
||||
@Entity
|
||||
|
@ -40,6 +43,10 @@ public class OpenaireDuplicateView implements Serializable {
|
|||
@Column(name = "oa_url")
|
||||
private String oaUrl;
|
||||
|
||||
@Type(type = "jsonb")
|
||||
@Column(name = "oa_other_ids", columnDefinition = "jsonb")
|
||||
private Set<OtherIdentifier> otherIdentifiers;
|
||||
|
||||
@Column(name = "oa_collectedfrom")
|
||||
private String oaCollectedFrom;
|
||||
|
||||
|
@ -97,6 +104,14 @@ public class OpenaireDuplicateView implements Serializable {
|
|||
this.oaUrl = oaUrl;
|
||||
}
|
||||
|
||||
public Set<OtherIdentifier> getOtherIdentifiers() {
|
||||
return otherIdentifiers;
|
||||
}
|
||||
|
||||
public void setOtherIdentifiers(final Set<OtherIdentifier> otherIdentifiers) {
|
||||
this.otherIdentifiers = otherIdentifiers;
|
||||
}
|
||||
|
||||
public String getOaCollectedFrom() {
|
||||
return oaCollectedFrom;
|
||||
}
|
||||
|
|
|
@ -73,6 +73,36 @@ public class OrganizationView implements Serializable {
|
|||
@Column(name = "status")
|
||||
private String status;
|
||||
|
||||
@Column(name = "ec_legalbody")
|
||||
private Boolean ecLegalBody;
|
||||
|
||||
@Column(name = "ec_legalperson")
|
||||
private Boolean ecLegalPerson;
|
||||
|
||||
@Column(name = "ec_nonprofit")
|
||||
private Boolean ecNonProfit;
|
||||
|
||||
@Column(name = "ec_researchorganization")
|
||||
private Boolean ecResearchOrganization;
|
||||
|
||||
@Column(name = "ec_highereducation")
|
||||
private Boolean ecHigherEducation;
|
||||
|
||||
@Column(name = "ec_internationalorganizationeurinterests")
|
||||
private Boolean ecInternationalOrganizationEurInterests;
|
||||
|
||||
@Column(name = "ec_internationalorganization")
|
||||
private Boolean ecInternationalOrganization;
|
||||
|
||||
@Column(name = "ec_enterprise")
|
||||
private Boolean ecEnterprise;
|
||||
|
||||
@Column(name = "ec_smevalidated")
|
||||
private Boolean ecSmeValidated;
|
||||
|
||||
@Column(name = "ec_nutscode")
|
||||
private Boolean ecNutscode;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
@ -177,4 +207,84 @@ public class OrganizationView implements Serializable {
|
|||
this.status = status;
|
||||
}
|
||||
|
||||
public Boolean getEcLegalBody() {
|
||||
return ecLegalBody;
|
||||
}
|
||||
|
||||
public void setEcLegalBody(final Boolean ecLegalBody) {
|
||||
this.ecLegalBody = ecLegalBody;
|
||||
}
|
||||
|
||||
public Boolean getEcLegalPerson() {
|
||||
return ecLegalPerson;
|
||||
}
|
||||
|
||||
public void setEcLegalPerson(final Boolean ecLegalPerson) {
|
||||
this.ecLegalPerson = ecLegalPerson;
|
||||
}
|
||||
|
||||
public Boolean getEcNonProfit() {
|
||||
return ecNonProfit;
|
||||
}
|
||||
|
||||
public void setEcNonProfit(final Boolean ecNonProfit) {
|
||||
this.ecNonProfit = ecNonProfit;
|
||||
}
|
||||
|
||||
public Boolean getEcResearchOrganization() {
|
||||
return ecResearchOrganization;
|
||||
}
|
||||
|
||||
public void setEcResearchOrganization(final Boolean ecResearchOrganization) {
|
||||
this.ecResearchOrganization = ecResearchOrganization;
|
||||
}
|
||||
|
||||
public Boolean getEcHigherEducation() {
|
||||
return ecHigherEducation;
|
||||
}
|
||||
|
||||
public void setEcHigherEducation(final Boolean ecHigherEducation) {
|
||||
this.ecHigherEducation = ecHigherEducation;
|
||||
}
|
||||
|
||||
public Boolean getEcInternationalOrganizationEurInterests() {
|
||||
return ecInternationalOrganizationEurInterests;
|
||||
}
|
||||
|
||||
public void setEcInternationalOrganizationEurInterests(final Boolean ecInternationalOrganizationEurInterests) {
|
||||
this.ecInternationalOrganizationEurInterests = ecInternationalOrganizationEurInterests;
|
||||
}
|
||||
|
||||
public Boolean getEcInternationalOrganization() {
|
||||
return ecInternationalOrganization;
|
||||
}
|
||||
|
||||
public void setEcInternationalOrganization(final Boolean ecInternationalOrganization) {
|
||||
this.ecInternationalOrganization = ecInternationalOrganization;
|
||||
}
|
||||
|
||||
public Boolean getEcEnterprise() {
|
||||
return ecEnterprise;
|
||||
}
|
||||
|
||||
public void setEcEnterprise(final Boolean ecEnterprise) {
|
||||
this.ecEnterprise = ecEnterprise;
|
||||
}
|
||||
|
||||
public Boolean getEcSmeValidated() {
|
||||
return ecSmeValidated;
|
||||
}
|
||||
|
||||
public void setEcSmeValidated(final Boolean ecSmeValidated) {
|
||||
this.ecSmeValidated = ecSmeValidated;
|
||||
}
|
||||
|
||||
public Boolean getEcNutscode() {
|
||||
return ecNutscode;
|
||||
}
|
||||
|
||||
public void setEcNutscode(final Boolean ecNutscode) {
|
||||
this.ecNutscode = ecNutscode;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -126,7 +126,11 @@ public class DatabaseUtils {
|
|||
orgView.getType(),
|
||||
orgView.getLat(), orgView.getLng(),
|
||||
orgView.getCity(), orgView.getCountry(),
|
||||
newStatus);
|
||||
newStatus,
|
||||
orgView.getEcLegalBody(),
|
||||
orgView.getEcLegalPerson(), orgView.getEcNonProfit(), orgView.getEcResearchOrganization(), orgView.getEcHigherEducation(),
|
||||
orgView.getEcInternationalOrganizationEurInterests(), orgView.getEcInternationalOrganization(), orgView.getEcEnterprise(),
|
||||
orgView.getEcSmeValidated(), orgView.getEcNutscode());
|
||||
|
||||
final String newId = organizationRepository.save(org).getId();
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ spring.main.banner-mode = off
|
|||
logging.level.root = INFO
|
||||
#logging.level.org.springframework = DEBUG
|
||||
|
||||
|
||||
management.endpoints.web.exposure.include = prometheus,health
|
||||
management.endpoints.web.base-path = /
|
||||
management.endpoints.web.path-mapping.prometheus = metrics
|
||||
|
|
|
@ -337,7 +337,17 @@ CREATE TABLE organizations (
|
|||
creation_date timestamp with time zone DEFAULT now(),
|
||||
modified_by text,
|
||||
modification_date timestamp with time zone DEFAULT now(),
|
||||
status text NOT NULL DEFAULT 'suggested'
|
||||
status text NOT NULL DEFAULT 'suggested',
|
||||
ec_legalbody boolean,
|
||||
ec_legalperson boolean,
|
||||
ec_nonprofit boolean,
|
||||
ec_researchorganization boolean,
|
||||
ec_highereducation boolean,
|
||||
ec_internationalorganizationeurinterests boolean,
|
||||
ec_internationalorganization boolean,
|
||||
ec_enterprise boolean,
|
||||
ec_smevalidated boolean,
|
||||
ec_nutscode boolean
|
||||
);
|
||||
CREATE INDEX organizations_type_idx ON organizations(type);
|
||||
CREATE INDEX organizations_country_idx ON organizations(country);
|
||||
|
@ -406,6 +416,7 @@ CREATE VIEW oa_duplicates_view AS
|
|||
array_to_string(array_agg(a.acronym), ', ') as oa_acronym,
|
||||
o.country as oa_country,
|
||||
array_to_string(array_agg(u.url), ', ') as oa_url,
|
||||
COALESCE(jsonb_agg(DISTINCT jsonb_build_object('id', oid.otherid, 'type', oid.type)) FILTER (WHERE oid.otherid IS NOT NULL), '[]') AS oa_other_ids,
|
||||
d.oa_collectedfrom as oa_collectedfrom,
|
||||
d.reltype as reltype,
|
||||
d.created_by as created_by
|
||||
|
@ -414,6 +425,7 @@ FROM
|
|||
LEFT OUTER JOIN organizations o ON (o.id = d.oa_original_id)
|
||||
LEFT OUTER JOIN acronyms a ON (o.id = a.id)
|
||||
LEFT OUTER JOIN urls u ON (o.id = u.id)
|
||||
LEFT OUTER JOIN other_ids oid ON (o.id = oid.id)
|
||||
GROUP BY
|
||||
d.local_id,
|
||||
d.oa_original_id,
|
||||
|
@ -447,6 +459,16 @@ CREATE VIEW organizations_view AS SELECT
|
|||
org.city,
|
||||
org.country,
|
||||
org.status,
|
||||
org.ec_legalbody,
|
||||
org.ec_legalperson,
|
||||
org.ec_nonprofit,
|
||||
org.ec_researchorganization,
|
||||
org.ec_highereducation,
|
||||
org.ec_internationalorganizationeurinterests,
|
||||
org.ec_internationalorganization,
|
||||
org.ec_enterprise,
|
||||
org.ec_smevalidated,
|
||||
org.ec_nutscode,
|
||||
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 a.acronym) FILTER (WHERE a.acronym IS NOT NULL), '[]') AS acronyms,
|
||||
|
@ -468,7 +490,17 @@ GROUP BY
|
|||
org.lng,
|
||||
org.city,
|
||||
org.country,
|
||||
org.status;
|
||||
org.status,
|
||||
org.ec_legalbody,
|
||||
org.ec_legalperson,
|
||||
org.ec_nonprofit,
|
||||
org.ec_researchorganization,
|
||||
org.ec_highereducation,
|
||||
org.ec_internationalorganizationeurinterests,
|
||||
org.ec_internationalorganization,
|
||||
org.ec_enterprise,
|
||||
org.ec_smevalidated,
|
||||
org.ec_nutscode;
|
||||
|
||||
CREATE VIEW organizations_info_view AS SELECT
|
||||
org.id,
|
||||
|
@ -615,10 +647,3 @@ $$;
|
|||
CREATE TRIGGER insert_or_update_index_search_trigger AFTER INSERT OR UPDATE ON organizations FOR EACH ROW EXECUTE PROCEDURE insert_or_update_index_search_trigger();
|
||||
CREATE TRIGGER delete_index_search_trigger BEFORE DELETE ON organizations FOR EACH ROW EXECUTE PROCEDURE delete_index_search();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -30,5 +30,9 @@
|
|||
<th class="col-4 pl-3">Urls</th>
|
||||
<td class="col-8"><span ng-repeat="u in org.urls"><a href="{{u}}" target="_blank">{{u}}</a><br /></span></td>
|
||||
</tr>
|
||||
<tr class="d-flex">
|
||||
<th class="col-4 pl-3">Other identifiers</th>
|
||||
<td class="col-8"><span ng-repeat="oid in org.otherIdentifiers">{{oid.id}} <b>({{oid.type}})</b><br /></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -15,8 +15,11 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr class="d-flex" ng-repeat="sr in duplicates">
|
||||
<td class="col-4 pl-3">{{sr.oaName}} <span class="small"><br />
|
||||
<b>URL: </b><a href="{{sr.oaUrl}}" target="_blank" ng-if="sr.oaUrl">{{sr.oaUrl}}</a></span>
|
||||
<td class="col-4 pl-3">{{sr.oaName}}
|
||||
<span class="small" ng-repeat="oid in sr.otherIdentifiers">
|
||||
<br /><b>PID ({{oid.type}}): </b>{{oid.id}}
|
||||
</span>
|
||||
<span class="small"><br /><b>URL: </b><a href="{{sr.oaUrl}}" target="_blank" ng-if="sr.oaUrl">{{sr.oaUrl}}</a></span>
|
||||
</td>
|
||||
<td class="col-1 text-center small">{{sr.oaAcronym}}</td>
|
||||
<td class="col-2 text-center small"><img ng-src="resources/images/flags/{{sr.oaCountry}}.gif" /> {{sr.oaCountry}}</td>
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
<option disabled="disabled" value='' ng-if="!org.type">type...</option>
|
||||
<option ng-repeat="t in vocabularies.orgTypes" value="{{t.value}}">{{t.name}}</option>
|
||||
</select>
|
||||
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm bg-primary text-white" ng-class="{'bg-light text-dark' : mode == 'readonly' || mode == 'not_authorized', 'bg-warning' : mode == 'approve'}" data-toggle="modal" data-target="#ecFlagsModal">EC flags</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -309,5 +313,28 @@
|
|||
|
||||
</form>
|
||||
|
||||
<div class="modal fade" id="ecFlagsModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-sm" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">European Commission Flags</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span ng-class="{'text-success font-weight-bold': org.ecLegalBody, 'text-deleted': !org.ecLegalBody}">legal body</span><br />
|
||||
<span ng-class="{'text-success font-weight-bold': org.ecLegalPerson, 'text-deleted': !org.ecLegalPerson}">legal person</span><br />
|
||||
<span ng-class="{'text-success font-weight-bold': org.ecNonProfit, 'text-deleted': !org.ecNonProfit}">non profit</span><br />
|
||||
<span ng-class="{'text-success font-weight-bold': org.ecResearchOrganization, 'text-deleted': !org.ecResearchOrganization}">research organization</span><br />
|
||||
<span ng-class="{'text-success font-weight-bold': org.ecHigherEducation, 'text-deleted': !org.ecHigherEducation}">higher education</span><br />
|
||||
<span ng-class="{'text-success font-weight-bold': org.ecInternationalOrganizationEurInterests, 'text-deleted': !org.ecInternationalOrganizationEurInterests}">international organization Eur interests</span><br />
|
||||
<span ng-class="{'text-success font-weight-bold': org.ecInternationalOrganization, 'text-deleted': !org.ecInternationalOrganization}">international organization</span><br />
|
||||
<span ng-class="{'text-success font-weight-bold': org.ecEnterprise, 'text-deleted': !org.ecEnterprise}">enterprise</span><br />
|
||||
<span ng-class="{'text-success font-weight-bold': org.ecSmeValidated, 'text-deleted': !org.ecSmeValidated}">sme validated</span><br />
|
||||
<span ng-class="{'text-success font-weight-bold': org.ecNutscode, 'text-deleted': !org.ecNutscode}">nuts code</span><br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<select-org-modal modal-id="selectRelatedOrgModal" selected-org="newRelation" filter-status="approved"></select-org-modal>
|
||||
|
|
|
@ -37,6 +37,11 @@ fieldset > legend { font-size : 1.2rem !important; }
|
|||
z-index: 100;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.text-deleted {
|
||||
color: gray !important;
|
||||
text-decoration: line-through !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue