Skip to content

Commit

Permalink
Merge pull request #2382 from eclipse/develop
Browse files Browse the repository at this point in the history
Merge develop into master for 3.3.0 release
  • Loading branch information
hmottestad authored Jul 24, 2020
2 parents c94b6ba + e4d2234 commit a541037
Show file tree
Hide file tree
Showing 864 changed files with 15,670 additions and 2,353 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ compliance/repository/overlays
/core/sail/elasticsearch-store/tempElasticsearchDownload/*
tempElasticsearchDownload
cache.db
formatter-maven-cache.properties
2 changes: 1 addition & 1 deletion assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-assembly</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-bom</artifactId>
<packaging>pom</packaging>
Expand Down
12 changes: 7 additions & 5 deletions compliance/elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-compliance</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-elasticsearch-compliance</artifactId>
<name>RDF4J Elasticsearch Sail Tests</name>
<description>Tests for Elasticsearch.</description>
<properties>
<lucene.version>7.5.0</lucene.version>
<elasticsearch.version>6.5.4</elasticsearch.version>
</properties>
<!-- disable the Java security manager for elasticsearch tests -->
<build>
<plugins>
Expand Down Expand Up @@ -107,6 +103,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.25</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compliance/geosparql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-compliance</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-geosparql-compliance</artifactId>
<name>RDF4J GeoSPARQL compliance tests</name>
Expand Down
2 changes: 1 addition & 1 deletion compliance/lucene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-compliance</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-lucene-compliance</artifactId>
<name>RDF4J Lucene Sail Tests</name>
Expand Down
2 changes: 1 addition & 1 deletion compliance/model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>rdf4j-compliance</artifactId>
<groupId>org.eclipse.rdf4j</groupId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>rdf4j-model-compliance</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compliance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-compliance</artifactId>
<packaging>pom</packaging>
Expand Down
11 changes: 7 additions & 4 deletions compliance/repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-compliance</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-repository-compliance</artifactId>
<packaging>war</packaging>
<name>RDF4J Repository compliance tests</name>
<description>Compliance testing for the Repository API implementations</description>
<properties>
<jetty.version>9.4.19.v20190610</jetty.version>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -56,6 +53,12 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-rio-nquads</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compliance/rio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-compliance</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-rio-compliance</artifactId>
<name>RDF4J Rio compliance tests</name>
Expand Down
2 changes: 1 addition & 1 deletion compliance/serql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-compliance</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-serql-compliance</artifactId>
<name>RDF4J SeRQL query parser compliance tests</name>
Expand Down
2 changes: 1 addition & 1 deletion compliance/shacl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-compliance</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-shacl-compliance</artifactId>
<name>RDF4J SHACL compliance tests</name>
Expand Down
5 changes: 1 addition & 4 deletions compliance/solr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-compliance</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-solr-compliance</artifactId>
<name>RDF4J Solr Sail Tests</name>
<description>Tests for Solr Sail.</description>
<properties>
<solr.version>7.5.0</solr.version>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
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>7.5.0</luceneMatchVersion>
<luceneMatchVersion>7.7.2</luceneMatchVersion>
<dataDir>target/test-data</dataDir>
<requestHandler name="/select" class="solr.SearchHandler"/>
<requestHandler name="/get" class="solr.RealTimeGetHandler"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.eclipse.rdf4j.model.Resource;
import org.eclipse.rdf4j.model.Statement;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
import org.eclipse.rdf4j.model.vocabulary.XMLSchema;
import org.eclipse.rdf4j.model.vocabulary.XSD;
import org.eclipse.rdf4j.repository.sail.SailRepository;
import org.eclipse.rdf4j.repository.sail.SailRepositoryConnection;
import org.eclipse.rdf4j.sail.lucene.LuceneSail;
Expand Down Expand Up @@ -357,9 +357,9 @@ public void testContextsRemoveContext2() throws Exception {
@Test
public void testRejectedDatatypes() {
Literal literal1 = fac.createLiteral("hi there");
Literal literal2 = fac.createLiteral("hi there, too", XMLSchema.STRING);
Literal literal2 = fac.createLiteral("hi there, too", XSD.STRING);
Literal literal3 = fac.createLiteral("1.0");
Literal literal4 = fac.createLiteral("1.0", XMLSchema.FLOAT);
Literal literal4 = fac.createLiteral("1.0", XSD.FLOAT);

assertEquals("Is the first literal accepted?", true, index.accept(literal1));
assertEquals("Is the second literal accepted?", true, index.accept(literal2));
Expand Down
5 changes: 1 addition & 4 deletions compliance/sparql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-compliance</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-sparql-compliance</artifactId>
<packaging>war</packaging>
<name>RDF4J SPARQL query parser compliance tests</name>
<description>Tests for the SPARQL query language implementation</description>
<properties>
<jetty.version>9.4.19.v20190610</jetty.version>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ public class ArbitraryLengthPathTest extends TestCase {
private RepositoryConnection con;

@Before
@Override
public void setUp() throws Exception {
repo = new SailRepository(new MemoryStore());
repo.initialize();
con = repo.getConnection();
}

@After
@Override
public void tearDown() throws Exception {
con.close();
repo.shutDown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public SPARQLServiceEvaluationTest() {
* @throws java.lang.Exception
*/
@Before
@Override
public void setUp() throws Exception {
// set up the server: the maximal number of endpoints must be known
List<String> repositoryIds = new ArrayList<>(MAX_ENDPOINTS);
Expand Down Expand Up @@ -204,6 +205,7 @@ protected void loadDataSet(Repository rep, String datasetFile)
* @throws java.lang.Exception
*/
@After
@Override
public void tearDown() throws Exception {
try {
localRepository.shutDown();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*******************************************************************************
* Copyright (c) 2020 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
* http://www.eclipse.org/org/documents/edl-v10.php.
*******************************************************************************/
package org.eclipse.rdf4j.query.parser.sparql.function;

import static org.assertj.core.api.Assertions.assertThat;

import java.io.StringReader;

import org.eclipse.rdf4j.query.BindingSet;
import org.eclipse.rdf4j.query.TupleQueryResult;
import org.eclipse.rdf4j.repository.RepositoryConnection;
import org.eclipse.rdf4j.repository.sail.SailRepository;
import org.eclipse.rdf4j.rio.RDFFormat;
import org.eclipse.rdf4j.sail.memory.MemoryStore;
import org.junit.Before;
import org.junit.Test;

/**
* Integration tests for evaluation of custom functions in SPARQL
*
* @author Jeen Broekstra
*/
public class CustomFunctionEvaluationTest {

private SailRepository rep;

@Before
public void setUp() {
rep = new SailRepository(new MemoryStore());
}

@Test
public void testTriplesourceRetrieval() throws Exception {
String data = "<ex:s1> a <ex:CustomClass> . <ex:s1> <ex:related> <ex:s2>, <ex:s3> .";
String query = "SELECT ?s ?result WHERE { ?s a <ex:CustomClass>. BIND(<urn:triplesourceCustomFunction>(?s) as ?result) }";

try (RepositoryConnection conn = rep.getConnection()) {
conn.add(new StringReader(data), "", RDFFormat.TURTLE);

TupleQueryResult result = conn.prepareTupleQuery(query).evaluate();
BindingSet bs = result.next();
assertThat(bs.getValue("result").stringValue()).isEqualTo("related to ex:s2, ex:s3");
}

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*******************************************************************************
* Copyright (c) 2020 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
* http://www.eclipse.org/org/documents/edl-v10.php.
*******************************************************************************/
package org.eclipse.rdf4j.query.parser.sparql.function;

import java.util.List;

import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Statement;
import org.eclipse.rdf4j.model.Value;
import org.eclipse.rdf4j.model.ValueFactory;
import org.eclipse.rdf4j.query.QueryResults;
import org.eclipse.rdf4j.query.algebra.evaluation.TripleSource;
import org.eclipse.rdf4j.query.algebra.evaluation.ValueExprEvaluationException;
import org.eclipse.rdf4j.query.algebra.evaluation.function.Function;

/**
* A test-only function that evaluates against the supplied triple source. It looks up the 'ex:related' relations for
* the given input IRI and outputs a single literal of the form "related to v1, v2, v3".
*
* @author Jeen Broekstra
*
*/
public class TestTripleSourceCustomFunction implements Function {

@Override
public String getURI() {
return "urn:triplesourceCustomFunction";
}

@Override
public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
throw new UnsupportedOperationException("can only evaluate with triplesource");
}

@Override
public Value evaluate(TripleSource tripleSource, Value... args) throws ValueExprEvaluationException {
IRI subject = (IRI) args[0];
IRI related = tripleSource.getValueFactory().createIRI("ex:related");
List<? extends Statement> relatedStatements = QueryResults
.asList(tripleSource.getStatements(subject, related, null));

StringBuilder functionResult = new StringBuilder();
functionResult.append("related to ");
for (Statement st : relatedStatements) {
functionResult.append(st.getObject().stringValue());
functionResult.append(", ");
}
functionResult.setLength(functionResult.length() - 2);

return tripleSource.getValueFactory().createLiteral(functionResult.toString());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.rdf4j.query.parser.sparql.function.TestTripleSourceCustomFunction
2 changes: 1 addition & 1 deletion core/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-core</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-client</artifactId>
<name>RDF4J: Client Libraries</name>
Expand Down
2 changes: 1 addition & 1 deletion core/http/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-http</artifactId>
<version>3.2.4-SNAPSHOT</version>
<version>3.3.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-http-client</artifactId>
<name>RDF4J: HTTP client</name>
Expand Down
Loading

0 comments on commit a541037

Please sign in to comment.