This is an automated email from the ASF dual-hosted git repository. andy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/jena.git
commit 39096db350d9cecb3e6fbb27ac948e6242e3c2db Author: Andy Seaborne <[email protected]> AuthorDate: Sun Jul 21 20:38:16 2024 +0100 Reduce maven build noise --- jena-examples/src/main/java/tdb1/examples/ExTDB3.java | 15 +++++++-------- .../org/apache/jena/permissions/graph/TDBGraphTest.java | 5 ++--- jena-tdb1/src/main/java/org/apache/jena/tdb/TDB.java | 7 ++++++- .../query/text/assembler/TestTextDatasetAssembler.java | 2 -- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/jena-examples/src/main/java/tdb1/examples/ExTDB3.java b/jena-examples/src/main/java/tdb1/examples/ExTDB3.java index e678664d5b..52179cd27c 100644 --- a/jena-examples/src/main/java/tdb1/examples/ExTDB3.java +++ b/jena-examples/src/main/java/tdb1/examples/ExTDB3.java @@ -18,19 +18,18 @@ package tdb1.examples; -import org.apache.jena.riot.RDFDataMgr ; - import org.apache.jena.assembler.Assembler ; import org.apache.jena.query.Dataset ; import org.apache.jena.rdf.model.Model ; import org.apache.jena.rdf.model.Resource ; +import org.apache.jena.riot.RDFDataMgr ; import org.apache.jena.shared.JenaException ; import org.apache.jena.sparql.core.assembler.DatasetAssemblerVocab ; import org.apache.jena.sparql.util.TypeNotUniqueException ; import org.apache.jena.sparql.util.graph.GraphUtils ; -import org.apache.jena.tdb1.assembler.VocabTDB; +import org.apache.jena.tdb1.assembler.VocabTDB1; -/** +/** * Examples of finding an assembler for a TDB model in a larger collection * of descriptions in a single file. */ @@ -39,8 +38,8 @@ public class ExTDB3 public static void main(String... argv) { String assemblerFile = "Store/tdb-assembler.ttl" ; - - // Find a particular description in the file where there are several: + + // Find a particular description in the file where there are several: Model spec = RDFDataMgr.loadModel(assemblerFile) ; // Find the right starting point for the description in some way. @@ -51,10 +50,10 @@ public class ExTDB3 root = spec.createResource("http://example/myChoiceOfURI" ); else { - // Alternatively, look for the a single resource of the right type. + // Alternatively, look for the a single resource of the right type. try { // Find the required description - the file can contain descriptions of many different types. - root = GraphUtils.findRootByType(spec, VocabTDB.tDatasetTDB) ; + root = GraphUtils.findRootByType(spec, VocabTDB1.tDatasetTDB) ; if ( root == null ) throw new JenaException("Failed to find a suitable root") ; } catch (TypeNotUniqueException ex) diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java index d339c65354..b9a378e910 100644 --- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java +++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,7 +42,6 @@ public class TDBGraphTest extends MemGraphTest { @After public void tearDown() { - TDB1.sync(dsGraph); dsGraph.close(); TDB1.closedown(); } diff --git a/jena-tdb1/src/main/java/org/apache/jena/tdb/TDB.java b/jena-tdb1/src/main/java/org/apache/jena/tdb/TDB.java index d785eb1f03..58763e38a2 100644 --- a/jena-tdb1/src/main/java/org/apache/jena/tdb/TDB.java +++ b/jena-tdb1/src/main/java/org/apache/jena/tdb/TDB.java @@ -35,12 +35,13 @@ import org.slf4j.LoggerFactory ; * @deprecated Use {@link org.apache.jena.tdb1.TDB1} */ @Deprecated(forRemoval = true) +@SuppressWarnings("all") public class TDB { private TDB() {} // Initialization statics must be first in the class to avoid - // problems with recursive initialization. Specifcally, + // problems with recursive initialization. Specifically, // initLock being null because elsewhere started the initialization // and is calling into the TDB class. // The best order is: @@ -114,21 +115,25 @@ public class TDB { } /** Sync a TDB-backed Model. Do nothing if not TDB-backed. */ + @SuppressWarnings({"deprecated", "removal"}) public static void sync(Model model) { TDB1.sync(model); } /** Sync a TDB-backed Graph. Do nothing if not TDB-backed. */ + @SuppressWarnings({"deprecated", "removal"}) public static void sync(Graph graph) { TDB1.sync(graph); } /** Sync a TDB-backed Dataset. Do nothing if not TDB-backed. */ + @SuppressWarnings({"deprecated", "removal"}) public static void sync(Dataset dataset) { TDB1.sync(dataset); } /** Sync a TDB-backed DatasetGraph. Do nothing if not TDB-backed. */ + @SuppressWarnings({"deprecated", "removal"}) public static void sync(DatasetGraph dataset) { TDB1.sync(dataset); } diff --git a/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java b/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java index 3ec5d84982..f111a51f3b 100644 --- a/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java +++ b/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java @@ -28,8 +28,6 @@ import org.apache.jena.query.text.* ; import org.apache.jena.query.text.changes.TextQuadAction; import org.apache.jena.rdf.model.Resource ; import org.apache.jena.sys.JenaSystem; -import org.apache.jena.tdb1.assembler.VocabTDB1; -import org.apache.jena.tdb1.sys.TDBInternal; import org.apache.jena.vocabulary.RDF ; import org.junit.After; import org.junit.BeforeClass;
