Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
Merge branch 'develop' into feature/101_shacl_w3c_tests
Browse files Browse the repository at this point in the history
* develop: (54 commits)
  setting version to 3.0-SNAPSHOT
  Use diamond inference Signed-off-by:Bart Hanssens <[email protected]>
  eclipse-rdf4j/rdf4j#998 simplify tests
  Upgraded assertj-core
  eclipse-rdf4j/rdf4j#998 list supported shacl predicates, with test to make sure the list is kept up-to-date
  eclipse-rdf4j/rdf4j#998 configurations for enabling logging of diagnostic info and better javadoc
  optimize imports
  various cleanup and fix for sh:or
  eclipse-rdf4j/rdf4j#1113 added config and factory class for ShaclSail
  eclipse-rdf4j/rdf4j#1113 moved graph name constant and fixed compliance test setup
  fixes after rebase
  eclipse-rdf4j/rdf4j#1247 support implicit and
  eclipse-rdf4j/rdf4j#1110 support nodeKind
  eclipse-rdf4j/rdf4j#1109 support for language in
  eclipse-rdf4j/rdf4j#1109 support for pattern
  eclipse-rdf4j/rdf4j#1109 reuse plan from datatype to implement minLength and maxLength
  eclipse-rdf4j/rdf4j#998 support for nested validation results
  eclipse-rdf4j/rdf4j#998 support sh:or better
  eclipse-rdf4j/rdf4j#998 support SHACL RDF report format
  eclipse-rdf4j/rdf4j#998 log which shape caused the issue
  ...

Signed-off-by: Håvard Ottestad <[email protected]>

# Conflicts:
#	shacl/src/test/java/org/eclipse/rdf4j/sail/shacl/Utils.java
  • Loading branch information
hmottestad committed Jan 28, 2019
2 parents 3a36d7b + 237564c commit cd0fad0
Show file tree
Hide file tree
Showing 369 changed files with 8,334 additions and 1,353 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ dependency-reduced-pom.xml
# NetBean files
**/nb-configuration.xml
**/nbactions*.xml
compliance/sparql/overlays
2 changes: 1 addition & 1 deletion compliance/elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-storage-compliance</artifactId>
<version>2.5-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
</parent>

<artifactId>rdf4j-elasticsearch-compliance</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@
import org.elasticsearch.test.ESIntegTestCase.SuppressLocalMode;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

@ClusterScope(numDataNodes = 1)
@SuppressLocalMode
@Ignore("timeouts on JIPP due to ES cluster being spun up - see https://github.com/eclipse/rdf4j/issues/1196")
public class ElasticsearchIndexTest extends ESIntegTestCase {

private static final ValueFactory vf = SimpleValueFactory.getInstance();
Expand Down Expand Up @@ -257,8 +259,8 @@ public void testAddMultiple()
throws Exception
{
// add a statement to an index
HashSet<Statement> added = new HashSet<Statement>();
HashSet<Statement> removed = new HashSet<Statement>();
HashSet<Statement> added = new HashSet<>();
HashSet<Statement> removed = new HashSet<>();
added.add(statement11);
added.add(statement12);
added.add(statement21);
Expand All @@ -285,7 +287,7 @@ public void testAddMultiple()
assertStatement(statement22, document);

// check if the text field stores all added string values
Set<String> texts = new HashSet<String>();
Set<String> texts = new HashSet<>();
texts.add("cats");
texts.add("dogs");
// FIXME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

@ClusterScope(numDataNodes = 1)
@SuppressLocalMode
@Ignore("timeouts on JIPP due to ES cluster being spun up - see https://github.com/eclipse/rdf4j/issues/1196")
public class ElasticsearchSailGeoSPARQLTest extends ESIntegTestCase {

AbstractLuceneSailGeoSPARQLTest delegateTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
import org.elasticsearch.test.ESIntegTestCase.SuppressLocalMode;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

@ClusterScope(numDataNodes = 1)
@SuppressLocalMode
@Ignore("timeouts on JIPP due to ES cluster being spun up - see https://github.com/eclipse/rdf4j/issues/1196")
public class ElasticsearchSailIndexedPropertiesTest extends ESIntegTestCase {

AbstractLuceneSailIndexedPropertiesTest delegateTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
import org.elasticsearch.test.ESIntegTestCase.SuppressLocalMode;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

@ClusterScope(numDataNodes = 1)
@SuppressLocalMode
@Ignore("timeouts on JIPP due to ES cluster being spun up - see https://github.com/eclipse/rdf4j/issues/1196")
public class ElasticsearchSailTest extends ESIntegTestCase {

AbstractLuceneSailTest delegateTest;
Expand Down
2 changes: 1 addition & 1 deletion compliance/geosparql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-storage-compliance</artifactId>
<version>2.5-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
</parent>

<artifactId>rdf4j-geosparql-compliance</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compliance/lucene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-storage-compliance</artifactId>
<version>2.5-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
</parent>

<artifactId>rdf4j-lucene-compliance</artifactId>
Expand Down
13 changes: 4 additions & 9 deletions compliance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-storage-parent</artifactId>
<version>2.5-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
</parent>

<artifactId>rdf4j-storage-compliance</artifactId>
<packaging>pom</packaging>

<modules>
<module>model</module>
<module>lucene</module>
<module>sail-model</module>
<module>sparql</module>
<module>lucene</module>
<module>elasticsearch</module>
<module>solr</module>
<module>store</module>
Expand All @@ -27,12 +28,6 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-http-compliance</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-rio-testsuite</artifactId>
Expand Down
10 changes: 5 additions & 5 deletions compliance/model/pom.xml → compliance/sail-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-storage-compliance</artifactId>
<version>2.5-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
</parent>

<artifactId>rdf4j-model-compliance</artifactId>
<artifactId>rdf4j-sail-model-compliance</artifactId>

<name>RDF4J Model compliance test</name>
<description>Tests for RDF4J Model</description>
<name>RDF4J SAIL Model compliance test</name>
<description>Tests for RDF4J SaIL Model</description>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-runtime</artifactId>
<artifactId>rdf4j-sail-model</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion compliance/serql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-storage-compliance</artifactId>
<version>2.5-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
</parent>

<artifactId>rdf4j-serql-compliance</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compliance/shacl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-storage-compliance</artifactId>
<version>2.5-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
</parent>

<artifactId>rdf4j-shacl-compliance</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018 Eclipse RDF4J contributors, Aduna, and others.
* Copyright (c) 2018 Eclipse RDF4J contributors.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -8,11 +8,6 @@
package org.eclipse.rdf4j.sail.shacl;

import org.eclipse.rdf4j.model.Model;
import org.eclipse.rdf4j.model.Resource;
import org.eclipse.rdf4j.model.impl.LinkedHashModel;
import org.eclipse.rdf4j.model.vocabulary.RDF;
import org.eclipse.rdf4j.model.vocabulary.SHACL;
import org.eclipse.rdf4j.repository.sail.SailRepository;
import org.eclipse.rdf4j.sail.NotifyingSail;
import org.eclipse.rdf4j.sail.Sail;
import org.eclipse.rdf4j.sail.memory.MemoryStore;
Expand Down Expand Up @@ -62,39 +57,9 @@ protected NotifyingSail newDataSail() {
return new MemoryStore();
}

protected SailRepository createShapesRepository() {
SailRepository repo = new SailRepository(new MemoryStore());
repo.initialize();
return repo;
}

@Override
protected Sail newSail(Model shapesGraph) {
SailRepository shapesRep = createShapesRepository();
if (shapesGraph != null) {
try {
upload(shapesRep, shapesGraph);
}
catch (Exception exc) {
try {
shapesRep.shutDown();
shapesRep = null;
}
catch (Exception e2) {
logger.error(e2.toString(), e2);
}
throw exc;
}
}
Model infer = new LinkedHashModel();
for (Resource subj : shapesGraph.filter(null, RDF.TYPE, SHACL.NODE_SHAPE).subjects()) {
infer.add(subj, RDF.TYPE, SHACL.SHAPE);
}
for (Resource subj : shapesGraph.filter(null, RDF.TYPE, SHACL.PROPERTY_SHAPE).subjects()) {
infer.add(subj, RDF.TYPE, SHACL.SHAPE);
}
upload(shapesRep, infer);
return new ShaclSail(newDataSail(), shapesRep);
protected Sail newSail() {
return new ShaclSail(newDataSail());
}

}
2 changes: 1 addition & 1 deletion compliance/solr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-storage-compliance</artifactId>
<version>2.5-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
</parent>

<artifactId>rdf4j-solr-compliance</artifactId>
Expand Down
81 changes: 0 additions & 81 deletions compliance/solr/solr/cores/embedded/conf/schema.xml

This file was deleted.

2 changes: 1 addition & 1 deletion compliance/solr/solr/cores/embedded/conf/solrconfig.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<config>
<luceneMatchVersion>5.0.0</luceneMatchVersion>
<luceneMatchVersion>6.0.0</luceneMatchVersion>

<dataDir>target/test-data</dataDir>

Expand Down
Loading

0 comments on commit cd0fad0

Please sign in to comment.