From 012d4cece6eae1e97154d197e03988783265bfa9 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 31 Oct 2023 10:38:09 +0100 Subject: [PATCH] adding test classes --- .../communityapi/model/CommunityModel.java | 20 +- .../dhp/oa/graph/dump/UtilCommunityAPI.java | 54 +- .../dump/complete/CreateContextEntities.java | 3 +- .../dump/complete/CreateContextRelation.java | 2 +- .../dhp/oa/graph/dump/complete/Process.java | 67 +- .../dump/QueryInformationSystemTest.java | 71 -- .../graph/dump/complete/CreateEntityTest.java | 67 +- .../dump/complete/CreateRelationTest.java | 824 ++---------------- 8 files changed, 192 insertions(+), 916 deletions(-) delete mode 100644 dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/QueryInformationSystemTest.java diff --git a/api/src/main/java/eu/dnetlib/dhp/communityapi/model/CommunityModel.java b/api/src/main/java/eu/dnetlib/dhp/communityapi/model/CommunityModel.java index 92a1a5e..f942eea 100644 --- a/api/src/main/java/eu/dnetlib/dhp/communityapi/model/CommunityModel.java +++ b/api/src/main/java/eu/dnetlib/dhp/communityapi/model/CommunityModel.java @@ -20,24 +20,24 @@ public class CommunityModel implements Serializable { private String type; - private List subject; + private List subjects; - private String zenodoCOmmunity; + private String zenodoCommunity; - public List getSubject() { - return subject; + public List getSubjects() { + return subjects; } - public void setSubject(List subject) { - this.subject = subject; + public void setSubjects(List subjects) { + this.subjects = subjects; } - public String getZenodoCOmmunity() { - return zenodoCOmmunity; + public String getZenodoCommunity() { + return zenodoCommunity; } - public void setZenodoCOmmunity(String zenodoCOmmunity) { - this.zenodoCOmmunity = zenodoCOmmunity; + public void setZenodoCommunity(String zenodoCommunity) { + this.zenodoCommunity = zenodoCommunity; } public String getType() { diff --git a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/UtilCommunityAPI.java b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/UtilCommunityAPI.java index c352d0d..88438f0 100644 --- a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/UtilCommunityAPI.java +++ b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/UtilCommunityAPI.java @@ -6,9 +6,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; -import java.util.function.Consumer; import java.util.stream.Collectors; +import com.fasterxml.jackson.core.JsonProcessingException; import eu.dnetlib.dhp.communityapi.model.*; import eu.dnetlib.dhp.oa.graph.dump.complete.ContextInfo; import org.slf4j.Logger; @@ -83,37 +83,49 @@ public class UtilCommunityAPI { } - public List getContextInformation(final Consumer consumer) throws IOException { + public List getContextInformation() throws IOException { List ret = new ArrayList<>(); + getValidCommunities() - .forEach(c -> { - ContextInfo cinfo = new ContextInfo(); - cinfo.setId(c.getId()); - cinfo.setDescription(c.getDescription()); - CommunityModel cm =null; - try { - cm = getCommunity(c.getId()); - } catch (IOException e) { - throw new RuntimeException(e); - } - cinfo.setSubject(cm.getSubject()); - cinfo.setZenodocommunity(c.getZenodoCOmmunity()); - cinfo.setType(c.getType()); - ret.add(cinfo); - }); + .forEach(c -> + ret.add(getContext(c))); return ret; } - public void getContextRelation(final Consumer consumer) throws IOException { - getValidCommunities().forEach(c -> { + public ContextInfo getContext(CommunityModel c){ + + ContextInfo cinfo = new ContextInfo(); + cinfo.setId(c.getId()); + cinfo.setDescription(c.getDescription()); + CommunityModel cm =null; + try { + cm = getCommunity(c.getId()); + } catch (IOException e) { + throw new RuntimeException(e); + } + cinfo.setSubject(new ArrayList<>()); + cinfo.getSubject().addAll(cm.getSubjects()); + cinfo.setZenodocommunity(c.getZenodoCommunity()); + cinfo.setType(c.getType()); + return cinfo; + } + + public List getContextRelation() throws IOException { + return getValidCommunities().stream().map(c -> { ContextInfo cinfo = new ContextInfo(); cinfo.setId(c.getId()); cinfo.setDatasourceList( getDatasourceList(c.getId())); cinfo.setProjectList(getProjectList(c.getId())); - consumer.accept(cinfo); - }); +// try { +// if(cinfo.getId().equals("ni")) +// System.out.println(new ObjectMapper().writeValueAsString(cinfo)); +// } catch (JsonProcessingException e) { +// throw new RuntimeException(e); +// } + return cinfo; + }).collect(Collectors.toList()); } private List getDatasourceList(String id) { diff --git a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateContextEntities.java b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateContextEntities.java index c190ac1..6b5d309 100644 --- a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateContextEntities.java +++ b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateContextEntities.java @@ -36,6 +36,7 @@ public class CreateContextEntities implements Serializable { private final transient Configuration conf; private final transient BufferedWriter writer; + public static void main(String[] args) throws Exception { String jsonConfiguration = IOUtils .toString( @@ -92,7 +93,7 @@ public class CreateContextEntities implements Serializable { final Consumer consumer = ci -> writeEntity(producer.apply(ci)); - queryInformationSystem.getContextInformation(consumer); + queryInformationSystem.getContextInformation().forEach(ci -> consumer.accept(ci)); } protected void writeEntity(final R r) { diff --git a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateContextRelation.java b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateContextRelation.java index 2f9e6ee..2f87a07 100644 --- a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateContextRelation.java +++ b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateContextRelation.java @@ -117,7 +117,7 @@ public class CreateContextRelation implements Serializable { final Consumer consumer = ci -> producer.apply(ci).forEach(this::writeEntity); UtilCommunityAPI queryCommunityAPI = new UtilCommunityAPI(); - queryCommunityAPI.getContextRelation(consumer); + queryCommunityAPI.getContextRelation().forEach(ci -> consumer.accept(ci)); } protected void writeEntity(final Relation r) { diff --git a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/Process.java b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/Process.java index 9a46d05..2113875 100644 --- a/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/Process.java +++ b/dump/src/main/java/eu/dnetlib/dhp/oa/graph/dump/complete/Process.java @@ -54,38 +54,13 @@ public class Process implements Serializable { List relationList = new ArrayList<>(); ci .getDatasourceList() - .forEach(ds -> { - String nodeType = ModelSupport.idPrefixEntity.get(ds.substring(0, 2)); - String datasourceId = ds; - if (ds.startsWith("10|") || ds.startsWith("40|")) - datasourceId = ds.substring(3); + .forEach(ds -> + relationList.addAll(addRelations(ci, ds, ModelSupport.idPrefixEntity.get("10")))); - String contextId = Utils.getContextId(ci.getId()); - relationList - .add( - Relation - .newInstance( - contextId, eu.dnetlib.dhp.oa.model.graph.Constants.CONTEXT_ENTITY, - datasourceId, nodeType, - RelType.newInstance(ModelConstants.IS_RELATED_TO, ModelConstants.RELATIONSHIP), - Provenance - .newInstance( - Constants.USER_CLAIM, - Constants.DEFAULT_TRUST))); - - relationList - .add( - Relation - .newInstance( - datasourceId, nodeType, - contextId, eu.dnetlib.dhp.oa.model.graph.Constants.CONTEXT_ENTITY, - RelType.newInstance(ModelConstants.IS_RELATED_TO, ModelConstants.RELATIONSHIP), - Provenance - .newInstance( - Constants.USER_CLAIM, - Constants.DEFAULT_TRUST))); - - }); + ci + .getProjectList() + .forEach(p -> + relationList.addAll(addRelations(ci, p, ModelSupport.idPrefixEntity.get("40")))); return relationList; @@ -94,4 +69,34 @@ public class Process implements Serializable { } } + private static List addRelations(ContextInfo ci, String ds, String nodeType) { + List relationList = new ArrayList<>(); + String contextId = Utils.getContextId(ci.getId()); + relationList + .add( + Relation + .newInstance( + contextId, eu.dnetlib.dhp.oa.model.graph.Constants.CONTEXT_ENTITY, + ds, nodeType, + RelType.newInstance(ModelConstants.IS_RELATED_TO, ModelConstants.RELATIONSHIP), + Provenance + .newInstance( + Constants.USER_CLAIM, + Constants.DEFAULT_TRUST))); + + relationList + .add( + Relation + .newInstance( + ds, nodeType, + contextId, eu.dnetlib.dhp.oa.model.graph.Constants.CONTEXT_ENTITY, + RelType.newInstance(ModelConstants.IS_RELATED_TO, ModelConstants.RELATIONSHIP), + Provenance + .newInstance( + Constants.USER_CLAIM, + Constants.DEFAULT_TRUST))); + return relationList; + } + + } diff --git a/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/QueryInformationSystemTest.java b/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/QueryInformationSystemTest.java deleted file mode 100644 index 6fe055b..0000000 --- a/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/QueryInformationSystemTest.java +++ /dev/null @@ -1,71 +0,0 @@ - -package eu.dnetlib.dhp.oa.graph.dump; - -import java.io.IOException; -import java.util.Map; - -import org.dom4j.DocumentException; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.junit.jupiter.MockitoExtension; -import org.xml.sax.SAXException; - -import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; - -@ExtendWith(MockitoExtension.class) -class QueryInformationSystemTest { - - private UtilCommunityAPI queryInformationSystem; - - private Map map; - - @BeforeEach - public void setUp() throws ISLookUpException, DocumentException, SAXException, IOException { - - queryInformationSystem = new UtilCommunityAPI(); - map = queryInformationSystem.getCommunityMap(false, null); - } - - @Test - void testSize() throws ISLookUpException { - - Assertions.assertEquals(23, map.size()); - } - - @Test - void testContent() { - Assertions.assertTrue(map.containsKey("egi") && map.get("egi").equals("EGI Federation")); - - Assertions.assertTrue(map.containsKey("fet-fp7") && map.get("fet-fp7").equals("FET FP7")); - Assertions.assertTrue(map.containsKey("fet-h2020") && map.get("fet-h2020").equals("FET H2020")); - Assertions.assertTrue(map.containsKey("clarin") && map.get("clarin").equals("CLARIN")); - Assertions.assertTrue(map.containsKey("rda") && map.get("rda").equals("Research Data Alliance")); - Assertions.assertTrue(map.containsKey("ee") && map.get("ee").equals("SDSN - Greece")); - Assertions - .assertTrue( - map.containsKey("dh-ch") && map.get("dh-ch").equals("Digital Humanities and Cultural Heritage")); - Assertions.assertTrue(map.containsKey("fam") && map.get("fam").equals("Fisheries and Aquaculture Management")); - Assertions.assertTrue(map.containsKey("ni") && map.get("ni").equals("Neuroinformatics")); - Assertions.assertTrue(map.containsKey("mes") && map.get("mes").equals("European Marine Science")); - Assertions.assertTrue(map.containsKey("instruct") && map.get("instruct").equals("Instruct-ERIC")); - Assertions.assertTrue(map.containsKey("elixir-gr") && map.get("elixir-gr").equals("ELIXIR GR")); - Assertions - .assertTrue(map.containsKey("aginfra") && map.get("aginfra").equals("Agricultural and Food Sciences")); - Assertions.assertTrue(map.containsKey("dariah") && map.get("dariah").equals("DARIAH EU")); - Assertions.assertTrue(map.containsKey("risis") && map.get("risis").equals("RISIS")); - Assertions.assertTrue(map.containsKey("epos") && map.get("epos").equals("EPOS")); - Assertions.assertTrue(map.containsKey("beopen") && map.get("beopen").equals("Transport Research")); - Assertions.assertTrue(map.containsKey("euromarine") && map.get("euromarine").equals("EuroMarine")); - Assertions.assertTrue(map.containsKey("ifremer") && map.get("ifremer").equals("Ifremer")); - Assertions.assertTrue(map.containsKey("oa-pg") && map.get("oa-pg").equals("EC Post-Grant Open Access Pilot")); - Assertions - .assertTrue( - map.containsKey("science-innovation-policy") - && map.get("science-innovation-policy").equals("Science and Innovation Policy Studies")); - Assertions.assertTrue(map.containsKey("covid-19") && map.get("covid-19").equals("COVID-19")); - Assertions.assertTrue(map.containsKey("enermaps") && map.get("enermaps").equals("Energy Research")); - } - -} diff --git a/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateEntityTest.java b/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateEntityTest.java index 37ba576..4be1be0 100644 --- a/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateEntityTest.java +++ b/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateEntityTest.java @@ -13,6 +13,9 @@ import java.util.Arrays; import java.util.List; import java.util.function.Consumer; +import eu.dnetlib.dhp.communityapi.QueryCommunityAPI; +import eu.dnetlib.dhp.communityapi.model.CommunityModel; +import eu.dnetlib.dhp.oa.graph.dump.UtilCommunityAPI; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; @@ -20,6 +23,7 @@ import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.compress.CompressionCodec; import org.apache.hadoop.io.compress.CompressionCodecFactory; +import org.codehaus.jackson.map.ObjectMapper; import org.junit.jupiter.api.*; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; @@ -36,47 +40,17 @@ import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; @ExtendWith(MockitoExtension.class) public class CreateEntityTest { - private static final String XQUERY_ENTITY = "for $x in collection('/db/DRIVER/ContextDSResources/ContextDSResourceType') " - + - "where $x//context[./@type='community' or ./@type = 'ri'] and $x//context/param[./@name = 'status']/text() = 'all' return " - + - "concat(data($x//context/@id) , '@@', $x//context/param[./@name =\"name\"]/text(), '@@', " + - "$x//context/param[./@name=\"description\"]/text(), '@@', $x//context/param[./@name = \"subject\"]/text(), '@@', " - + - "$x//context/param[./@name = \"zenodoCommunity\"]/text(), '@@', $x//context/@type)"; + private static final String validCommunities = "[{\"id\":\"eut\",\"name\":\"EUt+\",\"description\":\"

EUt+ is an " + + "alliance of 8 universities: Technological University Dublin, Riga Technical University, Cyprus University " + + "of Technology, Technical University of Cluj-Napoca, Polytechnic University of Cartagena, University of " + + "Technology of Troyes, Technical University of Sofia and Hochschule Darmstadt.

\",\"status\":\"all\"," + + "\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"knowmad\",\"name\":\"Knowmad Institut\",\"description\":\"

\\\"\\\"

The Knowmad Research Gateway facilitates researchers, policymakers, activists, and experts to discover publications, data, software, and other research products  related to Human Rights, Sustainable Development, Drug Policy, New Technologies, Ethnobotany, and Special Populations. 

The European Institute for Multidisciplinary Studies on Human Rights & Science - Knowmad Institut is an independent Think & Do Tank based in Brandenburg, Germany, promoting Human Dignity and Open Science in Public and Private Policies....Click Here For More Information.

  • If you would like to suggest research inputs with bibliographic information, Please Use This Form.

El Knowmad Research Gateway facilita a investigadores, responsables políticos, activistas y expertos el descubrimiento de publicaciones, datos, software y otros productos de investigación relacionados con los Derechos Humanos, el Desarrollo Sostenible, las Políticas de Drogas, las Nuevas Tecnologías, la Etnobotánica y las Poblaciones Especiales.

El Instituto Europeo de Estudios Multidisciplinares sobre Derechos Humanos y Ciencia - Knowmad Institut es un Think & Do Tank independiente con sede en Brandenburgo, Alemania, que promueve la Dignidad Humana y la Ciencia Abierta en las Políticas Públicas y Privadas....Haga clic aquí para obtener más información.

Si desea sugerir aportaciones de investigación con información bibliográfica, Utilice Este Formulario.


Das Knowmad Research Gateway ermöglicht Forschern, politischen Entscheidungsträgern, Aktivisten und Experten die Entdeckung von Publikationen, Daten, Software und anderen Forschungsprodukten im Zusammenhang mit Menschenrechten, nachhaltiger Entwicklung, Drogenpolitik, neuen Technologien, Ethnobotanik und speziellen Bevölkerungsgruppen.

Das Europäische Institut für multidisziplinäre Studien zu Menschenrechten und Wissenschaft - Knowmad Institut ist ein unabhängiger Think & Do Tank mit Sitz in Brandenburg (Deutschland), der sich für Menschenwürde und Open Science in öffentlichen und privaten Politiken einsetzt… Klicken Sie hier für weitere Informationen.

Wenn Sie Forschungseingaben mit bibliographischen Informationen vorschlagen möchten, nutzen Sie bitte dieses Formular.

 

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"knowmadinstitut\"},{\"id\":\"netherlands\",\"name\":\"Netherlands Research Portal\",\"description\":\"

All Dutch Research,
In One Place.

A comprehensive and open dataset of research information covering 3m publications, 500k research data, 100 research software items, from 48 data sources, linked to 3K grants and 900 organizations.
All linked together through citations and semantics.
 
Try browsing by:

 

Welcome to the Portal of Research Output from the Netherlands. This has been developed as part of a collaboration between UKB, SURF and OpenAIRE. This portal presents Dutch research results and research projects as a sub-section found in the OpenAIRE Graph. This Research Graph is actively fed by Dutch institutional repositories, data and software repositories, and Research Information Systems (CRIS's) that comply with the OpenAIRE metadata guidelines. In addition, this portal also includes research output and research projects from other sources that have an affiliation with one or more Dutch research performing organisations and research funders found in the OpenAIRE Graph.

In Dutch:

Welkom bij het Portaal van het Nederlandse Onderzoeks Resultaten. Dit is ontwikkeld als onderdeel van een samenwerking tussen UKB, SURF and OpenAIRE.  Dit portaal presenteert Nederlandse onderzoeksresultaten en onderzoeksprojecten als een sub-sectie die zijn gevonden in de OpenAIRE Graph. Deze Research Graph wordt actief gevoed door Nederlandse institutionele repositories, data- en software-repositories, en onderzoeksinformatiesystemen (CRISen) die voldoen aan de OpenAIRE metadata richtlijnen. Daarnaast bevat dit portaal ook onderzoeksresultaten en onderzoeksprojecten uit andere bronnen die een affiliatie hebben met een of meer Nederlandse onderzoeksuitvoeringsorganisaties en onderzoeksfinanciers gevonden in de OpenAIRE Graph.

\\\"OpenAIRE

Share your research.

\\\"Linking\\\"
Link your work.
Connect all your research. If you can’t find your research results in OpenAIRE, don’t worry! Use our Link Out service , that reaches out to many external sources via APIs, to connect your research results and claim them to your project.
Learn More
\\\"Deposit\\\"
Deposit your research.
Whether it’s publications, data or software, select an OpenAIRE compatible repository and share using community standards. Alternatively use Zenodo, a catch-all repository hosted by CERN. All results will be indexed, discoverable and accessible via this portal.
Learn More

 

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"tunet\",\"name\":\"TU-NET\",\"description\":\"

The Technological University Network (TU-NET) is an affiliation of the Technological Universities in Ireland: Technological University Dublin (TU Dublin), Technological University of the South-East (SETU), Munster Technological University (MTU), Technological University of the Shannon: Midlands Midwest (TUS) and Atlantic Technological University (ATU).  TU-NET is a network for the Irish Technological Universities to share expertise, information and resources where possible.

This portal harvests data from the following Open Access Repositories: ARROW (TU Dublin), SETU Waterford Libraries Repository and Research@THEA (SETU Carlow, TUS, ATU & IADT).

 

Background photo by  Pietro Jeng on Unsplash

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"forthem\",\"name\":\"FORTHEM Alliance\",\"description\":\"FORTHEM: Fostering Outreach within European Regions, Transnational Higher Education and Mobility\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"neanias-space\",\"name\":\"NEANIAS Space Research Community\",\"description\":\"

The NEANIAS Space Research Community engages Open Science practices through the European Open Science Cloud (EOSC), targeting a wide variety of scientific and professional communities related to Astrophysics and Planetary Science engaging also computer scientists and software engineers interested in computer vision and machine learning. NEANIAS Space Services data and products may also have a high impact in planetary mining and robotics, space weather and mobile telecommunications.

The NEANIAS Space Research services  are aimed at supporting management and analysis of large data volumes in astrophysics and planetary sciences through visualization (SPACE-VIS services), efficiently generating large multidimensional maps and mosaics (SPACE-MOS services), and, finally, supporting mechanisms for automatic detection of structures within maps through machine learning (SPACE-ML services). 

The SPACE-VIS services provide an integrated operational solution for astrophysics and planetary data management aided by advanced visualization mechanisms, including visual analytics and virtual reality, and it is underpinned by FAIR principles.  

  • The ViaLactea service accesses astrophysical surveys to aid understanding of the star formation process of the Milky Way. ViaLactea Visual Analytics (VLVA) combine different types of visualization to perform analysis by exploring correlations managed in the ViaLactea Knowledge Base (VLKB). VLKB includes 2D and 3D (velocity cubes) surveys, numerical model outputs, point-like and diffuse object catalogues and allows for retrieval of all available datasets as well as cut-outs on the positional and/or velocity axis.  
  • The  Astra Data Navigator (ADN) is a virtual reality environment for visualizing large stellar catalogues. The first prototype has been customised to access cloud services for interactive data exploration and navigation with the ability of exploring advanced virtual reality mechanisms providing full immersion.  
  • Finally, the ADAM-Space Service (Advanced Geospatial Data Management platform) accesses a large variety of environmental data and is customised in NEANIAS to access planetary data. 

The SPACE-MOS services provide tools for making high quality images from raw data (map making) and for assembling such images into custom mosaics (mosaicing). 

  • The AstroMapMerging service exploits Montage (http://montage.ipac.caltech.edu/) and is integrated with the ViaLactea service for merging adjacent datasets.  

  • The ISIS3 and ASP under ADAM-DPS service allows integration with data processing pipelines in ADAM which offers tools for planetary data analysis and for producing cartographic products, such as Digital Elevation Models (DEMs) and 3D models from stereo imagery. 

  

The SPACE-ML services provide advanced solutions for pattern and structure detection in astronomical surveys as well as in planetary surface composition, topography and morphometry. The service integrates cutting-edge machine learning algorithms to perform automatic classification of compact and extended sky structures or planetary surfaces. 

  • CAESAR service allows to extract and parametrize compact and extended sources from astronomical radio interferometric maps. The processing pipeline consists of a series of distinct stages that can be run on multiple cores and processors.  

  • AstroML service has been developed to integrate a deep learning mechanism to significantly improve source identification, classification, and characterization of sources in large-scale radio surveys. 

  • The Latent Space Explorer service performs unsupervised representation learning of astronomical images using deep learning techniques (e.g., autoencoders) and interactive visualization of the representations with the chance to apply clustering methods in order to help the domain expert to understand the structure of the representation space. 

Please visit also the NEANIAS Space thematic portal for more info on the Space Services and the research community.

NEANIAS web portal: https://www.neanias.eu/

Please consider acknowledging the NEANIAS project if you use the results of this service in any paper or communication: NEANIAS is funded by European Union under Horizon 2020 research and innovation programme via grant agreement No. 863448.

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"neanias\"},{\"id\":\"aurora\",\"name\":\"Aurora Universities Network\",\"description\":\"

Aurora consists of research-intensive universities deeply committed to the social impact of our activities, and with a history of engagement with the communities in which we operate. Our overall vision is to use our academic excellence to influence societal change through our research and education – aiming to contribute to the achievement of the United Nations’ Sustainable Development Goals.

All our research output is combines via this Aurora Connect Gateway, and put on the Aurora Monitor Dashboard.

More about Aurora: https://aurora-universities.eu/

 

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"argo-france\",\"name\":\"Argo France\",\"description\":\"

Argo France brings together all French contributions to the international Argo programme, i.e. scientific and technical coordination, float purchase and deployment, data processing and interfaces with the user community (operational oceanography with Mercator Ocean and research).

\",\"status\":\"all\",\"type\":\"ri\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"dariah\",\"name\":\"DARIAH EU\",\"description\":\"The Digital Research Infrastructure for the Arts and Humanities (DARIAH) aims to enhance and support digitally-enabled research and teaching across the arts and humanities. It develops, maintains and operates an infrastructure in support of ICT-based research practices and sustains researchers in using them to build, analyse and interpret digital resources. DARIAH was established as a European Research Infrastructure Consortium (ERIC) in August 2014. Currently, DARIAH has 18 Members and several cooperating partners in eight non-member countries. Here you will find a growing collection of DARIAH-affiliated research outputs and other documents.\",\"status\":\"all\",\"type\":\"ri\",\"subjects\":null,\"zenodoCommunity\":\"dariah\"},{\"id\":\"north-american-studies\",\"name\":\"North American Studies\",\"description\":\"

North American Studies was born in the context of collaboration between CISAN, the Center for Research on North America and the multi and interdisciplinary research Unit of Universidad National Autonoma de Mexico UNAM, and OpenAIRE. The aim of this collaboration is to strengthen the integration and automated intercommunication between digital platforms in North America and Europe and become a leading platform for North America Studies which will facilitate communication among the community.

In this community scholars, teachers, students, policy stakeholders, journalists and anyone interested in the validated information of the region will be very welcome and able to find easy and directly research outputs on North American Studies, enriching and updating their knowledge from very diverse perspectives and origins in a single portal.

The platform is managed by MiCISAN, the institutional repository of CISAN, whose purpose is collecting research on North American research findings. With OpenAIRE collaboration, it will be possible the integration, organization, protection and dissemination of the CISAN’s scientific products, and similar scientific sources and resources by following the OpenAIRE guidelines and FAIR Principles, in the frame of Open Science.

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"redancommunity\"},{\"id\":\"dth\",\"name\":\"Digital Twins in Health\",\"description\":\"

Open Research Gateway on Digital Twins in Health.

Virtual Human Twin (VHT) is an integrated multiscale, multi-time, and multi-discipline representation of quantitative human physiology and pathology. Its realisation through a collaborative distributed knowledge and resource platform is specifically designed to accelerate the development, integration, and adoption of patient-specific predictive computer models, which will be used as clinical decision support systems, for personal health forecasting or as methodologies for the development and de-risking of personalised medical products. The vision of EDITH is to facilitate the realisation of the opportunities presented by VHTs for the benefit of patients, healthcare providers, regulatory bodies and industry, both within Europe and globally.

Objectives

 

ECOSYSTEM

EDITH has the objective to frame an inclusive ecosystem of digital twins in healthcare within the EU Member States and associated countries. It will start with a comprehensive mapping of the existing relevant actors, initiatives, resources (i.e., models, data sets, methods, good practices, infrastructures, solutions, services), and barriers in the digital twins. This will ensure adequate clinical representation, while fostering collaboration and integration of all relevant stakeholders, such as solution developers, technology providers, infrastructure providers, end-users (healthcare professionals and patients), regulatory agencies, and Health Technology Assessment (HTA) bodies.

 

ROADMAP

EDITH has the objective to build a roadmap with all the necessary conditions to evolve towards an integrated Virtual Human Twin (VHT). The roadmap will identify the necessary building blocks to ensure the VHT’s clinical application and formulate clear short- and mid-term policy recommendations. It will also address aspects of interoperability, computability, health information integration from various sources. It will identify any possible implementation needs and barriers, including the development of a strategic approach for clinical deployment of the VHT model. This will foster the uptake of personalised clinical decision-making, with a particular focus on areas of unmet medical needs.

 

REPOSITORY

EDITH has the objective to develop a federated and cloud-based repository of digital twins (data, models, algorithms, and good practices) in healthcare. The repository will provide a virtual collaboration environment for multiple users and organisations, that will pool together existing digital twin resources across Europe. The ecosystem will be leveraged to create a repository catalogue with available resources and recruit resources into the repository from the consortium and external contributors. Through a federated approach, links will be established with ongoing initiatives that have complementary objectives.

 

SIMULATION PLATFORM

EDITH has the objective to develop the architecture of a simulation platform that will support the transition towards an integrated Virtual Human Twin (VHT). EDITH’s platform, based on a personal user account with specific permissions, will outline how to provide users with a one-stop shop to design, develop, test, and validate single organ digital twins, and combine them with other twins to build integrated VHT models. Five use-cases (cancer, cardiovascular, intensive care, osteoporosis, brain) have been pre-selected to be developed as prototypes, representing the variety of functionalities to be provided by the platform.

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"elixir-gr\",\"name\":\"The Greek National Node of the ESFRI European RI ELIXIR\",\"description\":\"ELIXIR-GR enhances the potential of the Greek bioinformatics community to offer open, easily accessible and state -of- the- art services to the Greek and the international academic community and other stakeholders, such as industry and the health sector. More importantly, by providing these services, the infrastructure facilitates discoveries in the field of the life-sciences, having strong spill over effects in promoting innovation in sectors such as discovery of new drug targets and development of novel therapeutic agents, development of innovative diagnostics, personalized medicine, and development of innovative biotechnological products and processes.\",\"status\":\"all\",\"type\":\"ri\",\"subjects\":null,\"zenodoCommunity\":\"oaa_elixir-gr\"},{\"id\":\"rural-digital-europe\",\"name\":\"Assessing the socio-economic impact of digitalisation in rural areas\",\"description\":\"The scope of this community is to provide access to publications, research data, projects and software for assessing the socio-economic impact of digitalisation in rural areas in Europe\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"mes\",\"name\":\"European Marine Science\",\"description\":\"This community was initially defined to include a very broad range of topics, with the intention to generate a number of more focused and sustainable dashboards for research communities and initiatives. As outlined in the logo of this community, we intend to setup a community dashboard for EuroMarine (a consortium of 56 research and academic organisations) and monitoring dashboards for marine research initiatives, including infrastructures (e.g. EMBRC & EMSO), advisory boards (e.g. Marine Boards & ICES), and transnational funding bodies (e.g. JPI-Oceans and Tara Foundation).\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"oac_mes\"},{\"id\":\"neanias-underwater\",\"name\":\"NEANIAS Underwater Research Community\",\"description\":\"

NEANIAS Underwater Research Community engages Open Science practices through the European Open Science Cloud (EOSC), targeting a wide variety of scientific and professional communities related to  the marine environment. NEANIAS Underwater group provides three user-friendly, cloud-based solutions addressing bathymetry processing, seafloor mosaicking and classification (https://www.neanias.eu/index.php/services/underwater). More specifically:

  • Bathymetry Mapping from Acoustic Data service delivers an advanced, user-friendly, cloud-based version of the popular open-source MB-System software for post-processing bathymetry through Jupyter notebooks with additional functionalities .
  • The Seafloor Mosaicing from Optical Data service provides an operational solution for large area representation (in the order of tens of thousands of images) of the predominantly flat, seafloor, also addressing visibility limitations from the underwater medium (https://marketplace.eosc-portal.eu/services/uw-mos).
  • The Seabed Classification from Multispectral, Multibeam Data service delivers a user-friendly cloud-based solution integrating cutting-edge machine learning frameworks for mapping several seabed classes, validated for archaeological, geo-hazards, energy, and other applications (https://marketplace.eosc-portal.eu/services/uw-map).

NEANIAS: https://www.neanias.eu/

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"neanias\"},{\"id\":\"neanias-atmospheric\",\"name\":\"NEANIAS Atmospheric Research Community\",\"description\":\"

NEANIAS Atmospheric Research Community engages Open Science practices through the European Open Science Cloud (EOSC), targeting a wide variety of sectors related to the atmosphere. The sectors it targets include, among others, meteorologists, industrial air pollutant emitters, ecologists, geologists, rural urban planners and air quality authorities, geohazards, civil protection, insurance or health agencies.

More in detail, NEANIAS Atmospheric group offers the following services on the EOSC platform:

  • The Greenhouse Gases Flux Density Monitoring service (A1 - ATMO-FLUD) delivers an operational workflow for estimating flux density and fluxes of gases, aerosol, energy from data obtained from specifically set meteorological stations, validated towards standardized, regularized processes.
  • The Atmospheric Perturbations and Components Monitoring service (A2, divided in two services, ATMO-STRESS and ATMO-SEISM) performs all required analyses of atmospheric and geological data in order to estimate possible correlations of gaseous and particulate components of the atmosphere with earthquake and volcanic processes.
  • The Air Quality Estimation, Monitoring and Forecasting service (A3 – ATMO-4CAST) delivers a novel cloud-based solution providing crucial information and products to a variety of stakeholder in agriculture, urban/ city authorities, health, insurance agencies and relative governmental authorities.

NEANIAS: https://www.neanias.eu/

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"neanias\"},{\"id\":\"beopen\",\"name\":\"Transport Research\",\"description\":\"Welcome to the Open Research Gateway for Transport Research. This gateway is part of the TOPOS Observatory (https://www.topos-observatory.eu). The TOPOS aims to showcase the status and progress of open science uptake in transport research. It focuses on promoting territorial and cross border cooperation and contributing in the optimization of open science in transport research. The TOPOS Observatory is supported by the EC H2020 BEOPEN project (824323)\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"be-open-transport\"},{\"id\":\"heritage-science\",\"name\":\"Heritage Science\",\"description\":\"

Heritage Science community gateway is managed by the IPERION HS Research Infrastructure EU project. 

Heritage science is the interdisciplinary domain of scientific  study  of  cultural  or  natural  heritage. Heritage science draws on  diverse  humanities, sciences  and  engineering  disciplines. It  focuses  on  enhancing  the  understanding,  care  and  sustainable  use  of  heritage  so it  can enrich people's lives, both today and in the future. Heritage science is an umbrella term encompassing all forms of scientific enquiry into human works and the combined works of nature and humans, of value to people.

The gateway aims at including all the relevant research outcomes in  this  field.

 

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"ni\",\"name\":\"Neuroinformatics\",\"description\":\"The neuroinformatics dashboard gathers research outputs from the 'neuroinformatics' community at large including the fields of: neuroscience, neuroinformatics, brain imaging databases and standards, brain imaging techniques, neuroimaging methods including statistics and machine learning. The dashboard covers a wide range of imaging methods including (but not limited to): MRI, TEP, EEG, MEG, and studies involving human participants as well as animal studies.\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"oac_ni\"},{\"id\":\"dh-ch\",\"name\":\"Digital Humanities and Cultural Heritage\",\"description\":\"This community gathers research results, data, scientific publications and projects related to the domain of Digital Humanities. This broad definition includes Humanities, Cultural Heritage, History, Archaeology and related fields.\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"oac_dh-ch\"},{\"id\":\"eutopia\",\"name\":\"EUTOPIA Open Research Portal\",\"description\":\"

EUTOPIA is an ambitious alliance of 10 like-minded universities ready to reinvent themselves: the Babeș-Bolyai University in Cluj-Napoca (Romania), the Vrije Universiteit Brussel (Belgium), the Ca'Foscari University of Europe (Italy), CY Cergy Paris Université (France), the Technische Universität Dresden (Germany), the University of Gothenburg (Sweden), the University of Ljubljana (Slovenia), the NOVA University Lisbon (Portugal), the University of Pompeu Fabra (Spain) and the University of Warwick (United Kingdom). Together, these 10 pioneers join forces to build the university of the future.

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"sdsn-gr\",\"name\":\"Sustainable Development Solutions Network - Greece\",\"description\":\"The UN Sustainable Development Solutions Network (SDSN) has been operating since 2012 under the auspices of the UN Secretary-General. SDSN mobilizes global scientific and technological expertise to promote practical solutions for sustainable development, including the implementation of the Sustainable Development Goals (SDGs) and the Paris Climate Agreement. The Greek hub of SDSN has been included in the SDSN network in 2017 and is co-hosted by ICRE8: International Center for Research on the Environment and the Economy and the Political Economy of Sustainable Development Lab.\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"oac_sdsn-greece\"},{\"id\":\"covid-19\",\"name\":\"Corona Virus Disease\",\"description\":\"

This portal provides access to publications, research data, projects and software that may be relevant to the Corona Virus Disease (COVID-19). The OpenAIRE COVID-19 Gateway aggregates COVID-19 related records, links them and provides a single access point for discovery and navigation. We tag content from the OpenAIRE Research Graph (10,000+ data sources) and additional sources. All COVID-19 related research results are linked to people, organizations and projects, providing a contextualized navigation.

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"covid-19\"},{\"id\":\"enermaps\",\"name\":\"Welcome to EnerMaps Gateway! Find the latest scientific data.\",\"description\":\"

EnerMaps Open Data Management Tool aims to  improve data management  and  accessibility  in the field of  energy research  for the  renewable energy industry.

EnerMaps’ tool accelerates and facilitates the energy transition offering a qualitative and user-friendly digital platform to the energy professionals.

The project is based on the  FAIR data principle  which requires data to be  Findable,  Accessible,  Interoperable and  Reusable.

EnerMaps project  coordinates and enriches existing energy databases to promote  trans-disciplinary research  and to develop partnerships between researchers and the energy professionals.

The EnerMaps project has received funding from the European Union’s Horizon 2020 research and innovation program under   grant agreement N°884161

 

Website:  https://enermaps.eu/ 

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"eu-conexus\",\"name\":\"European University for Smart Urban Coastal Sustainability\",\"description\":\"

The European University for Smart Urban Coastal Sustainability - EU-CONEXUS promotes common European values and a strengthened European identity by bringing together a new generation of Europeans, who can cooperate and work within different European cultures, in different languages and across borders, sectors and academic disciplines. EU-CONEXUS is committed to creating a new institutional framework for higher education in Europe that allows for a truly European way of studying and carrying out research through institutional alignment and seamless mobility for all. 

The thematic framework Smart Urban Coastal Sustainability (SmUCS) means for EU-CONEXUS to focus its research & innovation, education and knowledge sharing activities on societal challenges that are linked to a specific geographical location – the urban and semi-urbanised coastal (rivers and oceans) regions. SmUCS is not a subject-driven thematic framework, but a challenge-driven education and research domain.

\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"}]"; - List communityMap = Arrays - .asList( - "clarin@@Common Language Resources and Technology Infrastructure@@CLARIN@@@@oac_clarin@@ri", - "ee@@Sustainable Development Solutions Network - Greece@@The UN Sustainable Development Solutions Network (SDSN) has been operating since 2012 under the auspices of the UN Secretary-General. " - + - "SDSN mobilizes global scientific and technological expertise to promote practical solutions for sustainable development, including the implementation of the Sustainable Development Goals (SDGs) and the Paris Climate Agreement. The Greek hub of SDSN has been included in the SDSN network in 2017 and is co-hosted by ICRE8: International Center for Research on the Environment and the Economy and the Political Economy of Sustainable Development Lab.@@SDG13 - Climate action,SDG8 - Decent work and economic growth,SDG15 - " - + - "Life on land,SDG2 - Zero hunger,SDG17 - Partnerships for the ´goals,SDG10 - Reduced inequalities,SDG5 - Gender equality,SDG12 - Responsible consumption and production,SDG14 - Life below water,SDG6 - Clean water and sanitation,SDG11 - Sustainable cities and communities,SDG1 - No poverty,SDG3 - Good health and well being,SDG7 - Affordable and clean energy,SDG4 - Quality education,SDG9 - Industry innovation and infrastructure,SDG16 - Peace justice and strong institutions@@oac_sdsn-greece@@community", - "dh-ch@@Digital Humanities and Cultural Heritage@@This community gathers research results, data, scientific publications and projects related to the domain of Digital Humanities. This broad definition includes Humanities, Cultural Heritage, History, Archaeology and related fields.@@modern art,monuments,europeana data model,sites,field walking,frescoes,LIDO metadata schema,art history,excavation,Arts and Humanities General,cities,coins,temples,numismatics,lithics,roads,environmental archaeology,digital cultural heritage,archaeological reports,history,CRMba,churches,cultural heritage,archaeological stratigraphy,religious art,buidings,digital humanities,survey,archaeological sites,linguistic studies,bioarchaeology,architectural orders,palaeoanthropology,fine arts,europeana,CIDOC CRM,decorations,classic art,stratigraphy,digital archaeology,intangible cultural heritage,walls,humanities,chapels,CRMtex,Language and Literature,paintings,archaeology,fair data,mosaics,burials,architecture,medieval art,castles,CARARE metadata schema,statues,natural language processing,inscriptions,CRMsci,vaults,contemporary art,Arts and Humanities,CRMarchaeo,pottery,site,architectural,vessels@@oac_dh-ch@@community", - "fam@@Fisheries and Aquaculture Management@@Conservation of marine resources for sustainable development. The Fisheries and Aquaculture community focus on resources (document, data, codes..) which have been produced in the framework of projects (H2020, FP7, ..) related to the domain of fisheries and aquaculture.@@Stock Assessment,pelagic,Acoustic,Fish farming,Fisheries,Fishermen,maximum sustainable yield,trawler,Fishing vessel,Fisherman,Fishing gear,mackerel,RFMO,Fish Aggregating Device,Bycatch,Fishery,common fisheries policy,Fishing fleet,Aquaculture@@fisheries@@community", - "ni@@Neuroinformatics@@The neuroinformatics dashboard gathers research outputs from the 'neuroinformatics' community at large including the fields of: neuroscience, neuroinformatics, brain imaging databases and standards, brain imaging techniques, neuroimaging methods including statistics and machine learning. The dashboard covers a wide range of imaging methods including (but not limited to): MRI, TEP, EEG, MEG, and studies involving human participants as well as animal studies.@@brain mapping,brain imaging,electroencephalography,arterial spin labelling,brain fingerprinting,brain,neuroimaging,Multimodal Brain Image Analysis,fMRI,neuroinformatics,fetal brain,brain ultrasonic imaging,topographic brain mapping,diffusion tensor imaging,computerized knowledge assessment,connectome mapping,brain magnetic resonance imaging,brain abnormalities@@oac_ni@@community", - "mes@@European Marine Science@@This community was initially defined to include a very broad range of topics, with the intention to generate a number of more focused and sustainable dashboards for research communities and initiatives. As outlined in the logo of this community, we intend to setup a community dashboard for EuroMarine (a consortium of 56 research and academic organisations) and monitoring dashboards for marine research initiatives, including infrastructures (e.g. EMBRC & EMSO), advisory boards (e.g. Marine Boards & ICES), and transnational funding bodies (e.g. JPI-Oceans and Tara Foundation).@@marine,ocean,fish,aqua,sea@@oac_mes@@community", - "instruct@@Instruct-ERIC@@Instruct-ERIC is the European Research Infrastructure for Structural Biology@@@@oac_instruct@@community", - "elixir-gr@@The Greek National Node of the ESFRI European RI ELIXIR@@ELIXIR-GR enhances the potential of the Greek bioinformatics community to offer open, easily accessible and state -of- the- art services to the Greek and the international academic community and other stakeholders, such as industry and the health sector. More importantly, by providing these services, the infrastructure facilitates discoveries in the field of the life-sciences, having strong spill over effects in promoting innovation in sectors such as discovery of new drug targets and development of novel therapeutic agents, development of innovative diagnostics, personalized medicine, and development of innovative biotechnological products and processes.@@@@oaa_elixir-gr@@ri", - "aginfra@@Agricultural and Food Sciences@@The scope of this community is to provide access to publications, research data, projects and software that are related to agricultural and food sciences@@animal production and health,fisheries and aquaculture,food safety and human nutrition,information management,food technology,agri-food education and extension,natural resources and environment,food system,engineering technology and Research,agriculture,food safety risk assessment,food security,farming practices and systems,plant production and protection,agri-food economics and policy,Agri-food,food distribution,forestry@@oac_aginfra@@community", - "dariah@@DARIAH EU@@The Digital Research Infrastructure for the Arts and Humanities (DARIAH) aims to enhance and support digitally-enabled research and teaching across the arts and humanities. It develops, maintains and operates an infrastructure in support of ICT-based research practices and sustains researchers in using them to build, analyse and interpret digital resources. DARIAH was established as a European Research Infrastructure Consortium (ERIC) in August 2014. Currently, DARIAH has 18 Members and several cooperating partners in eight non-member countries. Here you will find a growing collection of DARIAH-affiliated research outputs and other documents. @@@@dariah@@ri", - "epos@@European Plate Observing System@@EPOS, the European Plate Observing System, is a long-term plan to facilitate integrated use of data, data products, and facilities from distributed research infrastructures for solid Earth science in Europe.@@@@@@ri", - "covid-19@@Corona Virus Disease@@This portal provides access to publications, research data, projects and software that may be relevant to the Corona Virus Disease (COVID-19). The OpenAIRE COVID-19 Gateway aggregates COVID-19 related records, links them and provides a single access point for discovery and navigation. We tag content from the OpenAIRE Research Graph (10,000+ data sources) and additional sources. All COVID-19 related research results are linked to people, organizations and projects, providing a contextualized navigation.@@COVID19,SARS-CoV,HCoV-19,mesh:C000657245,MERS-CoV,Síndrome Respiratorio Agudo Severo,mesh:COVID-19,COVID2019,COVID-19,SARS-CoV-2,2019 novel coronavirus,severe acute respiratory syndrome coronavirus 2,Orthocoronavirinae,Coronaviridae,mesh:D045169,coronavirus,SARS,coronaviruses,coronavirus disease-19,sars cov 2,Middle East Respiratory Syndrome,Severe acute respiratory syndrome coronavirus 2,Severe Acute Respiratory Syndrome,coronavirus disease 2019,2019-nCoV@@covid-19@@community"); - @Mock - private ISLookUpService isLookUpService; - - private QueryInformationSystem queryInformationSystem; private static String workingDir; - @BeforeEach - public void setUp() throws ISLookUpException { - lenient().when(isLookUpService.quickSearchProfile(XQUERY_ENTITY)).thenReturn(communityMap); - queryInformationSystem = new QueryInformationSystem(); - queryInformationSystem.setIsLookUp(isLookUpService); - } + @BeforeAll public static void beforeAll() throws IOException { @@ -86,15 +60,18 @@ public class CreateEntityTest { } @Test - void test1() throws ISLookUpException, IOException { + void test1() throws IOException { List cInfoList = new ArrayList<>(); final Consumer consumer = ci -> cInfoList.add(ci); - queryInformationSystem.getContextInformation(consumer); + UtilCommunityAPI queryCommunityAPI = new UtilCommunityAPI(); + new ObjectMapper().readValue(validCommunities, CommunityModelList.class) + .forEach(ri -> consumer.accept(queryCommunityAPI.getContext(ri))); + List riList = new ArrayList<>(); cInfoList.forEach(cInfo -> riList.add(Process.getEntity(cInfo))); - Assertions.assertEquals(12, riList.size()); + Assertions.assertEquals(25, riList.size()); riList.stream().forEach(c -> { switch (c.getAcronym()) { @@ -114,7 +91,7 @@ public class CreateEntityTest { .equals( String .format( - "%s|%s::%s", Constants.CONTEXT_ID, Constants.CONTEXT_NS_PREFIX, + "%s::%s", Constants.CONTEXT_NS_PREFIX, DHPUtils.md5(c.getAcronym())))); Assertions.assertTrue(c.getZenodo_community().equals("https://zenodo.org/communities/oac_mes")); Assertions.assertTrue("mes".equals(c.getAcronym())); @@ -129,7 +106,7 @@ public class CreateEntityTest { .equals( String .format( - "%s|%s::%s", Constants.CONTEXT_ID, Constants.CONTEXT_NS_PREFIX, + "%s::%s", Constants.CONTEXT_NS_PREFIX, DHPUtils.md5(c.getAcronym())))); Assertions.assertTrue(c.getZenodo_community().equals("https://zenodo.org/communities/oac_clarin")); Assertions.assertTrue("clarin".equals(c.getAcronym())); @@ -162,7 +139,8 @@ public class CreateEntityTest { List cInfoList = new ArrayList<>(); final Consumer consumer = ci -> cInfoList.add(ci); - queryInformationSystem.getContextInformation(consumer); + UtilCommunityAPI queryCommunityAPI = new UtilCommunityAPI(); + queryCommunityAPI.getContextInformation().forEach(ci -> consumer.accept(ci)); for (ContextInfo cInfo : cInfoList) { writer.write(new Gson().toJson(Process.getEntity(cInfo))); @@ -171,3 +149,8 @@ public class CreateEntityTest { } } +class CommunityModelList extends ArrayList { + public CommunityModelList(){ + super(); + } +} diff --git a/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateRelationTest.java b/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateRelationTest.java index 9b1fb7a..d52ab99 100644 --- a/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateRelationTest.java +++ b/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateRelationTest.java @@ -1,10 +1,13 @@ package eu.dnetlib.dhp.oa.graph.dump.complete; +import java.io.IOException; import java.util.*; import java.util.function.Consumer; import java.util.stream.Collectors; +import eu.dnetlib.dhp.communityapi.QueryCommunityAPI; +import eu.dnetlib.dhp.oa.graph.dump.UtilCommunityAPI; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -22,542 +25,26 @@ import eu.dnetlib.dhp.utils.DHPUtils; class CreateRelationTest { - List communityContext = Arrays - .asList( - "\n" + - " all\n" + - " CLARIN\n" + - " https://www.clarin.eu/sites/default/files/clarin-frontpage-logo.jpg\n" - + - " Common Language Resources and Technology Infrastructure\n" + - " maria@clarin.eu,dieter@clarin.eu,f.m.g.dejong@uu.nl,paolo.manghi@isti.cnr.it\n" - + - " \n" + - " (Part of) the work reported here was made possible by using the CLARIN infrastructure.\n" - + - " The work reported here has received funding through <CLARIN national consortium member, e.g. CLARIN.SI>, <XYZ> project, grant no. <XYZ>.\n" - + - " The work reported here has received funding (through CLARIN ERIC) from the European Union’s Horizon 2020 research and innovation programme under grant agreement No <0-9> for project <XYZ>.\n" - + - " (E.g. No 676529 for project CLARIN-PLUS.)\n" + - " oac_clarin\n" + - " 2018-03-01T12:00:00\n" + - " \n" + - " \n" + - " CLARIN-PLUS\n" + - " \n" + - " \n" + - " 676529\n" + - " http://www.clarin.eu\n" + - " EC\n" + - " H2020-INFRADEV-1-2015-1\n" + - " CLARIN+\n" + - " \n" + - " \n" + - " Common Language Resources and Technology Infrastructure\n" - + - " CLARIN\n" + - " 212230\n" + - " EC\n" + - " corda_______::ef782b2d85676aa3e5a907427feb18c4\n" + - " \n" + - " \n" + - " " + - "\n" + - " \n" + - " LINDAT/CLARIN repository\n" + - " LINDAT/CLARIN repository\n" + - " true\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " CLARIN-D\n" + - " https://www.clarin-d.de/en/\n" + - " \n" + - " http://www.lrec-conf.org/proceedings/lrec2018/pdf/504.pdf\n" - + - " Germany\n" + - " \n" + - " \n" + - " \n" - + - " \n" + - "", - "\n" + - " all\n" + - " This community gathers research results, data, scientific publications and projects related to the domain of Digital Humanities. This broad definition includes Humanities, Cultural Heritage, History, Archaeology and related fields.\n" - + - " http://sanmamante.org/DH_CH_logo.png\n" + - " Digital Humanities and Cultural Heritage\n" + - " ileniagalluccio87@gmail.com,achille.felicetti@gmail.com,paolo.manghi@isti.cnr.it,tim.evans@york.ac.uk\n" - + - " modern art,monuments,europeana data model,sites,field walking,frescoes,LIDO metadata schema,art history,excavation,Arts and Humanities General,cities,coins,temples,numismatics,lithics,roads,environmental archaeology,digital cultural heritage,archaeological reports,history,CRMba,churches,cultural heritage,archaeological stratigraphy,religious art,buidings,digital humanities,survey,archaeological sites,linguistic studies,bioarchaeology,architectural orders,palaeoanthropology,fine arts,europeana,CIDOC CRM,decorations,classic art,stratigraphy,digital archaeology,intangible cultural heritage,walls,humanities,chapels,CRMtex,Language and Literature,paintings,archaeology,fair data,mosaics,burials,architecture,medieval art,castles,CARARE metadata schema,statues,natural language processing,inscriptions,CRMsci,vaults,contemporary art,Arts and Humanities,CRMarchaeo,pottery,site,architectural,vessels\n" - + - " The present work has been partially supported by the PARTHENOS project, funded by the European Commission (Grant Agreement No. 654119) under the HORIZON 2020 - INFRADEV-4-2014/2015 call\n" - + - " oac_dh-ch\n" + - " 2018-03-01T12:00:00\n" + - " \n" + - " \n" - + - " Pooling Activities, Resources and Tools for Heritage E-research Networking, Optimization and Synergies\n" - + - " The present work has been partially supported by the PARTHENOS project, funded by the European Commission (Grant Agreement No. 654119) under the HORIZON 2020 - INFRADEV-4-2014/2015 call\n" - + - " \n" + - " 654119\n" + - " http://www.parthenos-project.eu\n" + - " EC\n" + - " PARTHENOS\n" + - " \n" + - " \n" + - " \n" + - " \n" - + - " re3data_____::9ebe127e5f3a0bf401875690f3bb6b81\n" + - " The UK's largest collection of digital research data in the social sciences and humanities\n" - + - " UK Data Archive\n" + - " true\n" + - " \n" + - " \n" - + - " doajarticles::c6cd4b532e12868c1d760a8d7cda6815\n" + - " Journal of Data Mining and Digital Humanities\n" + - " Journal of Data Mining and Digital Humanities\n" + - " true\n" + - " \n" + - " \n" - + - " doajarticles::a6de4499bb87bf3c01add0a9e2c9ed0b\n" + - " Frontiers in Digital Humanities\n" + - " Frontiers in Digital Humanities\n" + - " true\n" + - " \n" + - " \n" - + - " doajarticles::6eb31d13b12bc06bbac06aef63cf33c9\n" + - " Il Capitale Culturale: Studies on the Value of Cultural Heritage\n" - + - " Il Capitale Culturale: Studies on the Value of Cultural Heritage\n" - + - " true\n" + - " \n" + - " \n" - + - " doajarticles::0da84e9dfdc8419576169e027baa8028\n" + - " Conservation Science in Cultural Heritage\n" + - " Conservation Science in Cultural Heritage\n" + - " true\n" + - " \n" + - " \n" - + - " re3data_____::84e123776089ce3c7a33db98d9cd15a8\n" + - " Electronic Archiving System\n" + - " EASY\n" + - " true\n" + - " \n" + - " \n" + - " openaire____::c5502a43e76feab55dd00cf50f519125\n" + - " DANS-KB Harvester\n" + - " Gemeenschappelijke Harvester DANS-KB\n" + - " true\n" + - " \n" + - " \n" + - " re3data_____::a48f09c562b247a9919acfe195549b47\n" + - " ads\n" + - " Archaeology Data Service\n" + - " true\n" + - " \n" + - " \n" + - " opendoar____::97275a23ca44226c9964043c8462be96\n" + - " KNAW Repository\n" + - " KNAW Repository\n" + - " true\n" + - " \n" + - " \n" - + - " doajarticles::2899208a99aa7d142646e0a80bfeef05\n" + - " Internet Archaeology\n" + - " Internet Archaeology\n" + - " true\n" + - " \n" + - " \n" + - " \n" + - "\n", - "\n" + - " all\n" + - " The neuroinformatics dashboard gathers research outputs from the 'neuroinformatics' community at large including the fields of: neuroscience, neuroinformatics, brain imaging databases and standards, brain imaging techniques, neuroimaging methods including statistics and machine learning. The dashboard covers a wide range of imaging methods including (but not limited to): MRI, TEP, EEG, MEG, and studies involving human participants as well as animal studies.\n" - + - " https://docs.google.com/drawings/u/0/d/10e191xGoGf4uaRluMqbt_7cCj6LSCs2a29im4CmWjqU/export/png\n" - + - " Neuroinformatics\n" + - " sorina.pop@creatis.insa-lyon.fr,camille.maumet@inria.fr,christian.barillot@irisa.fr,xavier.rolland@irisa.fr,axel.bonnet@creatis.insa-lyon.fr,paolo.manghi@isti.cnr.it\n" - + - " brain mapping,brain imaging,electroencephalography,arterial spin labelling,brain fingerprinting,brain,neuroimaging,Multimodal Brain Image Analysis,fMRI,neuroinformatics,fetal brain,brain ultrasonic imaging,topographic brain mapping,diffusion tensor imaging,computerized knowledge assessment,connectome mapping,brain magnetic resonance imaging,brain abnormalities\n" - + - " \n" + - " oac_ni\n" + - " 2018-03-01T12:00:00\n" + - " \n" + - " \n" + - " \n" + - " re3data_____::5b9bf9171d92df854cf3c520692e9122\n" + - " Formerly:OpenFMRI\n" + - " OpenNeuro\n" + - " true\n" + - " \n" + - " \n" + - " doajarticles::c7d3de67dc77af72f6747157441252ec\n" + - " Research Ideas and Outcomes\n" + - " Research Ideas and Outcomes\n" + - " true\n" + - " \n" + - " \n" + - " re3data_____::8515794670370f49c1d176c399c714f5\n" + - " Neuroimaging Informatics Tools and Resources Clearinghouse\n" - + - " NITRC\n" + - " true\n" + - " \n" + - " \n" + - " doajarticles::d640648c84b10d425f96f11c3de468f3\n" + - " Frontiers in Neuroinformatics\n" + - " Frontiers in Neuroinformatics\n" + - " true\n" + - " \n" + - " \n" + - " doajarticles::0c0e74daa5d95504eade9c81ebbd5b8a\n" + - " NeuroImage: Clinical\n" + - " NeuroImage: Clinical\n" + - " true\n" + - " \n" + - " \n" + - " rest________::fb1a3d4523c95e63496e3bc7ba36244b\n" + - " NeuroVault\n" + - " NeuroVault\n" + - " true\n" + - " \n" + - " \n" + - "\n", - "\n" + - " all\n" + - " Instruct-ERIC is the European Research Infrastructure for Structural Biology\n" - + - " https://instruct-eric.eu/templates/instructeric/images/logos/instruct-eric-logo-noline.png\n" - + - " Instruct-ERIC\n" + - " claudia@instruct-eric.eu,carazo@cnb.csic.es,echrysina@eie.gr,susan@instruct-eric.eu,naomi@instruct-eric.eu,natalie@instruct-eric.eu,pmarie@igbmc.fr,darren.hart@ibs.fr,claudia@strubi.ox.ac.uk,paolo.manghi@isti.cnr.it\n" - + - " \n" + - " The authors acknowledge the support and the use of resources of Instruct-ERIC.\n" - + - " The authors acknowledge the support and the use of resources of Instruct (PID # or APPID #), a Landmark ESFRI project\n" - + - " oac_instruct\n" + - " 2018-03-01T12:00:00\n" + - " \n" + - " \n" - + - " Authentication and Authorisation For Research and Collaboration\n" - + - " \n" + - " 730941\n" + - " \n" + - " H2020-EINFRA-2016-1\n" + - " AARC2\n" + - " EC\n" + - " \n" + - " \n" - + - " Building data bridges between biological and medical infrastructures in Europe\n" - + - " \n" + - " 284209\n" + - " \n" + - " FP7-INFRASTRUCTURES-2011-1\n" + - " EC\n" + - " BioMedBridges\n" + - " \n" + - " \n" - + - " Transnational access and enhancement of integrated Biological Structure determination at synchrotron X-ray radiation facilities\n" - + - " \n" + - " 283570\n" + - " \n" + - " FP7-INFRASTRUCTURES-2011-1\n" + - " EC\n" + - " BioStruct-X\n" + - " \n" + - " \n" - + - " Coordinated Research Infrastructures Building Enduring Life-science services\n" - + - " \n" + - " 654248\n" + - " \n" + - " H2020-INFRADEV-1-2014-1\n" + - " EC\n" + - " CORBEL\n" + - " \n" + - " \n" - + - " Infrastructure for NMR, EM and X-rays for translational research\n" - + - " \n" + - " 653706\n" + - " \n" + - " H2020-INFRAIA-2014-2015\n" + - " EC\n" + - " iNEXT\n" + - " \n" + - " \n" - + - " Integrated Structural Biology Infrastructure\n" + - " \n" + - " 211252\n" + - " \n" + - " FP7-INFRASTRUCTURES-2007-1\n" + - " EC\n" + - " INSTRUCT\n" + - " \n" + - " \n" - + - " Releasing the full potential of Instruct to expand and consolidate infrastructure services for integrated structural life science research\n" - + - " \n" + - " 731005\n" + - " \n" + - " H2020-INFRADEV-2016-1\n" + - " EC\n" + - " INSTRUCT-ULTRA\n" + - " \n" + - " \n" - + - " Opening Synchrotron Light for Experimental Science and Applications in the Middle East\n" - + - " \n" + - " 730943\n" + - " \n" + - " H2020-INFRASUPP-2016-1\n" + - " EC\n" + - " OPEN SESAME\n" + - " \n" + - " \n" - + - " Infrastructure for Protein Production Platforms\n" - + - " \n" + - " 227764\n" + - " \n" + - " FP7-INFRASTRUCTURES-2008-1\n" + - " EC\n" + - " PCUBE\n" + - " \n" + - " \n" - + - " European Vaccine Research and Development Infrastructure\n" - + - " \n" + - " 730964\n" + - " \n" + - " H2020-INFRAIA-2016-1\n" + - " EC\n" + - " TRAMSVAC2\n" + - " \n" + - " \n" - + - " World-wide E-infrastructure for structural biology\n" - + - " \n" + - " 675858\n" + - " \n" + - " EC | H2020 | RIA\n" + - " EC\n" + - " West-Life\n" + - " \n" + - " \n" + - " Expanding research infrastructure visibility to strengthen strategic partnerships\n" - + - " RI-VIS\n" + - " 824063\n" + - " EC\n" + - " corda__h2020::af93b591b76991d8437993a8f6fc6538\n" + - " \n" + - " \n" + - " \n" - + - " \n" - + - " \n" + - " instruct\n" + - " \n" + - " \n" + - " \n" - + - " west-life\n" + - " \n" + - " \n" + - " \n" + - " \n" - + - " \n" + - " FRISBI\n" + - " aHR0cDovL2ZyaXNiaS5ldS9zdGF0aWMvaW1hZ2VzL2xvZ29zL2xvZ28tZnJpc2JpLnBuZw==\n" - + - " aHR0cDovL2ZyaXNiaS5ldS8=\n" + - " \n" + - " \n" + - " RI-VIS\n" + - " aHR0cHM6Ly9yaS12aXMuZXUvbmV0d29yay9yaXZpcy90ZW1wbGF0ZXMvcml2aXMvaW1hZ2VzL1JJLVZJU0xvZ29GaW5hbC0wNi5wbmc=\n" - + - " aHR0cHM6Ly9yaS12aXMuZXU=\n" + - " \n" + - " \n" + - " CIISB\n" + - " aHR0cDovL2JpYy5jZWl0ZWMuY3ovZmlsZXMvMjkyLzEyNS5KUEc=\n" + - " aHR0cHM6Ly93d3cuY2lpc2Iub3Jn\n" + - " \n" + - " \n" + - "\n", - "\n" + - " all\n" + - " ELIXIR-GR enhances the potential of the Greek bioinformatics community to offer open, easily accessible and state -of- the- art services to the Greek and the international academic community and other stakeholders, such as industry and the health sector. More importantly, by providing these services, the infrastructure facilitates discoveries in the field of the life-sciences, having strong spill over effects in promoting innovation in sectors such as discovery of new drug targets and development of novel therapeutic agents, development of innovative diagnostics, personalized medicine, and development of innovative biotechnological products and processes.\n" - + - " https://elixir-greece.org/sites/default/files/ELIXIR_GREECE_white_background.png\n" - + - " The Greek National Node of the ESFRI European RI ELIXIR\n" + - " vergoulis@imis.athena-innovation.gr,schatz@imis.athena-innovation.gr,paolo.manghi@isti.cnr.it\n" - + - " \n" + - " \n" + - " oaa_elixir-gr\n" + - " 2018-03-01T12:00:00\n" + - " \n" + - " \n" + - " BIO-INFORMATICS RESEARCH NETWORK COORDINATING CENTER (BIRN-CC)\n" - + - " \n" + - " 1U24RR025736-01\n" + - " NIH\n" + - " \n" + - " \n" + - " COLLABORATIVE RESEARCH: The Cognitive Neuroscience of Category Learning\n" - + - " \n" + - " 0223843\n" + - " NSF\n" + - " \n" + - " \n" + - " The Cognitive Atlas: Developing an Interdisciplinary Knowledge Base Through Socia\n" - + - " \n" + - " 5R01MH082795-05\n" + - " NIH\n" + - " \n" + - " \n" + - " Fragmented early life environmental and emotional / cognitive vulnerabilities\n" - + - " \n" + - " 1P50MH096889-01A1\n" + - " NIH\n" + - " \n" + - " \n" + - " Enhancement of the 1000 Functional Connectome Project\n" - + - " \n" + - " 1R03MH096321-01A1\n" + - " TUBITAK\n" + - " \n" + - " \n" + - " CRCNS Data Sharing: An open data repository for cognitive neuroscience: The OpenfMRI Project\n" - + - " \n" + - " 1131441\n" + - " NSF\n" + - " \n" + - " \n" + - " Enhancing Human Cortical Plasticity: Visual Psychophysics and fMRI\n" - + - " \n" + - " 0121950\n" + - " NSF\n" + - " \n" + - " \n" + - " Transforming statistical methodology for neuroimaging meta-analysis.\n" - + - " \n" + - " 100309\n" + - " WT\n" + - " \n" + - " " + - - " \n" - + - " \n" + - " rest________::b8e502674c3c3499d5374e9b2ea6d8d5\n" + - " bio.tools\n" + - " bio.tools\n" + - " false\n" + - " \n" + - " \n" + - " \n" + - " \n" - + - " \n" + - " \n" + - " ATHENA RC\n" + - " aHR0cHM6Ly9lbGl4aXItZ3JlZWNlLm9yZy9zaXRlcy9kZWZhdWx0L2ZpbGVzL3N0eWxlcy90aHVtYm5haWwvcHVibGljL3BhcnRuZXJfbG9nb3MvYXRoZW5hX2xvZ28uanBnP2l0b2s9VXdGWFNpZng=\n" - + - " aHR0cHM6Ly93d3cuYXRoZW5hLWlubm92YXRpb24uZ3IvZW4=\n" + - " \n" + - " \n" - + - ""); - - private QueryInformationSystem queryInformationSystem; - - private Map map; - - @BeforeEach - public void setUp() { - - queryInformationSystem = new QueryInformationSystem(); - queryInformationSystem.setContextRelationResult(communityContext); - } + String contextInfo1 = "{\"id\":\"eut\",\"description\":null,\"type\":null,\"zenodocommunity\":null,\"name\":null,\"projectList\":[],\"datasourceList\":[\"opendoar____::39e4973ba3321b80f37d9b55f63ed8b8\",\"opendoar____::cda72177eba360ff16b7f836e2754370\",\"opendoar____::71f6278d140af599e06ad9bf1ba03cb0\",\"opendoar____::f5c59267dae7d123f54b741a76f28f84\",\"opendoar____::532a082cc38eaffa923d73bce41b4061\",\"opendoar____::00a03ec6533ca7f5c644d198d815329c\",\"opendoar____::33a854e247155d590883b93bca53848a\"],\"subject\":null}" ; + String contextInfo2 ="{\"id\":\"knowmad\",\"description\":null,\"type\":null,\"zenodocommunity\":null,\"name\":null,\"projectList\":[],\"datasourceList\":[\"issn___print::81db6614a3fa07becf706193d4754f30\",\"doajarticles::71eae002613af3569ea42b7093eefdbd\",\"doajarticles::daf53452e1199952d6c95ee7d0088d35\",\"issn___print::ff1a02f622ff006edc668e55fc865ae8\",\"doajarticles::14c007581eb12d843050ebf0493f2254\",\"issn__online::14c007581eb12d843050ebf0493f2254\",\"doajarticles::19a7308c7287b3784aacdb1979141c50\",\"doajarticles::c28985d2363f1ed20048dfd682ee14be\",\"issn__online::c28985d2363f1ed20048dfd682ee14be\",\"doajarticles::81db6614a3fa07becf706193d4754f30\",\"doajarticles::588fc0f98218e9f29a0dabe1182851c4\",\"doajarticles::5ccbe475390dfa642a356c7fd678b70a\",\"doajarticles::cf63b988539f8d28ed366220691f751b\",\"doajarticles::c03353a080ac66c37a1f6aa2de05ca63\",\"issn__online::efec4cc1b1143f69d7d0954a2e9b18b6\",\"doajarticles::25ddd7bb737fc8b027b455f6712111a0\",\"doajarticles::ca2e3cc507ff73298333ed53177e9916\",\"doajarticles::220ab67f748963b6932600585452ad83\",\"doajarticles::b718013941a35a86b17b9b57aca9d260\",\"doajarticles::934e4b68deaeee0781f18a6a6e4fd906\",\"doajarticles::43587737046be23d692860e3212d6966\",\"doajarticles::23a27fb45b9af1f2b57632b7ceb98448\",\"doajarticles::9d32313b109db4f024eb1c802ad4e353\",\"fairsharing_::b4944963b5c83d545c3d3022bcf03282\",\"doajarticles::b5a2cadc830f94ceb2f8035369cf66a1\",\"doajarticles::8d64614210c51d4bc9e1470bbe1b5607\",\"doajarticles::e258604e7e1132683570d4178e9bec8f\",\"doajarticles::260c4ba804c4c08842ad39a6e8fd2a97\",\"doajarticles::8c9f0a0c20cb062a0ab7823af8262d0e\",\"issn__online::ef2866d8e4561162a1b115c24ebd7887\",\"doajarticles::de16206a48e58e344ef049670a1a0134\",\"doajarticles::96621c5056169f56ff3131ea90aa07c9\",\"issn__online::4558a062701b28ec0b4a6b2f0fbe8d09\",\"issn___print::5571b62bd2e69e2311990fceb7fe2e3a\",\"doajarticles::c61ecda4a5a75b94a28b1c782008e64c\",\"doajarticles::fd825a036d04fcdf0ab805d87e16d1de\",\"issn___print::61d35d3f7e7f635fa9818eb5c5724833\",\"doajarticles::685e5ac5fb55c74ee8a2b266923e1f1d\",\"doajarticles::b99614718f7a6545b1eed9b68d3441de\",\"doajarticles::7d2d2e0095bf1ec755bf3e39d31a5bcb\",\"doajarticles::6124a1bc19d8f538c1bb45da8fda914b\",\"issn___print::6f2e006697b7a4f9d6e2e4d61d9e87c2\",\"issn___print::24d6c4cc60c9446680a4bf6464f232cc\",\"issn___print::0482ed6012f16fa029dd0434b644cb90\",\"issn___print::74d68388e8ad50f80b754f5036c80fcf\",\"issn__online::22b586e63e4962054a332a538e5d2b71\",\"issn___print::4bceffb60baed7f1e3f25b171b8fcf63\",\"issn__online::4074709fc410b3be61ea1769634ae8ff\",\"issn__online::d787423124beb54d12945b8fb6effe17\",\"issn__online::92d6a58173da7e479557acb8701da9dc\",\"issn___print::36813e86616b329b06101afab0f2d115\",\"issn___print::60f102cf59ddbfc2297dbfd2efe1c006\",\"issn__online::e2bedb8ffd0dd9a05af59c2651eb4200\",\"issn___print::3a5263873041ce993d856c3a08b87e66\",\"issn___print::c0118216b90b4ec13c4344c302eb1cc2\",\"issn___print::36cb3b21af46a23327d120d848ac5256\",\"issn___print::f6528b255fa5b915efddf5bdd4b12bef\",\"issn___print::50ae07b765e6c893d93701b63dc885eb\",\"issn___print::1efd4ac736f64f83bc537339bf112882\",\"issn___print::f46704a2eb1338c3524391c7fcdc5f50\",\"issn__online::6e823cb8d73afda60e12a0ce7ec65fe3\",\"doajarticles::df6746f5d17a6c27cf1033e2888b934d\",\"issn___print::8a8a700ac926378b330e57d7faf5948e\",\"issn___print::6fbc352ab2267a17490b922033c2ce8c\",\"issn___print::692e57ca190e52967683bca19dcc6200\",\"issn___print::4f657189126a3c51cf8f2d58410d09b8\",\"issn___print::2fd71afb352b4ec1ee58b2bfa4d536da\",\"doajarticles::e91e4788bfb04277b61416fd184416b2\",\"issn__online::3097c43f11470b27e74f040cf267eedf\",\"doajarticles::942ba9d488531f3a60633b716db0b05c\",\"doajarticles::1aefeb2e98d29b17473e3f4dbcc5000e\",\"issn___print::223b857892c5de7247b3f906e1e1b96a\",\"doajarticles::b64f9c27d2c8899df904930cd6d2316a\"],\"subject\":null}" ; + String contextInfo3 ="{\"id\":\"ni\",\"description\":null,\"type\":null,\"zenodocommunity\":null,\"name\":null,\"projectList\":[\"nih_________::412379d1e2683a9571405e6621d3cdeb\",\"nsf_________::1e685a3d3ca1d62192bb51d42d44c6d1\",\"nsf_________::8ff441b675f2c62061f15210b05c1584\",\"nih_________::2d8bd32ed8cb2f0b0d4508df61d494dd\",\"nsf_________::e71b0a0f6a347d76816adb29b322441c\",\"nih_________::c27d60d28c9bc5cf17dd7ae7ad2d4ab4\",\"nih_________::b28919975c85cfee114e442c30c918c6\",\"wt__________::d709ac8e1ed393d036c895d239d825a4\"],\"datasourceList\":[\"re3data_____::5b9bf9171d92df854cf3c520692e9122\",\"doajarticles::c7d3de67dc77af72f6747157441252ec\",\"re3data_____::8515794670370f49c1d176c399c714f5\",\"doajarticles::d640648c84b10d425f96f11c3de468f3\",\"doajarticles::0c0e74daa5d95504eade9c81ebbd5b8a\",\"rest________::fb1a3d4523c95e63496e3bc7ba36244b\",\"opendoar____::7e7757b1e12abcb736ab9a754ffb617a\"],\"subject\":null}" ; @Test - void test1() { + void test1() throws IOException { + ObjectMapper mapper = new ObjectMapper(); List cInfoList = new ArrayList<>(); final Consumer consumer = ci -> cInfoList.add(ci); - queryInformationSystem - .getContextRelation(consumer, "contentproviders", ModelSupport.getIdPrefix(Datasource.class)); - cInfoList.forEach(c -> System.out.println(new Gson().toJson(c))); + consumer.accept(mapper.readValue(contextInfo1,ContextInfo.class)); + consumer.accept(mapper.readValue(contextInfo2,ContextInfo.class)); + consumer.accept(mapper.readValue(contextInfo3,ContextInfo.class)); List rList = new ArrayList<>(); cInfoList.forEach(cInfo -> Process.getRelation(cInfo).forEach(rList::add)); - rList.forEach(r -> { - try { - System.out.println(new ObjectMapper().writeValueAsString(r)); - } catch (JsonProcessingException e) { - e.printStackTrace(); - } - }); - - Assertions.assertEquals(34, rList.size()); + Assertions.assertEquals(190, rList.size()); Assertions .assertTrue( @@ -570,11 +57,11 @@ class CreateRelationTest { .format( "%s::%s", Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("dh-ch")))); + DHPUtils.md5("eut")))); Assertions .assertEquals( - 10, + 7, rList .stream() .filter( @@ -586,13 +73,13 @@ class CreateRelationTest { .format( "%s::%s", Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("dh-ch")))) + DHPUtils.md5("eut")))) .collect(Collectors.toList()) .size()); Assertions .assertEquals( - 10, + 7, rList .stream() .filter( @@ -604,7 +91,7 @@ class CreateRelationTest { .format( "%s::%s", Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("dh-ch")))) + DHPUtils.md5("eut")))) .collect(Collectors.toList()) .size()); @@ -619,224 +106,83 @@ class CreateRelationTest { .format( "%s::%s", Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("dh-ch")))) + DHPUtils.md5("eut")))) .map(r -> r.getTarget()) .collect(Collectors.toSet()); Assertions .assertTrue( - tmp.contains("re3data_____::9ebe127e5f3a0bf401875690f3bb6b81") && - tmp.contains("doajarticles::c6cd4b532e12868c1d760a8d7cda6815") && - tmp.contains("doajarticles::a6de4499bb87bf3c01add0a9e2c9ed0b") && - tmp.contains("doajarticles::6eb31d13b12bc06bbac06aef63cf33c9") && - tmp.contains("doajarticles::0da84e9dfdc8419576169e027baa8028") && - tmp.contains("re3data_____::84e123776089ce3c7a33db98d9cd15a8") && - tmp.contains("openaire____::c5502a43e76feab55dd00cf50f519125") && - tmp.contains("re3data_____::a48f09c562b247a9919acfe195549b47") && - tmp.contains("opendoar____::97275a23ca44226c9964043c8462be96") && - tmp.contains("doajarticles::2899208a99aa7d142646e0a80bfeef05")); + tmp.contains("opendoar____::532a082cc38eaffa923d73bce41b4061") && + tmp.contains("opendoar____::00a03ec6533ca7f5c644d198d815329c") && + tmp.contains("opendoar____::33a854e247155d590883b93bca53848a") && + tmp.contains("opendoar____::71f6278d140af599e06ad9bf1ba03cb0") && + tmp.contains("opendoar____::f5c59267dae7d123f54b741a76f28f84") && + tmp.contains("opendoar____::cda72177eba360ff16b7f836e2754370") && + tmp.contains("opendoar____::39e4973ba3321b80f37d9b55f63ed8b8") ) + ; + + Assertions.assertTrue(rList + .stream() + .filter( + r -> r + .getSource() + + .equals( + String + .format( + "%s::%s", + Constants.CONTEXT_NS_PREFIX, + DHPUtils.md5("eut")))) + .map(r -> r.getTargetType()) + .collect(Collectors.toSet()).stream().allMatch(t -> t.equals("datasource"))); + + Assertions + .assertEquals( + 15, + rList + .stream() + .filter( + r -> r + .getTarget() + + .equals( + String + .format( + "%s::%s", + Constants.CONTEXT_NS_PREFIX, + DHPUtils.md5("ni")))) + .collect(Collectors.toList()) + .size()); + + Assertions.assertEquals(7,rList + .stream() + .filter( + r -> r + .getSource() + .equals( + String + .format( + "%s::%s", + Constants.CONTEXT_NS_PREFIX, + DHPUtils.md5("ni"))) && + r.getTargetType().equals("datasource")).count()); + + Assertions.assertEquals(8,rList + .stream() + .filter( + r -> r + .getSource() + .equals( + String + .format( + "%s::%s", + Constants.CONTEXT_NS_PREFIX, + DHPUtils.md5("ni"))) && + r.getTargetType().equals("project")).count()); } - @Test - public void test2() { - List cInfoList = new ArrayList<>(); - final Consumer consumer = ci -> cInfoList.add(ci); - queryInformationSystem - .getContextRelation(consumer, "projects", ModelSupport.getIdPrefix(Project.class)); - cInfoList.forEach(c -> System.out.println(new Gson().toJson(c))); - List rList = new ArrayList<>(); - - cInfoList.forEach(cInfo -> Process.getRelation(cInfo).forEach(rList::add)); - - Assertions.assertEquals(44, rList.size()); - - Assertions - .assertFalse( - rList - .stream() - .map(r -> r.getSource()) - .collect(Collectors.toSet()) - .contains( - String - .format( - "%s::%s", - Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("dh-ch")))); - - Assertions - .assertEquals( - 2, - rList - .stream() - .filter( - r -> r - .getSource() - - .equals( - String - .format( - "%s::%s", - Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("clarin")))) - .collect(Collectors.toList()) - .size()); - - Assertions - .assertEquals( - 2, - rList - .stream() - .filter( - r -> r - .getTarget() - - .equals( - String - .format( - "%s::%s", - Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("clarin")))) - .collect(Collectors.toList()) - .size()); - - Set tmp = rList - .stream() - .filter( - r -> r - .getSource() - - .equals( - String - .format( - "%s::%s", - Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("clarin")))) - .map(r -> r.getTarget()) - .collect(Collectors.toSet()); - - Assertions - .assertTrue( - tmp.contains("corda__h2020::b5a4eb56bf84bef2ebc193306b4d423f") && - tmp.contains("corda_______::ef782b2d85676aa3e5a907427feb18c4")); - - rList.forEach(rel -> { - if (rel.getSourceType().equals("project")) { - String proj = rel.getSource(); - Assertions.assertTrue(proj.substring(0, proj.indexOf("::")).length() == 12); - Assertions.assertFalse(proj.startsWith("40|")); - } - }); - - } - - @Test - void test3() { - List cInfoList = new ArrayList<>(); - final Consumer consumer = ci -> cInfoList.add(ci); - - MasterDuplicate md1 = new MasterDuplicate(); - md1.setMaster("10|fake________::9ebe127e5f3a0bf401875690f3bb6b81"); - md1.setDuplicate("10|re3data_____::9ebe127e5f3a0bf401875690f3bb6b81"); - queryInformationSystem - .getContextRelation( - consumer, "contentproviders", ModelSupport.getIdPrefix(Datasource.class), Arrays.asList(md1)); - - cInfoList.forEach(c -> System.out.println(new Gson().toJson(c))); - - List rList = new ArrayList<>(); - - cInfoList.forEach(cInfo -> Process.getRelation(cInfo).forEach(rList::add)); - - rList.forEach(r -> { - try { - System.out.println(new ObjectMapper().writeValueAsString(r)); - } catch (JsonProcessingException e) { - e.printStackTrace(); - } - }); - - Assertions.assertEquals(34, rList.size()); - - Assertions - .assertTrue( - rList - .stream() - .map(r -> r.getSource()) - .collect(Collectors.toSet()) - .contains( - String - .format( - "%s::%s", - Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("dh-ch")))); - - Assertions - .assertEquals( - 10, - rList - .stream() - .filter( - r -> r - .getSource() - - .equals( - String - .format( - "%s::%s", - Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("dh-ch")))) - .collect(Collectors.toList()) - .size()); - - Assertions - .assertEquals( - 10, - rList - .stream() - .filter( - r -> r - .getTarget() - - .equals( - String - .format( - "%s::%s", - Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("dh-ch")))) - .collect(Collectors.toList()) - .size()); - - Set tmp = rList - .stream() - .filter( - r -> r - .getSource() - - .equals( - String - .format( - "%s::%s", - Constants.CONTEXT_NS_PREFIX, - DHPUtils.md5("dh-ch")))) - .map(r -> r.getTarget()) - .collect(Collectors.toSet()); - - Assertions - .assertTrue( - tmp.contains("fake________::9ebe127e5f3a0bf401875690f3bb6b81") && - tmp.contains("doajarticles::c6cd4b532e12868c1d760a8d7cda6815") && - tmp.contains("doajarticles::a6de4499bb87bf3c01add0a9e2c9ed0b") && - tmp.contains("doajarticles::6eb31d13b12bc06bbac06aef63cf33c9") && - tmp.contains("doajarticles::0da84e9dfdc8419576169e027baa8028") && - tmp.contains("re3data_____::84e123776089ce3c7a33db98d9cd15a8") && - tmp.contains("openaire____::c5502a43e76feab55dd00cf50f519125") && - tmp.contains("re3data_____::a48f09c562b247a9919acfe195549b47") && - tmp.contains("opendoar____::97275a23ca44226c9964043c8462be96") && - tmp.contains("doajarticles::2899208a99aa7d142646e0a80bfeef05")); - - } }