Skip to content

Commit

Permalink
GH-4819 code cleanup and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad committed Dec 20, 2023
1 parent c24319e commit c90af45
Show file tree
Hide file tree
Showing 206 changed files with 321 additions and 289 deletions.
2 changes: 1 addition & 1 deletion assembly-descriptors/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>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-assembly-descriptors</artifactId>
<name>RDF4J: Assembly Descriptors</name>
Expand Down
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>5.1.0-SNAPSHOT</version>
<version>5.0.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>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-bom</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion compliance/elasticsearch/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>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-elasticsearch-compliance</artifactId>
<name>RDF4J: Elasticsearch Sail Tests</name>
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>5.1.0-SNAPSHOT</version>
<version>5.0.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>5.1.0-SNAPSHOT</version>
<version>5.0.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>5.1.0-SNAPSHOT</version>
<version>5.0.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>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-compliance</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion compliance/repository/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>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-repository-compliance</artifactId>
<packaging>war</packaging>
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>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-rio-compliance</artifactId>
<name>RDF4J: Rio compliance tests</name>
Expand Down
2 changes: 1 addition & 1 deletion compliance/solr/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>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-solr-compliance</artifactId>
<name>RDF4J: Solr Sail Tests</name>
Expand Down
2 changes: 1 addition & 1 deletion compliance/sparql/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>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-sparql-compliance</artifactId>
<packaging>war</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public void testVariableNameHandling() throws Exception {
assertTrue(tqr.hasNext());

List<BindingSet> result = QueryResults.asList(tqr);
assertTrue(result.size() > 0);
assertTrue(!result.isEmpty());
for (BindingSet bs : result) {
assertTrue(bs.hasBinding("val"));
assertTrue(bs.hasBinding("s"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/*******************************************************************************
* Copyright (c) 2020 Eclipse RDF4J contributors.
* Copyright (c) 2023 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/

package org.eclipse.rdf4j.sail.extensiblestore;

import org.eclipse.rdf4j.query.Dataset;
import org.eclipse.rdf4j.repository.Repository;
import org.eclipse.rdf4j.repository.dataset.DatasetRepository;
import org.eclipse.rdf4j.repository.sail.SailRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
/*******************************************************************************
* Copyright (c) 2015 Eclipse RDF4J contributors, Aduna, and others.
* Copyright (c) 2023 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
package org.eclipse.rdf4j.sail.extensiblestore;
******************************************************************************/

import java.util.Map;
package org.eclipse.rdf4j.sail.extensiblestore;

import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.repository.Repository;
import org.eclipse.rdf4j.repository.sail.SailRepository;
import org.eclipse.rdf4j.sail.extensiblestore.impl.ExtensibleStoreOrderedImplForTests;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/*******************************************************************************
* Copyright (c) 2019 Eclipse RDF4J contributors.
* Copyright (c) 2023 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/

package org.eclipse.rdf4j.sail.extensiblestore.impl;

import org.eclipse.rdf4j.sail.extensiblestore.ExtensibleStoreConnection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/*******************************************************************************
* Copyright (c) 2019 Eclipse RDF4J contributors.
* Copyright (c) 2023 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/

package org.eclipse.rdf4j.sail.extensiblestore.impl;

import org.eclipse.rdf4j.common.annotation.InternalUseOnly;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/*******************************************************************************
* Copyright (c) 2019 Eclipse RDF4J contributors.
* Copyright (c) 2023 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.
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
******************************************************************************/

package org.eclipse.rdf4j.sail.extensiblestore.impl;

import java.util.Collections;
Expand Down
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>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-client</artifactId>
<name>RDF4J: Client Libraries</name>
Expand Down
2 changes: 1 addition & 1 deletion core/collection-factory/api/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-collection-factory</artifactId>
<version>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-collection-factory-api</artifactId>
<name>RDF4J: Collection Factory - API</name>
Expand Down
2 changes: 1 addition & 1 deletion core/collection-factory/mapdb/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-collection-factory</artifactId>
<version>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-collection-factory-mapdb</artifactId>
<name>RDF4J: Collection Factory - Map DB backed</name>
Expand Down
2 changes: 1 addition & 1 deletion core/collection-factory/mapdb3/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-collection-factory</artifactId>
<version>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-collection-factory-mapdb3</artifactId>
<name>RDF4J: Collection Factory - Map DB v3 backed</name>
Expand Down
2 changes: 1 addition & 1 deletion core/collection-factory/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>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-collection-factory</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion core/common/annotation/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-common</artifactId>
<version>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-common-annotation</artifactId>
<name>RDF4J: common annotation</name>
Expand Down
2 changes: 1 addition & 1 deletion core/common/exception/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-common</artifactId>
<version>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-common-exception</artifactId>
<name>RDF4J: common exception</name>
Expand Down
2 changes: 1 addition & 1 deletion core/common/io/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-common</artifactId>
<version>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-common-io</artifactId>
<name>RDF4J: common IO</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public String toASCIIString() {
appendAscii(sb, userInfo);
sb.append('@');
}
if (host.length() > 0) {
if (!host.isEmpty()) {
sb.append(IDN.toASCII(host, IDN.ALLOW_UNASSIGNED));
}
if (port >= 0) {
Expand Down Expand Up @@ -516,7 +516,7 @@ public ParsedIRI normalize() {
boolean localhost = isScheme("file") && userInfo == null && -1 == port
&& ("".equals(host) || "localhost".equals(host));
String _host = localhost ? null
: host == null || host.length() == 0 ? host
: host == null || host.isEmpty() ? host
: IDN.toUnicode(pctEncodingNormalization(toLowerCase(host)),
IDN.USE_STD3_ASCII_RULES | IDN.ALLOW_UNASSIGNED);
String _path = _scheme != null && path == null ? "" : normalizePath(path);
Expand Down Expand Up @@ -581,14 +581,14 @@ public ParsedIRI resolve(ParsedIRI relative) {
// relURI._scheme == null

// RFC, step 2:
if (relative.getHost() == null && relative.getQuery() == null && relative.getPath().length() == 0) {
if (relative.getHost() == null && relative.getQuery() == null && relative.getPath().isEmpty()) {

// Inherit any fragment identifier from relURI
String fragment = relative.getFragment();

return new ParsedIRI(this.getScheme(), this.getUserInfo(), this.getHost(), this.getPort(), this.getPath(),
this.getQuery(), fragment);
} else if (relative.getHost() == null && relative.getPath().length() == 0) {
} else if (relative.getHost() == null && relative.getPath().isEmpty()) {

// Inherit any query or fragment from relURI
String query = relative.getQuery();
Expand Down Expand Up @@ -636,7 +636,7 @@ public ParsedIRI resolve(ParsedIRI relative) {
path = path.substring(0, lastSlashIdx + 1);
}

if (path.length() == 0) {
if (path.isEmpty()) {
// No path means: start at root.
path = "/";
}
Expand Down Expand Up @@ -782,7 +782,7 @@ private void parse() throws URISyntaxException {
if (':' == peek()) {
advance(1);
String p = parseMember(DIGIT, '/');
if (p.length() > 0) {
if (!p.isEmpty()) {
port = Integer.parseInt(p);
} else {
port = -1;
Expand Down Expand Up @@ -1101,7 +1101,7 @@ && isMember(ALPHA, path.codePointAt(1))) {
}

private String pctEncodingNormalization(String path) {
if (path == null || path.length() == 0 || path.indexOf('%') < 0) {
if (path == null || path.isEmpty() || path.indexOf('%') < 0) {
return path; // no pct encodings
}
String[] encodings = listPctEncodings(path);
Expand Down
2 changes: 1 addition & 1 deletion core/common/iterator/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-common</artifactId>
<version>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-common-iterator</artifactId>
<name>RDF4J: common iterators</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ public static <E> CloseableIteration<? extends E> getWildcardInstance(
public static <E> CloseableIteration<? extends E> getWildcardInstance(Comparator<E> cmp,
CloseableIteration<? extends E> leftIteration, CloseableIteration<? extends E> rightIteration) {

// if (rightIteration instanceof EmptyIteration) {
// return leftIteration;
// } else if (leftIteration instanceof EmptyIteration) {
// return rightIteration;
// } else {
return new DualUnionIteration<>(cmp, leftIteration, rightIteration);
// }
if (rightIteration instanceof EmptyIteration) {
return leftIteration;
} else if (leftIteration instanceof EmptyIteration) {
return rightIteration;
} else {
return new DualUnionIteration<>(cmp, leftIteration, rightIteration);
}
}

public static <E> CloseableIteration<E> getInstance(CloseableIteration<E> leftIteration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.eclipse.rdf4j.common.annotation.Experimental;

/**
* The index name of the underlying data structure, e.g. SPOC, POSC, etc.
* A way to signal which index is in use for a specific iterator (e.g. SPOC, POSC, etc.). Used in the query explanation.
*/
@Experimental
public interface IndexReportingIterator {
Expand Down
2 changes: 1 addition & 1 deletion core/common/order/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-common</artifactId>
<version>5.1.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<artifactId>rdf4j-common-order</artifactId>
<name>RDF4J: common order</name>
Expand Down
Loading

0 comments on commit c90af45

Please sign in to comment.