tests
This commit is contained in:
parent
b99e9ecf5e
commit
6c93eb3f0f
|
@ -43,6 +43,25 @@ public class GraphDbReaderAndESIndexTest {
|
||||||
readAndIndexProd(true, uri, datasource, apiId);
|
readAndIndexProd(true, uri, datasource, apiId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testRoceehPeriodO() throws Exception {
|
||||||
|
|
||||||
|
String record ="https://ariadne-infrastructure.eu/aocat/Resource/4F9B4DC6-F236-3CDA-8C3B-B20B5D17DD6E";
|
||||||
|
String datasource = "road";
|
||||||
|
String apiId = "sites";
|
||||||
|
readAndIndexTest(true, record, datasource, apiId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCENIEHPeriodO() throws Exception {
|
||||||
|
|
||||||
|
String record ="https://ariadne-infrastructure.eu/aocat/Resource/E8AA2F30-98B7-3668-A0EC-339EA9EF652D";
|
||||||
|
String datasource = "cenieh";
|
||||||
|
String apiId = "sediments";
|
||||||
|
readAndIndexTest(true, record, datasource, apiId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWithNotProvidedARIADNESubject() throws Exception {
|
public void testWithNotProvidedARIADNESubject() throws Exception {
|
||||||
String record ="https://ariadne-infrastructure.eu/aocat/Resource/ADS/28986CB2-37B1-31F8-98B5-E86F9BD98946";
|
String record ="https://ariadne-infrastructure.eu/aocat/Resource/ADS/28986CB2-37B1-31F8-98B5-E86F9BD98946";
|
||||||
|
|
|
@ -117,6 +117,17 @@ public class ParseRDFJsonTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParseRoceeh() throws ParseException {
|
||||||
|
String recordJson = getFromClasspath("eu/dnetlib/ariadneplus/reader/json/roceeh.json");
|
||||||
|
parser.setCollection(false);
|
||||||
|
int res = parser.parse(recordJson);
|
||||||
|
Assert.assertNotEquals(-1, res);
|
||||||
|
while(parser.hasNextElement()){
|
||||||
|
System.out.println(parser.getNextElement());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private String getFromClasspath(String s) {
|
private String getFromClasspath(String s) {
|
||||||
try {
|
try {
|
||||||
final ClassPathResource resource = new ClassPathResource(s);
|
final ClassPathResource resource = new ClassPathResource(s);
|
||||||
|
|
|
@ -0,0 +1,170 @@
|
||||||
|
{
|
||||||
|
"https://ariadne-infrastructure.eu/aocat/Resource/4F9B4DC6-F236-3CDA-8C3B-B20B5D17DD6E" : {
|
||||||
|
"http://parthenos.d4science.org/CRMext/CRMpe.rdfs/PP20i_is_persistent_dataset_part_of" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Collection/ROAD/1E2373FE-C708-3A0B-81BE-35F5593EBAA2",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"http://www.cidoc-crm.org/cidoc-crm/P129_is_about" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Site/monument",
|
||||||
|
"type" : "uri"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Concept/ROAD/archaeology",
|
||||||
|
"type" : "uri"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Place/2360EC2A-F897-3075-9720-EE45ACEC75C9",
|
||||||
|
"type" : "uri"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Place/E99BB6B9-1EF5-3DBE-8EEC-9340DC7C68CF",
|
||||||
|
"type" : "uri"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Time-Span/5950/6020",
|
||||||
|
"type" : "uri"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Time-Span/Wilton",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [
|
||||||
|
{
|
||||||
|
"value" : "https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/AO_Individual_Data_Resource",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"http://www.w3.org/2000/01/rdf-schema#label" : [
|
||||||
|
{
|
||||||
|
"value" : "Assemblage Sehonghong, 59, age: 5950-6020",
|
||||||
|
"type" : "literal",
|
||||||
|
"datatype" : "http://www.w3.org/2001/XMLSchema#string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_ARIADNE_subject" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Concept/AO_Subject/Site/monument",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_access_rights" : [
|
||||||
|
{
|
||||||
|
"value" : "https://creativecommons.org/licenses/by-sa/4.0/",
|
||||||
|
"type" : "literal",
|
||||||
|
"datatype" : "http://www.w3.org/2001/XMLSchema#string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_contributor" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Agent/NOTPROVIDED",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_creator" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Agent/Project%20%22The%20Role%20of%20Culture%20in%20Early%20Expansions%20of%20Humans%22%20%28ROCEEH%29",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_landing_page" : [
|
||||||
|
{
|
||||||
|
"value" : "http://www.roceeh.uni-tuebingen.de/roadweb/sdsPDF.php?localityName=Sehonghong",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_language" : [
|
||||||
|
{
|
||||||
|
"value" : "http://lexvo.org/id/iso639-2/en",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_native_subject" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Concept/ROAD/archaeology",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_original_id" : [
|
||||||
|
{
|
||||||
|
"value" : "Sehonghong, 59, age: 5950-6020",
|
||||||
|
"type" : "literal",
|
||||||
|
"datatype" : "http://www.w3.org/2001/XMLSchema#string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_owner" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Agent/Heidelberg%20Academy%20of%20Sciences%20and%20Humanities",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_publisher" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Agent/Heidelberg%20Academy%20of%20Sciences%20and%20Humanities",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_responsible" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Agent/ROCEEH%20Team",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_spatial_coverage" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Place/2360EC2A-F897-3075-9720-EE45ACEC75C9",
|
||||||
|
"type" : "uri"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Place/E99BB6B9-1EF5-3DBE-8EEC-9340DC7C68CF",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_temporal_coverage" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Time-Span/5950/6020",
|
||||||
|
"type" : "uri"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Time-Span/Wilton",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_title" : [
|
||||||
|
{
|
||||||
|
"value" : "ROAD - locality: Sehonghong, finds: archaeology, culture: Wilton",
|
||||||
|
"type" : "literal",
|
||||||
|
"datatype" : "http://www.w3.org/2001/XMLSchema#string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/has_type" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Concept/AO_Type/provided%20record",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/is_part_of" : [
|
||||||
|
{
|
||||||
|
"value" : "https://ariadne-infrastructure.eu/aocat/Collection/ROAD/1E2373FE-C708-3A0B-81BE-35F5593EBAA2",
|
||||||
|
"type" : "uri"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/was_issued" : [
|
||||||
|
{
|
||||||
|
"value" : "2021-04-23",
|
||||||
|
"type" : "literal",
|
||||||
|
"datatype" : "http://www.w3.org/2001/XMLSchema#dateTime"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"https://www.ariadne-infrastructure.eu/resource/ao/cat/1.1/was_modified" : [
|
||||||
|
{
|
||||||
|
"value" : "2021-05-06",
|
||||||
|
"type" : "literal",
|
||||||
|
"datatype" : "http://www.w3.org/2001/XMLSchema#dateTime"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue