Extension for countries (https://support.d4science.org/issues/28575): code, properties, and tests

This commit is contained in:
Alessia 2024-12-18 19:06:37 +01:00
parent 7dd16b74ca
commit db2aec61b4
2 changed files with 2 additions and 14 deletions

View File

@ -8,16 +8,11 @@ import eu.dnetlib.ariadneplus.publisher.AriadnePlusPublisherException;
import eu.dnetlib.ariadneplus.reader.ResourceManager; import eu.dnetlib.ariadneplus.reader.ResourceManager;
import eu.dnetlib.ariadneplus.reader.RunSPARQLQueryService; import eu.dnetlib.ariadneplus.reader.RunSPARQLQueryService;
import eu.dnetlib.ariadneplus.reader.json.ParseRDFJSON; import eu.dnetlib.ariadneplus.reader.json.ParseRDFJSON;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.eclipse.rdf4j.RDF4JException; import org.eclipse.rdf4j.RDF4JException;
import org.eclipse.rdf4j.model.IRI; import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Resource; import org.eclipse.rdf4j.model.Resource;
import org.eclipse.rdf4j.model.ValueFactory; import org.eclipse.rdf4j.model.ValueFactory;
import org.eclipse.rdf4j.query.GraphQuery;
import org.eclipse.rdf4j.query.GraphQueryResult;
import org.eclipse.rdf4j.query.QueryLanguage;
import org.eclipse.rdf4j.query.QueryResults;
import org.eclipse.rdf4j.repository.Repository; import org.eclipse.rdf4j.repository.Repository;
import org.eclipse.rdf4j.repository.RepositoryConnection; import org.eclipse.rdf4j.repository.RepositoryConnection;
import org.eclipse.rdf4j.repository.RepositoryResult; import org.eclipse.rdf4j.repository.RepositoryResult;
@ -26,18 +21,13 @@ import org.eclipse.rdf4j.repository.util.Repositories;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* @author enrico.ottonello * @author enrico.ottonello

View File

@ -2,12 +2,10 @@ package eu.dnetlib.ariadneplus.reader.json;
import eu.dnetlib.ariadneplus.elasticsearch.model.AriadnePlusEntry; import eu.dnetlib.ariadneplus.elasticsearch.model.AriadnePlusEntry;
import eu.dnetlib.ariadneplus.reader.ResourceManager; import eu.dnetlib.ariadneplus.reader.ResourceManager;
import eu.dnetlib.ariadneplus.reader.utils.PropertiesMap;
import net.minidev.json.parser.ParseException; import net.minidev.json.parser.ParseException;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
@ -104,7 +102,7 @@ public class ParseRDFJsonTest {
Assert.assertNotEquals(-1, res); Assert.assertNotEquals(-1, res);
mng.manage(parser); mng.manage(parser);
if(mng.hasNext()) if(mng.hasNext())
System.out.println(mng.next()); System.out.println(mng.next());
} }
@Test @Test