dhp-graph-dump/dump/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateEntityTest.java

154 lines
45 KiB
Java

package eu.dnetlib.dhp.oa.graph.dump.complete;
import static org.mockito.Mockito.lenient;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
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;
import org.mockito.junit.jupiter.MockitoExtension;
import com.google.gson.Gson;
import eu.dnetlib.dhp.communityapi.QueryCommunityAPI;
import eu.dnetlib.dhp.communityapi.model.CommunityModel;
import eu.dnetlib.dhp.oa.graph.dump.UtilCommunityAPI;
import eu.dnetlib.dhp.oa.model.graph.ResearchCommunity;
import eu.dnetlib.dhp.oa.model.graph.ResearchInitiative;
import eu.dnetlib.dhp.utils.DHPUtils;
@ExtendWith(MockitoExtension.class)
public class CreateEntityTest {
private static final String validCommunities = "[{\"id\":\"eut\",\"name\":\"EUt+\",\"description\":\"<p>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.</p>\",\"status\":\"all\"," +
"\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"knowmad\",\"name\":\"Knowmad Institut\",\"description\":\"<p><img alt=\\\"\\\" src=\\\"https://knowmadinstitut.org/wp-content/uploads/2022/12/OPEN-ACCESS-PLATINUMkjok-e1671629265802.png\\\" style=\\\"height:200px; width:400px\\\" /></p> <p>The Knowmad Research Gateway facilitates researchers, policymakers, activists, and experts to discover publications, data, software, and other research products&nbsp; related to <strong>Human Rights, Sustainable Development, Drug Policy, New Technologies, Ethnobotany, and Special Populations.&nbsp; </strong></p> <p>The European Institute for Multidisciplinary Studies on Human Rights &amp; Science - Knowmad Institut is an independent Think &amp; Do Tank based in Brandenburg, Germany, promoting Human Dignity and Open Science in Public and Private Policies....<u><a href=\\\"https://knowmadinstitut.org/about-us/\\\" target=\\\"_blank\\\">Click Here For More Information.</a></u></p> <ul> <li>If you would like to suggest research inputs with bibliographic information,<strong> <a href=\\\"https://forms.gle/1JUGPivX47iEtNgP7\\\" target=\\\"_blank\\\">Please Use This Form</a>.</strong></li> </ul> <hr /> <p>El Knowmad Research Gateway facilita a investigadores, responsables pol&iacute;ticos, activistas y expertos el descubrimiento de publicaciones, datos, software y otros productos de investigaci&oacute;n relacionados con los <strong>Derechos Humanos, el Desarrollo Sostenible, las Pol&iacute;ticas de Drogas, las Nuevas Tecnolog&iacute;as, la Etnobot&aacute;nica y las Poblaciones Especiales.</strong><br /> <br /> El Instituto Europeo de Estudios Multidisciplinares sobre Derechos Humanos y Ciencia - Knowmad Institut es un Think &amp; Do Tank independiente con sede en Brandenburgo, Alemania, que promueve la Dignidad Humana y la Ciencia Abierta en las Pol&iacute;ticas P&uacute;blicas y Privadas...<a href=\\\"https://knowmadinstitut.org/es/quienes-somos/\\\">.Haga clic aqu&iacute; para obtener m&aacute;s informaci&oacute;n.</a><br /> <br /> Si desea sugerir aportaciones de investigaci&oacute;n con informaci&oacute;n bibliogr&aacute;fica, <strong><a href=\\\"http://forms.gle/1JUGPivX47iEtNgP7\\\">Utilice Este Formulario.</a></strong></p> <hr /> <p>Das Knowmad Research Gateway erm&ouml;glicht Forschern, politischen Entscheidungstr&auml;gern, Aktivisten und Experten die Entdeckung von Publikationen, Daten, Software und anderen Forschungsprodukten im Zusammenhang mit <strong>Menschenrechten, nachhaltiger Entwicklung, Drogenpolitik, neuen Technologien, Ethnobotanik und speziellen Bev&ouml;lkerungsgruppen.</strong></p> <p>Das Europ&auml;ische Institut f&uuml;r multidisziplin&auml;re Studien zu Menschenrechten und Wissenschaft - Knowmad Institut ist ein unabh&auml;ngiger Think &amp; Do Tank mit Sitz in Brandenburg (Deutschland), der sich f&uuml;r Menschenw&uuml;rde und Open Science in &ouml;ffentlichen und privaten Politiken einsetzt&hellip; <a href=\\\"https://knowmadinstitut.org/de/ueber-uns/\\\">Klicken Sie hier f&uuml;r weitere Informationen</a>.</p> <p>Wenn Sie Forschungseingaben mit bibliographischen Informationen vorschlagen m&ouml;chten, <strong><a href=\\\"http://forms.gle/1JUGPivX47iEtNgP7\\\">nutzen Sie bitte dieses Formular.</a></strong></p> <p>&nbsp;</p>\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"knowmadinstitut\"},{\"id\":\"netherlands\",\"name\":\"Netherlands Research Portal\",\"description\":\"<div class=\\\"uk-section uk-padding-remove-bottom uk-overflow-hidden\\\"> <div class=\\\"uk-container uk-container-large\\\" uk-scrollspy=\\\"target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200\\\"> <div class=\\\"uk-grid uk-flex-middle\\\" uk-grid=\\\"\\\"> <div class=\\\"uk-width-3-5@m uk-margin-large-bottom uk-first-column\\\"> <h1 class=\\\"uk-h2 uk-width-1-2@m uk-scrollspy-inview \\\" uk-scrollspy-class=\\\"\\\">All Dutch Research,<br /> In One Place<span class=\\\"uk-text-primary\\\">.</span></h1> <div class=\\\"uk-margin-top ng-star-inserted uk-scrollspy-inview \\\" uk-scrollspy-class=\\\"\\\"> <div>A comprehensive and open dataset of research information covering <span class=\\\"ng-star-inserted uk-text-bold\\\"><span class=\\\"uk-text-lowercase\\\">3m</span> publications</span>, <span class=\\\"ng-star-inserted uk-text-bold\\\"><span class=\\\"uk-text-lowercase\\\">500k</span> research data</span>, <span class=\\\"ng-star-inserted uk-text-bold\\\">100 research software items</span>, from <span class=\\\"ng-star-inserted uk-text-bold\\\">48&nbsp;data sources</span>, linked to <span class=\\\"ng-star-inserted uk-text-bold\\\">3<span class=\\\"uk-text-lowercase\\\">K</span> grants</span> and <span class=\\\"ng-star-inserted uk-text-bold\\\">900 organizations</span>.</div> <div class=\\\"uk-text-primary\\\">All linked together through citations and semantics.</div> &nbsp; <div class=\\\"uk-text-meta\\\">Try browsing by:</div> <div class=\\\"link-actions uk-flex uk-flex-column uk-flex-top uk-margin-small-top\\\"><a class=\\\"uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-margin-small-bottom\\\" href=\\\"/sdgs\\\"><span class=\\\"uk-flex uk-flex-middle\\\"><img alt=\\\"SDGs logo\\\" src=\\\"assets/common-assets/sdg/sdg-dot-img.svg\\\" style=\\\"height:17px; width:17px\\\" /><span class=\\\"uk-margin-small-left\\\">Sustainable Development Goals (SDG<span class=\\\"uk-text-lowercase\\\">s</span>)</span></span></a><a class=\\\"uk-display-inline-block uk-text-uppercase uk-button uk-button-text\\\" href=\\\"/fields-of-science\\\"><span class=\\\"uk-flex uk-flex-middle\\\"><img alt=\\\"FOS logo\\\" src=\\\"assets/common-assets/fos/fos-icon.svg\\\" style=\\\"height:17px; width:33px\\\" /><span class=\\\"uk-margin-small-left\\\">Fields of Science (FoS)</span></span></a></div> </div> </div> <div class=\\\"uk-visible@m uk-width-expand uk-scrollspy-inview \\\" uk-scrollspy-class=\\\"\\\"> <div class=\\\"uk-position-relative uk-height-2-1\\\"><img src=\\\"https://upload.wikimedia.org/wikipedia/commons/e/ee/Flag-map_of_the_Netherlands.svg\\\" style=\\\"transform:translateY(0px)\\\" uk-parallax=\\\"y: 0\\\" /></div> <p>&nbsp;</p> </div> </div> </div> </div> <div class=\\\"ng-star-inserted\\\"> <div class=\\\"uk-section uk-section-large uk-container uk-container-large uk-text-primary\\\"> <div class=\\\"uk-grid uk-child-width-1-2@m\\\" uk-grid=\\\"\\\"> <div class=\\\"uk-first-column\\\"> <div> <p><span>Welcome to the Portal of Research Output from the Netherlands. This has been developed as part of a collaboration between <a href=\\\"https://ukb.nl/nieuws/next-narcis-dutch-research-portal-on-openaire/\\\" target=\\\"_blank\\\">UKB</a>, <a href=\\\"https://www.surf.nl/en/news/agreement-signed-to-make-dutch-research-output-publicly-accessible\\\" target=\\\"_blank\\\">SURF</a> and <a href=\\\"https://www.openaire.eu/next-narcis-dutch-research-portal-on-openaire\\\" target=\\\"_blank\\\">OpenAIRE</a>. This portal presents Dutch research results and research projects as a sub-section found in the <a href=\\\"https://graph.openaire.eu/\\\" target=\\\"_blank\\\">OpenAIRE Graph</a>. This Research Graph is actively fed by Dutch institutional repositories, data and software repositories, and Research Information Systems (CRIS&#39;s) that comply with the <a href=\\\"https://guidelines.openaire.eu/en/latest/\\\" target=\\\"_blank\\\">OpenAIRE metadata guidelines</a>. 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. </span><br /> <br /> <em>In Dutch:</em></p> <p><span>Welkom bij het Portaal van het Nederlandse Onderzoeks Resultaten. Dit is ontwikkeld als onderdeel van een samenwerking tussen <a href=\\\"https://ukb.nl/nieuws/next-narcis-dutch-research-portal-on-openaire/\\\" target=\\\"_blank\\\">UKB</a>, <a href=\\\"https://www.surf.nl/en/news/agreement-signed-to-make-dutch-research-output-publicly-accessible\\\" target=\\\"_blank\\\">SURF</a> and <a href=\\\"https://www.openaire.eu/next-narcis-dutch-research-portal-on-openaire\\\" target=\\\"_blank\\\">OpenAIRE</a>. &nbsp;Dit portaal presenteert Nederlandse onderzoeksresultaten en onderzoeksprojecten als een sub-sectie die zijn gevonden in de <a href=\\\"https://graph.openaire.eu/\\\" target=\\\"_blank\\\">OpenAIRE Graph</a>. Deze Research Graph wordt actief gevoed door Nederlandse institutionele repositories, data- en software-repositories, en onderzoeksinformatiesystemen (CRISen) die voldoen aan de <a href=\\\"https://guidelines.openaire.eu/en/latest/\\\" target=\\\"_blank\\\">OpenAIRE metadata richtlijnen</a>. 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. </span></p> </div> </div> <div class=\\\"uk-position-relative\\\"><a href=\\\"https://graph.openaire.eu/\\\" target=\\\"_blank\\\"><img alt=\\\"OpenAIRE Research Graph\\\" class=\\\"uk-height-1-2 uk-position-center-right uk-visible@m\\\" src=\\\"assets/common-assets/common/graph-nodes.svg\\\" /></a></div> </div> </div> </div> <div class=\\\"uk-section uk-section-large uk-padding-remove-top uk-container uk-container-large uk-margin-large-top\\\"> <h2 class=\\\"uk-h1\\\">Share your research<span class=\\\"uk-text-primary\\\">.</span></h2> <div class=\\\"uk-grid uk-child-width-1-2@m uk-margin-large-top\\\" uk-grid=\\\"\\\"> <div class=\\\"uk-first-column\\\"> <div class=\\\"uk-text-center uk-margin-auto\\\"><img alt=\\\"Linking\\\" src=\\\"https://canada.explore.openaire.eu/assets/aggregator-assets/home/linking-home-img.svg\\\" /> <h5>Link your work.</h5> <div>Connect all your research. If you can&rsquo;t find your research results in OpenAIRE, don&rsquo;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.</div> <a class=\\\"uk-button uk-button-primary uk-margin-medium-top\\\" href=\\\"/participate/claim\\\"> Learn More </a></div> </div> <div> <div class=\\\"uk-text-center uk-margin-auto\\\"><img alt=\\\"Deposit\\\" src=\\\"https://canada.explore.openaire.eu/assets/aggregator-assets/home/deposit-home-img.svg\\\" /> <h5>Deposit your research.</h5> <div>Whether it&rsquo;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.</div> <a class=\\\"uk-button uk-button-primary uk-margin-medium-top\\\" href=\\\"/participate/deposit/learn-how\\\"> Learn More </a></div> </div> </div> </div> <p>&nbsp;</p>\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"tunet\",\"name\":\"TU-NET\",\"description\":\"<p>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).&nbsp; TU-NET is a network for the Irish Technological Universities to share expertise, information and resources where possible.</p> <p>This portal harvests data from the following Open Access Repositories: ARROW (TU Dublin),&nbsp;SETU Waterford Libraries Repository and Research@THEA (SETU Carlow, TUS, ATU &amp; IADT).</p> <p>&nbsp;</p> <p><span style=\\\"font-size:9px\\\">Background photo by&nbsp;&nbsp;<a href=\\\"https://unsplash.com/@pietrozj?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\\\">Pietro Jeng</a>&nbsp;on&nbsp;<a href=\\\"https://unsplash.com/photos/iMqgGY1hDjk?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\\\">Unsplash</a></span></p>\",\"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\":\"<p>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&nbsp;Astrophysics and Planetary Science engaging also&nbsp;computer scientists and software engineers interested in computer vision and machine learning.&nbsp;NEANIAS Space Services data and products may also have a&nbsp;high impact in planetary mining and robotics, space weather and mobile telecommunications.</p> <p>The <a href=\\\"https://catalogue.neanias.eu/search;thematicArea=Space;quantity=10\\\">NEANIAS Space Research services</a>&nbsp; are aimed at supporting management and analysis of large data volumes in astrophysics and planetary sciences through visualization (<em>SPACE-VIS</em> services), efficiently generating large multidimensional maps and mosaics (<em>SPACE-MOS</em> services), and, finally, supporting mechanisms for automatic detection of structures within maps through machine learning (<em>SPACE-ML</em> services).&nbsp;</p> <p>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.&nbsp;&nbsp;</p> <ul> <li>The <a href=\\\"https://catalogue.neanias.eu/service/inaf.space-vis_vialactea_service\\\">ViaLactea service</a> 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.&nbsp;&nbsp;</li> <li>The &nbsp;<a href=\\\"https://catalogue.neanias.eu/service/altec.space-vis_adn_service\\\">Astra Data Navigator (ADN)</a> 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.&nbsp;&nbsp;</li> <li>Finally, the <a href=\\\"https://catalogue.neanias.eu/service/meeo.adam-space\\\">ADAM-Space Service</a> (Advanced Geospatial Data Management platform) accesses a large variety of environmental data and is customised in NEANIAS to access planetary data.&nbsp;</li> </ul> <p>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).&nbsp;</p> <ul> <li> <p>The AstroMapMerging service exploits Montage (<a href=\\\"http://montage.ipac.caltech.edu/\\\" rel=\\\"noreferrer noopener\\\" target=\\\"_blank\\\">http://montage.ipac.caltech.edu/</a>) and is integrated with the <a href=\\\"https://catalogue.neanias.eu/service/inaf.space-vis_vialactea_service\\\">ViaLactea service</a>&nbsp;for merging adjacent datasets.&nbsp;&nbsp;</p> </li> <li> <p>The ISIS3 and ASP under <a href=\\\"https://catalogue.neanias.eu/service/meeo.adam_dps_-_adam_data_processing_system\\\">ADAM-DPS</a> 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.&nbsp;</p> </li> </ul> <p>&nbsp;&nbsp;</p> <p>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.&nbsp;</p> <ul> <li> <p><a href=\\\"https://catalogue.neanias.eu/service/inaf.space-ml_caesar_service\\\">CAESAR service</a> 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.&nbsp;&nbsp;</p> </li> <li> <p><a href=\\\"https://catalogue.neanias.eu/service/inaf.space-ml_astroml_service\\\">AstroML service</a> has been developed to integrate a deep learning mechanism to significantly improve source identification, classification, and characterization of sources in large-scale radio surveys.&nbsp;</p> </li> <li> <p>The <a href=\\\"https://catalogue.neanias.eu/service/unimib.latent_space_explorer\\\">Latent Space Explorer service </a>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.&nbsp;</p> </li> </ul> <p>Please visit also the <a href=\\\"https://thematic.neanias.eu/SPACE/\\\" target=\\\"_blank\\\">NEANIAS Space thematic portal</a>&nbsp;for more info on the Space Services and the research community.</p> <p>NEANIAS web portal:&nbsp;<a href=\\\"https://www.neanias.eu/\\\">https://www.neanias.eu/</a></p> <p>Please consider acknowledging the NEANIAS project if you use the results of this service in any paper or communication:&nbsp;<em>NEANIAS is funded by European Union under Horizon 2020 research and innovation programme via grant agreement No. 863448.</em></p>\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"neanias\"},{\"id\":\"aurora\",\"name\":\"Aurora Universities Network\",\"description\":\"<p>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 &ndash; aiming to contribute to the achievement of the United Nations&rsquo; Sustainable Development Goals.</p> <p>All our research output is combines via this <a href=\\\"https://aurora.openaire.eu/\\\" target=\\\"_blank\\\">Aurora Connect Gateway</a>, and put on the <a href=\\\"https://monitor.openaire.eu/dashboard/aurora\\\" target=\\\"_blank\\\">Aurora Monitor Dashboard</a>.</p> <p>More about Aurora:&nbsp;<a href=\\\"https://aurora-universities.eu/\\\" target=\\\"_blank\\\">https://aurora-universities.eu/</a></p> <p>&nbsp;</p>\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"argo-france\",\"name\":\"Argo France\",\"description\":\"<p><a href=\\\"https://www.argo-france.fr/\\\">Argo France</a> 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).</p>\",\"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\":\"<p>North American Studies was born in the context of collaboration between <a href=\\\"http://www.cisan.unam.mx/\\\" target=\\\"_blank\\\"><strong> CISAN</strong></a>, the Center for Research on North America and the multi and interdisciplinary research Unit of Universidad National Autonoma de Mexico <a href=\\\"https://www.unam.mx/\\\" target=\\\"_blank\\\"><strong> UNAM</strong></a>, 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.</p> <p>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.</p> <p>The platform is managed by <a href=\\\"http://ru.micisan.unam.mx/\\\" target=\\\"_blank\\\"><strong> MiCISAN</strong>, </a>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&rsquo;s scientific products, and similar scientific sources and resources by following the <a href=\\\"https://guidelines.openaire.eu/en/latest/\\\" target=\\\"_blank\\\"><strong> OpenAIRE guidelines </strong></a> and <a href=\\\"https://www.go-fair.org/fair-principles/\\\" target=\\\"_blank\\\"><strong> FAIR Principles</strong></a>, in the frame of Open Science.</p>\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"redancommunity\"},{\"id\":\"dth\",\"name\":\"Digital Twins in Health\",\"description\":\"<p>Open Research Gateway on Digital Twins in Health.</p> <p>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 <a href=\\\"https://www.edith-csa.eu/\\\">EDITH</a> 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.</p> <div class=\\\"wrapper cf\\\"> <h2 class=\\\"section-title\\\">Objectives</h2> <div class=\\\"flex\\\"> <div class=\\\"box\\\"> <div class=\\\"icon ecosystem\\\">&nbsp;</div> <div class=\\\"description\\\"> <h3 class=\\\"title\\\">ECOSYSTEM</h3> <p>EDITH has the objective to frame an inclusive <strong>ecosystem</strong> 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.</p> </div> </div> <div class=\\\"box\\\"> <div class=\\\"icon roadmap\\\">&nbsp;</div> <div class=\\\"description\\\"> <h3 class=\\\"title\\\">ROADMAP</h3> <p>EDITH has the objective to build a <strong>roadmap</strong> 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&rsquo;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.</p> </div> </div> </div> <!-- flex --> <div class=\\\"flex\\\"> <div class=\\\"box\\\"> <div class=\\\"icon repository\\\">&nbsp;</div> <div class=\\\"description\\\"> <h3 class=\\\"title\\\">REPOSITORY</h3> <p>EDITH has the objective to develop a federated and cloud-based <strong>repository</strong> 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.</p> </div> </div> <div class=\\\"box\\\"> <div class=\\\"icon platform\\\">&nbsp;</div> <div class=\\\"description\\\"> <h3 class=\\\"title\\\">SIMULATION PLATFORM</h3> <p>EDITH has the objective to develop the architecture of a <strong>simulation platform</strong> that will support the transition towards an integrated Virtual Human Twin (VHT). EDITH&rsquo;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.</p> </div> </div> </div> <!-- flex --></div>\",\"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\":\"<p>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&nbsp; the marine environment. NEANIAS Underwater group provides three user-friendly, cloud-based solutions addressing bathymetry processing, seafloor mosaicking and classification (<a href=\\\"https://www.neanias.eu/index.php/services/underwater\\\">https://www.neanias.eu/index.php/services/underwater</a>). More specifically:</p> <ul> <li>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 .</li> <li>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 (<a href=\\\"https://marketplace.eosc-portal.eu/services/uw-mos\\\">https://marketplace.eosc-portal.eu/services/uw-mos</a>).</li> <li>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 (<a href=\\\"https://marketplace.eosc-portal.eu/services/uw-map\\\">https://marketplace.eosc-portal.eu/services/uw-map</a>).</li> </ul> <p>NEANIAS:&nbsp;<a href=\\\"https://www.neanias.eu/\\\">https://www.neanias.eu/</a></p>\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"neanias\"},{\"id\":\"neanias-atmospheric\",\"name\":\"NEANIAS Atmospheric Research Community\",\"description\":\"<p>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&nbsp;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.</p> <p>More in detail, NEANIAS Atmospheric group offers the following services on the EOSC platform:</p> <ul> <li>The Greenhouse Gases Flux Density Monitoring service (A1 - <a href=\\\"https://atmo-flud.neanias.eu/\\\">ATMO-FLUD</a>) 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.</li> <li>The Atmospheric Perturbations and Components Monitoring service (A2, divided in two services, <a href=\\\"https://atmo-stress.neanias.eu/\\\">ATMO-STRESS</a> 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.</li> <li>The Air Quality Estimation, Monitoring and Forecasting service (A3 &ndash; <a href=\\\"https://atmo-4cast.neanias.eu/\\\">ATMO-4CAST</a>) 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.</li> </ul> <p>NEANIAS: https://www.neanias.eu/</p>\",\"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\":\"<p>Heritage Science community gateway is managed by the IPERION HS Research Infrastructure EU project.&nbsp;</p> <p><a href=\\\"https://en.wikipedia.org/wiki/Heritage_science\\\">Heritage science</a> is the interdisciplinary domain of scientific&nbsp; study&nbsp; of&nbsp; cultural&nbsp; or&nbsp; natural&nbsp; heritage. Heritage science draws on&nbsp; diverse&nbsp; humanities,&nbsp;sciences&nbsp; and&nbsp; engineering&nbsp; disciplines. It&nbsp; focuses&nbsp; on&nbsp; enhancing&nbsp; the&nbsp; understanding,&nbsp; care&nbsp; and&nbsp; sustainable&nbsp; use&nbsp; of&nbsp; heritage&nbsp; so it&nbsp; can enrich people&#39;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.</p> <p>The gateway aims at including all the relevant research outcomes in&nbsp; this&nbsp; field.</p> <p>&nbsp;</p>\",\"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\":\"<p style=\\\"text-align:justify\\\">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&#39;Foscari University of Europe (Italy), CY Cergy Paris Universit&eacute; (France), the Technische Universit&auml;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.</p>\",\"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\":\"<p>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.</p>\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"covid-19\"},{\"id\":\"enermaps\",\"name\":\"Welcome to EnerMaps Gateway! Find the latest scientific data.\",\"description\":\"<p>EnerMaps Open Data Management Tool aims to&nbsp; <strong>improve data management</strong>&nbsp; and&nbsp; <strong>accessibility</strong>&nbsp; in the field of&nbsp; <strong>energy research</strong>&nbsp; for the&nbsp; <strong>renewable energy industry</strong>.</p> <p>EnerMaps&rsquo; tool accelerates and facilitates the energy transition offering a qualitative and user-friendly digital platform to the energy professionals.</p> <p>The project is based on the&nbsp; <strong>FAIR data principle</strong>&nbsp; which requires data to be&nbsp; <strong>F</strong>indable,&nbsp; <strong>A</strong>ccessible,&nbsp; <strong>I</strong>nteroperable and&nbsp; <strong>R</strong>eusable.</p> <p><strong>EnerMaps project</strong>&nbsp; coordinates and enriches existing energy databases to promote&nbsp; <strong>trans-disciplinary research</strong>&nbsp; and to develop partnerships between researchers and the energy professionals.</p> <p>The EnerMaps&nbsp;project has received funding from the European Union&rsquo;s Horizon 2020 research and innovation program under &nbsp; <a href=\\\"https://cordis.europa.eu/project/id/884161?WT.mc_id=RSS-Feed&amp;WT.rss_f=project&amp;WT.rss_a=227144&amp;WT.rss_ev=a\\\" rel=\\\"noopener noreferrer\\\" target=\\\"_blank\\\">grant agreement N&deg;884161</a>.&nbsp;</p> <p>&nbsp;</p> <p>Website:<a href=\\\"https://enermaps.eu/\\\">&nbsp; https://enermaps.eu/&nbsp;</a></p>\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"},{\"id\":\"eu-conexus\",\"name\":\"European University for Smart Urban Coastal Sustainability\",\"description\":\"<p>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.&nbsp;</p> <p>The thematic framework Smart Urban Coastal Sustainability (SmUCS) means for EU-CONEXUS to focus its research &amp; innovation, education and knowledge sharing activities on societal challenges that are linked to a specific geographical location &ndash; 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.</p>\",\"status\":\"all\",\"type\":\"community\",\"subjects\":null,\"zenodoCommunity\":\"\"}]";
private static String workingDir;
@BeforeAll
public static void beforeAll() throws IOException {
workingDir = Files
.createTempDirectory(CreateEntityTest.class.getSimpleName())
.toString();
}
@Test
void test1() throws IOException {
List<ContextInfo> cInfoList = new ArrayList<>();
final Consumer<ContextInfo> consumer = ci -> cInfoList.add(ci);
UtilCommunityAPI queryCommunityAPI = new UtilCommunityAPI();
new ObjectMapper()
.readValue(validCommunities, CommunityModelList.class)
.forEach(ri -> consumer.accept(queryCommunityAPI.getContext(ri)));
List<ResearchInitiative> riList = new ArrayList<>();
cInfoList.forEach(cInfo -> riList.add(Process.getEntity(cInfo)));
Assertions.assertEquals(25, riList.size());
riList.stream().forEach(c -> {
switch (c.getAcronym()) {
case "mes":
Assertions
.assertTrue(c.getType().equals(eu.dnetlib.dhp.oa.graph.dump.Constants.RESEARCH_COMMUNITY));
Assertions.assertTrue(((ResearchCommunity) c).getSubject().size() == 5);
Assertions.assertTrue(((ResearchCommunity) c).getSubject().contains("marine"));
Assertions.assertTrue(((ResearchCommunity) c).getSubject().contains("ocean"));
Assertions.assertTrue(((ResearchCommunity) c).getSubject().contains("fish"));
Assertions.assertTrue(((ResearchCommunity) c).getSubject().contains("aqua"));
Assertions.assertTrue(((ResearchCommunity) c).getSubject().contains("sea"));
Assertions
.assertTrue(
c
.getId()
.equals(
String
.format(
"%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()));
break;
case "clarin":
Assertions
.assertTrue(c.getType().equals(eu.dnetlib.dhp.oa.graph.dump.Constants.RESEARCH_INFRASTRUCTURE));
Assertions
.assertTrue(
c
.getId()
.equals(
String
.format(
"%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()));
break;
}
// TODO add check for all the others Entities
});
riList.forEach(c -> System.out.println(new Gson().toJson(c)));
}
@Test
@Disabled
void test2() throws IOException {
LocalFileSystem fs = FileSystem.getLocal(new Configuration());
Path hdfsWritePath = new Path(workingDir + "/prova");
FSDataOutputStream fsDataOutputStream = null;
if (fs.exists(hdfsWritePath)) {
fsDataOutputStream = fs.append(hdfsWritePath);
} else {
fsDataOutputStream = fs.create(hdfsWritePath);
}
CompressionCodecFactory factory = new CompressionCodecFactory(fs.getConf());
CompressionCodec codec = factory.getCodecByClassName("org.apache.hadoop.io.compress.GzipCodec");
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(codec.createOutputStream(fsDataOutputStream),
StandardCharsets.UTF_8));
List<ContextInfo> cInfoList = new ArrayList<>();
final Consumer<ContextInfo> consumer = ci -> cInfoList.add(ci);
UtilCommunityAPI queryCommunityAPI = new UtilCommunityAPI();
queryCommunityAPI.getContextInformation().forEach(ci -> consumer.accept(ci));
for (ContextInfo cInfo : cInfoList) {
writer.write(new Gson().toJson(Process.getEntity(cInfo)));
}
writer.close();
}
}
class CommunityModelList extends ArrayList<CommunityModel> {
public CommunityModelList() {
super();
}
}