some vocabularies

This commit is contained in:
Michele Artini 2023-11-23 11:16:57 +01:00
parent 7bd0e5eb5b
commit 55a1b5d2a8
7 changed files with 3857 additions and 8 deletions

5
data/import_scripts/loadVocs.sh Normal file → Executable file
View File

@ -1,6 +1,7 @@
#!/bin/sh
find ./VocabularyDSResourceType/ -name "*.xml" -exec curl -X POST "http://localhost:8280/api/import/vocabulary" -H "accept: */*" -H "Content-Type: text/plain" --data-binary @{} \;
VOC_URL="http://localhost:8888/proxy/byType/vocabulary_manager/api/import/vocabulary"
find ./voc_profiles/ -name "*.xml" -exec curl -X POST "$VOC_URL" -H "accept: */*" -H "Content-Type: text/plain" --data-binary @{} \;
find ./DedupConfigurationDSResources/ -name "*.xml" -exec curl -X POST "http://localhost:8280/api/import/resource" -H "accept: */*" -H "Content-Type: text/plain" --data-binary @{} \;
#find ./DedupConfigurationDSResources/ -name "*.xml" -exec curl -X POST "http://localhost:8280/api/import/resource" -H "accept: */*" -H "Content-Type: text/plain" --data-binary @{} \;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<RESOURCE_PROFILE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<HEADER>
<RESOURCE_IDENTIFIER value="cc0593f1-7f58-4d89-9a7d-555af110aa5d_Vm9jYWJ1bGFyeURTUmVzb3VyY2VzL1ZvY2FidWxhcnlEU1Jlc291cmNlVHlwZQ=="/>
<RESOURCE_TYPE value="VocabularyDSResourceType"/>
<RESOURCE_KIND value="VocabularyDSResources"/>
<RESOURCE_URI value="String"/>
<DATE_OF_CREATION value="2021-10-11T15:16:43+02:00"/>
</HEADER>
<BODY>
<CONFIGURATION>
<VOCABULARY_NAME code="iop:typologies">iop:typologies</VOCABULARY_NAME>
<VOCABULARY_DESCRIPTION>iop:typologies</VOCABULARY_DESCRIPTION>
<TERMS>
<TERM native_name="Bachelor thesis" code="Bachelor thesis" english_name="Bachelor thesis" encoding="IOP">
<SYNONYMS>
<SYNONYM term="info:eu-repo/semantics/bachelorThesis" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Book" code="Book" english_name="Book" encoding="IOP">
<SYNONYMS>
<SYNONYM term="A1 International Book/Monograph" encoding="PUMA"/>
<SYNONYM term="B1 National Book/Monograph" encoding="PUMA"/>
<SYNONYM term="Bibliografia" encoding="PEOPLE"/>
<SYNONYM term="Manuale/libro di testo" encoding="PEOPLE"/>
<SYNONYM term="Monografia o trattato scientifico" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Conference article" code="Conference article" english_name="Conference article" encoding="IOP">
<SYNONYMS>
<SYNONYM term="A2 International Conference" encoding="PUMA"/>
<SYNONYM term="B2 National Conference" encoding="PUMA"/>
<SYNONYM term="Contributo in atti di convegno" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Contribution to book" code="Contribution to book" english_name="Contribution to book" encoding="IOP">
<SYNONYMS>
<SYNONYM term="A1 Contribution to International Book/Monograph" encoding="PUMA"/>
<SYNONYM term="B1 Contribution to National Book/Monograph" encoding="PUMA"/>
<SYNONYM term="Contributo in volume" encoding="PEOPLE"/>
<SYNONYM term="Curatela di monografia/trattato scientifico" encoding="PEOPLE"/>
<SYNONYM term="Prefazione/Introduzione/Postfazione" encoding="PEOPLE"/>
<SYNONYM term="Recensione in volume" encoding="PEOPLE"/>
<SYNONYM term="Scheda di catalogo" encoding="PEOPLE"/>
<SYNONYM term="Voce in repertorio" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Contribution to conference" code="Contribution to conference" english_name="Contribution to conference" encoding="IOP">
<SYNONYMS>
<SYNONYM term="Abstract in atti di convegno" encoding="PEOPLE"/>
<SYNONYM term="Curatela di atti di convegno (conference proceedings)" encoding="PEOPLE"/>
<SYNONYM term="Key note o lezione magistrale" encoding="PEOPLE"/>
<SYNONYM term="Poster" encoding="PEOPLE"/>
<SYNONYM term="Presentazione" encoding="PEOPLE"/>
<SYNONYM term="Relazioni in qualità di discussant" encoding="PEOPLE"/>
<SYNONYM term="A3 International Conference communication/abstract/poster" encoding="PUMA"/>
<SYNONYM term="B3 National Conference communication/abstract/poster" encoding="PUMA"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Contribution to journal" code="Contribution to journal" english_name="Contribution to journal" encoding="IOP">
<SYNONYMS>
<SYNONYM term="Abstract in rivista" encoding="PEOPLE"/>
<SYNONYM term="Comunicazione in rivista (Letter - Letter to editor)" encoding="PEOPLE"/>
<SYNONYM term="Curatela di numero monografico (di rivista o di collana)" encoding="PEOPLE"/>
<SYNONYM term="Editoriale in rivista" encoding="PEOPLE"/>
<SYNONYM term="Recensione in rivista" encoding="PEOPLE"/>
<SYNONYM term="Traduzione in rivista" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Dataset" code="Dataset" english_name="Dataset" encoding="IOP">
<SYNONYMS>
<SYNONYM term="Banca dati" encoding="PEOPLE"/>
<SYNONYM term="Dataset" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Doctoral thesis" code="Doctoral thesis" english_name="Doctoral thesis" encoding="IOP">
<SYNONYMS>
<SYNONYM term="info:eu-repo/semantics/doctoralThesis" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Journal article" code="Journal article" english_name="Journal article" encoding="IOP">
<SYNONYMS>
<SYNONYM term="A0 International Journal" encoding="PUMA"/>
<SYNONYM term="Articolo in rivista" encoding="PEOPLE"/>
<SYNONYM term="B0 National Journal" encoding="PUMA"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Master thesis" code="Master thesis" english_name="Master thesis" encoding="IOP">
<SYNONYMS>
<SYNONYM term="info:eu-repo/semantics/masterThesis" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Other" code="Other" english_name="Other" encoding="IOP">
<SYNONYMS>
<SYNONYM term="Altro prodotto" encoding="PEOPLE"/>
<SYNONYM term="B5 Other" encoding="PUMA"/>
<SYNONYM term="Cartografia" encoding="PEOPLE"/>
<SYNONYM term="Contributo in pubblicazione non scientifica" encoding="PEOPLE"/>
<SYNONYM term="Linee Guida (Guide lines)" encoding="PEOPLE"/>
<SYNONYM term="Manuale tecnico/Guida tecnica" encoding="PEOPLE"/>
<SYNONYM term="Manufatto e relativi progetti" encoding="PEOPLE"/>
<SYNONYM term="Materiale didattico" encoding="PEOPLE"/>
<SYNONYM term="Mostra" encoding="PEOPLE"/>
<SYNONYM term="Nota tecnica" encoding="PEOPLE"/>
<SYNONYM term="Performance" encoding="PEOPLE"/>
<SYNONYM term="Prodotto multimediale" encoding="PEOPLE"/>
<SYNONYM term="Progetto" encoding="PEOPLE"/>
<SYNONYM term="Sito web" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Patent" code="Patent" english_name="Patent" encoding="IOP">
<SYNONYMS>
<SYNONYM term="Brevetto di invenzione industriale" encoding="PEOPLE"/>
<SYNONYM term="Marchio" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Report" code="Report" english_name="Report" encoding="IOP">
<SYNONYMS>
<SYNONYM term="Annual report" encoding="PEOPLE"/>
<SYNONYM term="B4 Internal note" encoding="PUMA"/>
<SYNONYM term="Rapporto di commissione" encoding="PEOPLE"/>
<SYNONYM term="Rapporto di progetto (Project report)" encoding="PEOPLE"/>
<SYNONYM term="Rapporto di ricerca (Research report)" encoding="PEOPLE"/>
<SYNONYM term="Rapporto statistico" encoding="PEOPLE"/>
<SYNONYM term="Rapporto tecnico" encoding="PEOPLE"/>
<SYNONYM term="Working paper" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM native_name="Software" code="Software" english_name="Software" encoding="IOP">
<SYNONYMS>
<SYNONYM term="Software" encoding="PEOPLE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
</TERMS>
</CONFIGURATION>
<STATUS>
<LAST_UPDATE value="2021-06-30T11:07:26+02:00"/>
</STATUS>
<SECURITY_PARAMETERS/>
</BODY>
</RESOURCE_PROFILE>

View File

@ -0,0 +1,200 @@
<?xml version="1.0" encoding="UTF-8"?>
<RESOURCE_PROFILE>
<HEADER>
<RESOURCE_IDENTIFIER value="84bd2fa8-2f68-4ade-a8e1-aa73e51732c0_Vm9jYWJ1bGFyeURTUmVzb3VyY2VzL1ZvY2FidWxhcnlEU1Jlc291cmNlVHlwZQ=="/>
<RESOURCE_TYPE value="VocabularyDSResourceType"/>
<RESOURCE_KIND value="VocabularyDSResources"/>
<RESOURCE_URI value="String"/>
<DATE_OF_CREATION value="2016-12-06T15:24:13+01:00"/>
</HEADER>
<BODY>
<CONFIGURATION>
<VOCABULARY_NAME code="isti:groups">isti:groups</VOCABULARY_NAME>
<VOCABULARY_DESCRIPTION>Groups/Laboratories</VOCABULARY_DESCRIPTION>
<TERMS>
<TERM code="Administration" encoding="ISTI" english_name="Administration" native_name="Administration">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="AMM"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Computing Support" encoding="ISTI" english_name="Computing Support" native_name="Computing Support">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="INF"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Creative Virtual Systems" encoding="ISTI" english_name="Creative Virtual Systems" native_name="Creative Virtual Systems">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="CVS"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="External Relations Office" encoding="ISTI" english_name="External Relations Office" native_name="External Relations Office">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="REL"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Formal Methods &amp; Tools" encoding="ISTI" english_name="Formal Methods &amp; Tools" native_name="Formal Methods &amp; Tools">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="FMT"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="High Performance Computing" encoding="ISTI" english_name="High Performance Computing" native_name="High Performance Computing">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="HPC"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Home Automation" encoding="ISTI" english_name="Home Automation" native_name="Home Automation">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="HA"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Human Interfaces in Information Systems" encoding="ISTI" english_name="Human Interfaces in Information Systems" native_name="Human Interfaces in Information Systems">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="HIIS"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Human Resources Office" encoding="ISTI" english_name="Human Resources Office" native_name="Human Resources Office">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="PER"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Information Systems" encoding="ISTI" english_name="Information Systems" native_name="Information Systems">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="IS"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Information Technology Security" encoding="ISTI" english_name="Information Technology Security" native_name="Information Technology Security">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="ITS"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Knowledge Discovery and Delivery" encoding="ISTI" english_name="Knowledge Discovery and Delivery" native_name="Knowledge Discovery and Delivery">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="KDD"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Library" encoding="ISTI" english_name="Library" native_name="Library">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="BIB"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Managenent" encoding="ISTI" english_name="Managenent" native_name="Managenent">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="DIR"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Mechanics of Materials and Structures" encoding="ISTI" english_name="Mechanics of Materials and Structures" native_name="Mechanics of Materials and Structures">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="MMS"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Network Systems and Internet Services" encoding="ISTI" english_name="Network Systems and Internet Services" native_name="Network Systems and Internet Services">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="RET"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Networked Multimedia Information Systems" encoding="ISTI" english_name="Networked Multimedia Information Systems" native_name="Networked Multimedia Information Systems">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="NeMIS"/>
<SYNONYM encoding="PUMA" term="NMIS"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Patrimony" encoding="ISTI" english_name="Patrimony" native_name="Patrimony">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="ECO"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Secretariat" encoding="ISTI" english_name="Secretariat" native_name="Secretariat">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="SEG"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Signals and Images" encoding="ISTI" english_name="Signals and Images" native_name="Signals and Images">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="SI"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Software Engineering &amp; Dependable Computing" encoding="ISTI" english_name="Software Engineering &amp; Dependable Computing" native_name="Software Engineering &amp; Dependable Computing">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="SEDC"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Space Flight Dynamics" encoding="ISTI" english_name="Space Flight Dynamics" native_name="Space Flight Dynamics">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="SFD"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="System and Software Evaluation" encoding="ISTI" english_name="System and Software Evaluation" native_name="System and Software Evaluation">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="SSE"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Technical Services" encoding="ISTI" english_name="Technical Services" native_name="Technical Services">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="UT"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Telephone" encoding="ISTI" english_name="Telephone" native_name="Telephone">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="TEL"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Various" encoding="ISTI" english_name="Various" native_name="Various">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="ALT"/>
<SYNONYM encoding="PUMA" term="Et Al."/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Visual Computing" encoding="ISTI" english_name="Visual Computing" native_name="Visual Computing">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="VC"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="W3C Italian Office" encoding="ISTI" english_name="W3C Italian Office" native_name="W3C Italian Office">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="W3C"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
<TERM code="Wireless Networks" encoding="ISTI" english_name="Wireless Networks" native_name="Wireless Networks">
<SYNONYMS>
<SYNONYM encoding="PUMA" term="WN"/>
<SYNONYM encoding="PUMA" term="WN)"/>
</SYNONYMS>
<RELATIONS/>
</TERM>
</TERMS>
</CONFIGURATION>
<STATUS>
<LAST_UPDATE value="2016-12-06T15:07:15+01:00"/>
</STATUS>
<SECURITY_PARAMETERS/>
</BODY>
</RESOURCE_PROFILE>

View File

@ -1,6 +1,7 @@
package eu.dnetlib.services.vocabularies.controller;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.IOUtils;
@ -28,12 +29,11 @@ public class ImporterController extends DnetRestController {
@Autowired
private VocabularyImporter vocabularyImporter;
@PostMapping(value = "/vocabulary", consumes = {
MediaType.TEXT_PLAIN_VALUE, MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE
})
@PostMapping(value = "/vocabulary", consumes = MediaType.ALL_VALUE)
public Vocabulary importVocabulary(final HttpServletRequest request) throws Exception, IOException {
final String xml = IOUtils.toString(request.getInputStream(), StandardCharsets.UTF_8);
return vocabularyImporter.importVocabulary(xml);
try (final InputStream in = request.getInputStream()) {
return vocabularyImporter.importVocabulary(IOUtils.toString(in, StandardCharsets.UTF_8));
}
}
}

View File

@ -112,11 +112,16 @@
<!-- XML -->
<dependency>
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
</dependency>
</dependencies>
<dependencyManagement>