This is an automated email from the ASF dual-hosted git repository.

afs pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git


The following commit(s) were added to refs/heads/main by this push:
     new 0f651aa4fd GH-4153: Remove upload of dataset assembler/service config
0f651aa4fd is described below

commit 0f651aa4fd927e50705d6472b6a3b597d2189ee8
Author: Andy Seaborne <[email protected]>
AuthorDate: Thu Aug 13 10:40:21 2026 +0100

    GH-4153: Remove upload of dataset assembler/service config
---
 .../org/apache/jena/fuseki/mgt/ActionDatasets.java | 120 +-------
 .../org/apache/jena/fuseki/mgt/ActionReload.java   |   2 +
 .../org/apache/jena/fuseki/mgt/FusekiAdmin.java    |  42 ---
 .../apache/jena/fuseki/mod/admin/TSMod_Admin.java  |   1 -
 .../mod/admin/TestAdminAddDatasetsConfigFile.java  | 321 ---------------------
 .../testing/Config/config-ds-bad-name-1.ttl        |  15 -
 .../testing/Config/config-ds-bad-name-2.ttl        |  15 -
 .../testing/Config/config-ds-bad-name-3.ttl        |  15 -
 .../testing/Config/config-ds-bad-name-4.ttl        |  15 -
 .../testing/Config/config-ds-inf.ttl               |  30 --
 .../testing/Config/config-ds-plain-1.ttl           |  17 --
 .../testing/Config/config-ds-plain-2.ttl           |  18 --
 .../testing/Config/config-tdb2a.ttl                |  18 --
 .../testing/Config/config-tdb2b.ttl                |  18 --
 .../testing/Config/config-tdb2c.ttl                |  19 --
 15 files changed, 6 insertions(+), 660 deletions(-)

diff --git 
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
 
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
index 82b8b25813..df3abd767b 100644
--- 
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
+++ 
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionDatasets.java
@@ -28,7 +28,6 @@ import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.*;
 
-import jakarta.servlet.http.HttpServletRequest;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.jena.atlas.RuntimeIOException;
 import org.apache.jena.atlas.io.IO;
@@ -36,11 +35,9 @@ import org.apache.jena.atlas.json.JsonBuilder;
 import org.apache.jena.atlas.json.JsonValue;
 import org.apache.jena.atlas.lib.FileOps;
 import org.apache.jena.atlas.lib.InternalErrorException;
-import org.apache.jena.atlas.lib.NotImplemented;
 import org.apache.jena.atlas.logging.FmtLog;
 import org.apache.jena.atlas.web.ContentType;
 import org.apache.jena.datatypes.xsd.XSDDatatype;
-import org.apache.jena.dboe.base.file.Location;
 import org.apache.jena.fuseki.FusekiConfigException;
 import org.apache.jena.fuseki.build.DatasetDescriptionMap;
 import org.apache.jena.fuseki.build.FusekiConfig;
@@ -51,13 +48,8 @@ import org.apache.jena.fuseki.server.*;
 import org.apache.jena.fuseki.servlets.ActionLib;
 import org.apache.jena.fuseki.servlets.HttpAction;
 import org.apache.jena.fuseki.servlets.ServletOps;
-import org.apache.jena.fuseki.system.FusekiNetLib;
-import org.apache.jena.graph.Graph;
 import org.apache.jena.graph.Node;
-import org.apache.jena.query.Query;
-import org.apache.jena.query.QueryFactory;
 import org.apache.jena.rdf.model.*;
-import org.apache.jena.rdf.model.impl.Util;
 import org.apache.jena.riot.*;
 import org.apache.jena.riot.system.StreamRDF;
 import org.apache.jena.riot.system.StreamRDFLib;
@@ -65,12 +57,7 @@ import org.apache.jena.shared.JenaException;
 import org.apache.jena.sparql.core.DatasetGraph;
 import org.apache.jena.sparql.core.Quad;
 import org.apache.jena.sparql.core.assembler.AssemblerUtils;
-import org.apache.jena.sparql.exec.QueryExec;
-import org.apache.jena.sparql.exec.RowSet;
 import org.apache.jena.sparql.util.FmtUtils;
-import org.apache.jena.system.G;
-import org.apache.jena.tdb1.TDB1;
-import org.apache.jena.tdb2.TDB2;
 import org.apache.jena.vocabulary.RDF;
 import org.apache.jena.web.HttpSC;
 
@@ -140,21 +127,15 @@ public class ActionDatasets extends ActionContainerItem {
                 Model modelFromRequest = ModelFactory.createDefaultModel();
                 StreamRDF dest = 
StreamRDFLib.graph(modelFromRequest.getGraph());
 
-                boolean templatedRequest = false;
-
                 try {
                     if ( hasParams || WebContent.isHtmlForm(ct) ) {
+                        // ?dbType=...&dbName=...
                         assemblerFromForm(action, dest);
-                        templatedRequest = true;
-                        // dbName, dbType
                     } else if ( WebContent.isMultiPartForm(ct) ) {
-                        // Cannot be enabled.
                         ServletOps.errorBadRequest("Service configuration from 
a multipart upload not supported");
-                        //assemblerFromUpload(action, dest);
                     } else {
-                        if ( ! FusekiAdmin.allowConfigFiles() )
-                            ServletOps.errorBadRequest("Service configuration 
from an upload file not supported");
-                        assemblerFromBody(action, dest);
+                        action.log.error(format("[%d] Service configuration 
from an upload file not supported", action.id));
+                        ServletOps.errorBadRequest("Service configuration from 
an upload file not supported");
                     }
                 } catch (RiotException ex) {
                     ActionLib.consumeBody(action);
@@ -186,7 +167,7 @@ public class ActionDatasets extends ActionContainerItem {
                 final String datasetPath;
                 {
                     String datasetName = object.getLexicalForm();
-                    // This duplicates the code 
FusekiBuilder.buildDataAccessPoint to give better error messages and HTTP 
status code."
+                    // This duplicates the code 
FusekiBuilder.buildDataAccessPoint to give better error messages and HTTP 
status code.
 
                     // ---- Check and canonicalize name.
                     // Various explicit check for better error messages.
@@ -233,19 +214,6 @@ public class ActionDatasets extends ActionContainerItem {
                     ServletOps.error(HttpSC.CONFLICT_409, format("Name already 
registered '%s'", datasetPath));
                 }
 
-                // -- Validate any TDB locations.
-                // If this is a templated request, there is no need to do this
-                // because the location is "datasetPath" which has been 
checked.
-                if ( ! templatedRequest ) {
-                    List<String> tdbLocations = tdbLocations(action, 
model.getGraph());
-                    for(String tdbLocation : tdbLocations ) {
-                        if ( ! isValidTDBLocation(tdbLocation) ) {
-                            action.log.warn(format("[%d] TDB database location 
not acceptable: '%s'", action.id, tdbLocation));
-                            ServletOps.error(HttpSC.BAD_REQUEST_400, 
format("TDB database location not acceptable: '%s'", tdbLocation));
-                        }
-                    }
-                }
-
                 // ----
                 // Keep a persistent copy with a globally unique name.
                 // This is not used for anything other than being "for the 
record".
@@ -321,21 +289,6 @@ public class ActionDatasets extends ActionContainerItem {
         return true;
     }
 
-    // This works for TDB1 as well.
-    private boolean isValidTDBLocation(String tdbLocation) {
-        Location location = Location.create(tdbLocation);
-        if ( location.isMem() )
-            return true;
-        // No ".."
-        if (tdbLocation.startsWith("..") || tdbLocation.contains("/..") ) {
-            // That test was too strict.
-            List<String> components = FileOps.pathComponents(tdbLocation);
-            if ( components.contains("..") )
-                return false;
-        }
-        return true;
-    }
-
     /** Find the service resource. There must be only one in the 
configuration. */
     private Statement findService(Model model) {
         // Try to find by unique pServiceName (max backwards compatibility)
@@ -502,10 +455,6 @@ public class ActionDatasets extends ActionContainerItem {
         }
     }
 
-    private static void assemblerFromBody(HttpAction action, StreamRDF dest) {
-        bodyAsGraph(action, dest);
-    }
-
     private static Map<String, String> dbTypeToTemplate = new HashMap<>();
     static {
         dbTypeToTemplate.put(tDatabaseTDB,  Template.templateTDB1_FN);
@@ -545,11 +494,6 @@ public class ActionDatasets extends ActionContainerItem {
         RDFParser.create().source(new 
StringReader(instance)).base("http://base/";).lang(Lang.TTL).parse(dest);
     }
 
-    private static void assemblerFromUpload(HttpAction action, StreamRDF dest) 
{
-        throw new NotImplemented();
-        //DataUploader.incomingData(action, dest);
-    }
-
     // ---- Auxiliary functions
 
     private static Quad getOne(DatasetGraph dsg, Node g, Node s, Node p, Node 
o) {
@@ -571,60 +515,4 @@ public class ActionDatasets extends ActionContainerItem {
             return null;
         return stmt;
     }
-
-    private static void bodyAsGraph(HttpAction action, StreamRDF dest) {
-        HttpServletRequest request = action.getRequest();
-        String base = ActionLib.wholeRequestURL(request);
-        ContentType ct = FusekiNetLib.getContentType(request);
-        Lang lang = RDFLanguages.contentTypeToLang(ct.getContentTypeStr());
-        if ( lang == null ) {
-            ServletOps.errorBadRequest("Unknown content type for triples: " + 
ct);
-            return;
-        }
-        dest.prefix("root", base+"#");
-        ActionLib.parse(action, dest, lang, base);
-    }
-
-    // ---- POST
-
-    private static final String NL = "\n";
-
-    @SuppressWarnings("removal")
-    private static final String queryStringLocations =
-            "PREFIX tdb1:   <"+TDB1.namespace+">"+NL+
-            "PREFIX tdb2:   <"+TDB2.namespace+">"+NL+
-            """
-            SELECT * {
-               ?x ( tdb2:location | tdb1:location) ?location
-            }
-            """ ;
-
-    private static final Query queryLocations = 
QueryFactory.create(queryStringLocations);
-
-    private static List<String> tdbLocations(HttpAction action, Graph 
configGraph) {
-        try ( QueryExec exec =  
QueryExec.graph(configGraph).query(queryLocations).build() ) {
-            RowSet results = exec.select();
-            List<String> locations = new ArrayList<>();
-            results.forEach(b->{
-                Node loc = b.get("location");
-                String location;
-                if ( loc.isURI() )
-                    location = loc.getURI();
-                else if ( Util.isSimpleString(loc) )
-                    location = G.asString(loc);
-                else {
-                    //action.log.warn(format("[%d] Database location is not a 
string nor a URI", action.id));
-                    // No return
-                    ServletOps.errorBadRequest("TDB database location is not a 
string");
-                    location = null;
-                }
-                locations.add(location);
-            });
-            return locations;
-        } catch (Exception ex) {
-            // No return
-            ServletOps.errorBadRequest("TDB database location can not be 
deterined");
-            return null;
-        }
-    }
 }
diff --git 
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionReload.java
 
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionReload.java
index cb7b059297..82f2414b3b 100644
--- 
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionReload.java
+++ 
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionReload.java
@@ -41,6 +41,8 @@ import org.apache.jena.riot.RDFParser;
  */
 public class ActionReload extends ActionCtl {
 
+    public ActionReload() {}
+
     @Override
     public void validate(HttpAction action) {
         if ( action.getRequestMethod() != HttpMethod.METHOD_POST ) {
diff --git 
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/FusekiAdmin.java
 
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/FusekiAdmin.java
deleted file mode 100644
index 80e3c73d10..0000000000
--- 
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/FusekiAdmin.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- *
- *   https://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.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *   SPDX-License-Identifier: Apache-2.0
- */
-
-package org.apache.jena.fuseki.mgt;
-
-public class FusekiAdmin {
-    /**
-     * Control whether to allow creating new dataservices by uploading a 
config file.
-     * See {@link ActionDatasets}.
-     *
-     */
-    public static final String allowConfigFileProperty = 
"fuseki:allowAddByConfigFile";
-
-    /**
-     * Return whether to allow service configuration files to be uploaded as a 
file.
-     * See {@link ActionDatasets}.
-     */
-    public static boolean allowConfigFiles() {
-        String value = System.getProperty(allowConfigFileProperty);
-        if ( value != null )
-            return "true".equals(value);
-        return false;
-    }
-}
diff --git 
a/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/mod/admin/TSMod_Admin.java
 
b/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/mod/admin/TSMod_Admin.java
index 53d6e5bb45..0ee0ff1128 100644
--- 
a/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/mod/admin/TSMod_Admin.java
+++ 
b/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/mod/admin/TSMod_Admin.java
@@ -28,7 +28,6 @@ import org.junit.platform.suite.api.Suite;
 @SelectClasses({
     TestAdmin.class,
     TestAdminDatabaseOps.class,
-    TestAdminAddDatasetsConfigFile.class,
     TestAdminAddDatasetTemplate.class,
     TestFusekiReload.class,
 })
diff --git 
a/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/mod/admin/TestAdminAddDatasetsConfigFile.java
 
b/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/mod/admin/TestAdminAddDatasetsConfigFile.java
deleted file mode 100644
index 2270350788..0000000000
--- 
a/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/mod/admin/TestAdminAddDatasetsConfigFile.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- *
- *   https://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.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *   SPDX-License-Identifier: Apache-2.0
- */
-
-package org.apache.jena.fuseki.mod.admin;
-
-import static org.apache.jena.fuseki.mgt.ServerMgtConst.opDatasets;
-import static org.apache.jena.http.HttpOp.httpDelete;
-import static org.apache.jena.http.HttpOp.httpGet;
-import static org.apache.jena.http.HttpOp.httpPost;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
-
-import java.io.FileNotFoundException;
-import java.net.http.HttpRequest.BodyPublisher;
-import java.net.http.HttpRequest.BodyPublishers;
-import java.nio.file.Path;
-import java.util.Objects;
-import java.util.function.Consumer;
-
-import org.apache.commons.lang3.SystemUtils;
-import org.apache.jena.atlas.io.IO;
-import org.apache.jena.atlas.logging.LogCtl;
-import org.apache.jena.atlas.web.TypedInputStream;
-import org.apache.jena.fuseki.Fuseki;
-import org.apache.jena.fuseki.main.FusekiServer;
-import org.apache.jena.fuseki.main.FusekiTestLib;
-import org.apache.jena.fuseki.main.sys.FusekiModules;
-import org.apache.jena.fuseki.mgt.FusekiAdmin;
-import org.apache.jena.fuseki.test.HttpTest;
-import org.apache.jena.riot.WebContent;
-import org.apache.jena.web.HttpSC;
-import org.junit.jupiter.api.AfterAll;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-
-/**
- *  Tests of the admin functionality adding and deleting datasets dynamically.
- *  See also {@link TestAdminAddDatasetTemplate}.
- */
-public class TestAdminAddDatasetsConfigFile extends FusekiServerPerTest {
-    // Name of the dataset in the assembler file.
-    static String dsTest      = "test-ds1";
-    static String dsTestInf   = "test-ds4";
-
-    static final String dsTestTdb2a = "test-tdb2a";
-    static final String dsTestTdb2b = "test-tdb2b";
-    static final String dsTestTdb2c = "test-tdb2c";
-    static String fileBase    = "testing/Config/";
-
-    // Exactly the module under test
-    @Override
-    protected FusekiModules modulesSetup() {
-        return FusekiModules.create(FMod_Admin.create());
-    }
-
-    @BeforeAll public static void loggingAdmin() {
-        LogCtl.setLevel(Fuseki.adminLogName, "ERROR");
-    }
-
-    @AfterAll public static void resetLoggingAdmin() {
-        LogCtl.setLevel(Fuseki.adminLogName, "ERROR");
-    }
-
-    protected void withServerFileEnabled(Consumer<FusekiServer> action) {
-        System.setProperty(FusekiAdmin.allowConfigFileProperty, "true");
-        try {
-            super.withServer(null, action);
-        } finally {
-            System.getProperties().remove(FusekiAdmin.allowConfigFileProperty);
-        }
-    }
-
-    @Test public void add_block_dataset_1() {
-        // Blocked by default.
-        withServer(server -> {
-            FusekiTestLib.expect400(()->addTestDatasetByFile(server, 
"config-ds-plain-1.ttl"));
-        });
-    }
-
-    @Test public void add_unblocked_dataset_1() {
-        // Blocked by default.
-        withServerFileEnabled(server -> {
-            addTestDatasetByFile(server, "config-ds-plain-1.ttl");
-        });
-    }
-
-    // Try to add twice
-    @Test public void add_add_dataset_1() {
-        withServerFileEnabled(server -> {
-            checkNotThere(server, dsTest);
-
-            addTestDatasetByFile(server, "config-ds-plain-1.ttl");
-            checkExists(server, dsTest);
-
-            // Second try should fail.
-            FusekiTestLib.expect409(()->addTestDatasetByFile(server, 
"config-ds-plain-1.ttl"));
-
-            // Check still exists.
-            checkExists(server, dsTest);
-            // Delete-able.
-            deleteDataset(server, dsTest);
-            checkNotThere(server, dsTest);
-        });
-    }
-
-    @Test public void add_delete_dataset_1() {
-        withServerFileEnabled(server -> {
-
-            checkNotThere(server, dsTest);
-            checkNotThere(server, dsTestInf);
-            addTestDatasetByFile(server, "config-ds-inf.ttl");
-            checkNotThere(server, dsTest);
-            checkExists(server, dsTestInf);
-
-            deleteDataset(server, dsTestInf);
-
-            checkNotThere(server, dsTestInf);
-            addTestDatasetByFile(server, "config-ds-inf.ttl");
-            checkExists(server, dsTestInf);
-            deleteDataset(server, dsTestInf);
-        });
-    }
-
-    @Test public void add_delete_dataset_2() {
-        withServerFileEnabled(server -> {
-            // New style operations : cause two fuseki:names
-            addTestDatasetByFile(server, "config-ds-plain-2.ttl");
-            checkExists(server, "test-ds2");
-        });
-    }
-
-    @Test public void add_delete_dataset_TDB_1() {
-        withServerFileEnabled(server -> {
-
-            String testDB = dsTestTdb2a;
-            assumeNotWindows();
-
-            checkNotThere(server, testDB);
-
-            addTestDatasetTDB2(server, testDB);
-
-            // Check exists.
-            checkExists(server, testDB);
-
-            // Remove it.
-            deleteDataset(server, testDB);
-            checkNotThere(server, testDB);
-        });
-    }
-
-    @Test public void add_delete_dataset_TDB_2() {
-        withServerFileEnabled(server -> {
-            // This has location "--mem--"
-            String testDB = dsTestTdb2b;
-            checkNotThere(server, testDB);
-            addTestDatasetTDB2(server, testDB);
-            // Check exists.
-            checkExists(server, testDB);
-            // Remove it.
-            deleteDataset(server, testDB);
-            checkNotThere(server, testDB);
-        });
-    }
-
-    @Test public void add_dataset_error_1() {
-        withServerFileEnabled(server -> {
-            HttpTest.execWithHttpException(HttpSC.BAD_REQUEST_400,
-                                           ()-> addTestDatasetByFile(server, 
"config-ds-bad-name-1.ttl"));
-        });
-    }
-
-    @Test public void add_dataset_error_2() {
-        withServerFileEnabled(server -> {
-            HttpTest.execWithHttpException(HttpSC.BAD_REQUEST_400,
-                                           ()-> addTestDatasetByFile(server, 
"config-ds-bad-name-2.ttl"));
-        });
-    }
-
-    @Test public void add_dataset_error_3() {
-        withServerFileEnabled(server -> {
-            HttpTest.execWithHttpException(HttpSC.BAD_REQUEST_400,
-                                           ()-> addTestDatasetByFile(server, 
"config-ds-bad-name-3.ttl"));
-        });
-    }
-
-    @Test public void add_dataset_error_4() {
-        withServerFileEnabled(server -> {
-            HttpTest.execWithHttpException(HttpSC.BAD_REQUEST_400,
-                                           ()-> addTestDatasetByFile(server, 
"config-ds-bad-name-4.ttl"));
-        });
-    }
-
-    @Test public void add_dataset_error_5() {
-        withServerFileEnabled(server -> {
-            HttpTest.execWithHttpException(HttpSC.BAD_REQUEST_400,
-                                           ()-> 
addTestDatasetBodyPublisher(server, BodyPublishers.noBody()));
-        });
-    }
-
-    @Test public void add_dataset_error_6() {
-        withServerFileEnabled(server -> {
-            HttpTest.execWithHttpException(HttpSC.BAD_REQUEST_400,
-                                           ()-> 
addTestDatasetBodyPublisher(server, BodyPublishers.ofString("")));
-        });
-    }
-
-    @Test public void add_dataset_error_7() {
-        withServerFileEnabled(server -> {
-            String level = LogCtl.getLevel(Fuseki.adminLog);
-            LogCtl.setLevel(Fuseki.adminLog, "FATAL");
-            HttpTest.execWithHttpException(HttpSC.BAD_REQUEST_400,
-                                           ()-> 
addTestDatasetBodyPublisher(server, BodyPublishers.ofString("JUNK")));
-            LogCtl.setLevel(Fuseki.adminLog, level);
-        });
-    }
-
-    @Test public void add_dataset_error_8() {
-        withServerFileEnabled(server -> {
-            String level = LogCtl.getLevel(Fuseki.adminLog);
-            LogCtl.setLevel(Fuseki.adminLog, "FATAL");
-            HttpTest.execWithHttpException(HttpSC.BAD_REQUEST_400,
-                                           ()-> addTestDatasetTDB2(server, 
dsTestTdb2c));
-            LogCtl.setLevel(Fuseki.adminLog, level);
-        });
-    }
-
-    @Test public void delete_dataset_1() {
-        withServerFileEnabled(server -> {
-            String name = "NoSuchDataset";
-            HttpTest.expect404( ()-> 
httpDelete(server.serverURL()+"$/"+opDatasets+"/"+name) );
-        });
-    }
-
-    // ---- Backup
-
-    private void assumeNotWindows() {
-        assumeFalse(SystemUtils.IS_OS_WINDOWS, "Test may be unstable on 
Windows due to inability to delete memory-mapped files");
-    }
-
-    private void deleteDataset(FusekiServer server, String name) {
-        httpDelete(server.serverURL()+"$/"+opDatasets+"/"+name);
-    }
-
-    private void addTestDatasetWithName(FusekiServer server, String dsName) {
-        addTestDatasetWithName(server, dsName, "mem");
-    }
-
-    private void addTestDatasetWithName(FusekiServer server, String dsName, 
String dbType) {
-        String URL = 
server.serverURL()+"$/"+opDatasets+"?dbName="+dsName+"&dbType="+dbType;
-        String ct = WebContent.contentTypeTurtle;
-        httpPost(URL);
-    }
-
-    private void addTestDatasetTDB2(FusekiServer server, String DBname) {
-        Objects.nonNull(DBname);
-        switch(DBname) {
-            case dsTestTdb2a-> addTestDatasetByFile(server, 
"config-tdb2a.ttl");
-            case dsTestTdb2b-> addTestDatasetByFile(server, 
"config-tdb2b.ttl");
-            case dsTestTdb2c-> addTestDatasetByFile(server, 
"config-tdb2c.ttl");
-            default->throw new IllegalArgumentException("No configuration for 
"+DBname);
-        }
-    }
-
-    private void addTestDatasetByFile(FusekiServer server, String filename) {
-        try {
-            Path f = Path.of(fileBase+filename);
-            BodyPublisher body = BodyPublishers.ofFile(f);
-            addTestDatasetBodyPublisher(server, body);
-        } catch (FileNotFoundException e) {
-            IO.exception(e);
-        }
-    }
-
-    private void addTestDatasetBodyPublisher(FusekiServer server, 
BodyPublisher body) {
-        String ct = WebContent.contentTypeTurtle;
-        httpPost(server.serverURL()+"$/"+opDatasets, ct, body);
-    }
-
-    private void askPing(FusekiServer server, String name) {
-        if ( name.startsWith("/") )
-            name = name.substring(1);
-        try ( TypedInputStream in = 
httpGet(server.serverURL()+name+"/sparql?query=ASK%7B%7D") ) {
-            IO.skipToEnd(in);
-        }
-    }
-
-    private void adminPing(FusekiServer server, String name) {
-        try ( TypedInputStream in = 
httpGet(server.serverURL()+"$/"+opDatasets+"/"+name) ) {
-            IO.skipToEnd(in);
-        }
-    }
-
-    private void checkExists(FusekiServer server, String name)  {
-        adminPing(server, name);
-        askPing(server, name);
-    }
-
-    private void checkNotThere(FusekiServer server, String name) {
-        String n = (name.startsWith("/")) ? name.substring(1) : name;
-        // Check gone exists.
-        HttpTest.expect404(()->  adminPing(server, n));
-        HttpTest.expect404(() -> askPing(server, n));
-    }
-}
diff --git 
a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-1.ttl 
b/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-1.ttl
deleted file mode 100644
index 05640fd0cf..0000000000
--- a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-1.ttl
+++ /dev/null
@@ -1,15 +0,0 @@
-@prefix :        <#> .
-@prefix fuseki:  <http://jena.apache.org/fuseki#> .
-@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-
-@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
-
-<#service1> rdf:type fuseki:Service ;
-    # URI of the dataset -- http://host:port/ds
-    fuseki:name                        "" ; 
-    fuseki:serviceQuery                "sparql" ;
-    fuseki:dataset                     <#emptyDataset> ;
-    .
-
-<#emptyDataset> rdf:type ja:RDFDataset .
diff --git 
a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-2.ttl 
b/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-2.ttl
deleted file mode 100644
index 27df06bcb4..0000000000
--- a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-2.ttl
+++ /dev/null
@@ -1,15 +0,0 @@
-@prefix :        <#> .
-@prefix fuseki:  <http://jena.apache.org/fuseki#> .
-@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-
-@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
-
-<#service1> rdf:type fuseki:Service ;
-    # URI of the dataset -- http://host:port/ds
-    fuseki:name                        "    " ; 
-    fuseki:serviceQuery                "sparql" ;
-    fuseki:dataset                     <#emptyDataset> ;
-    .
-
-<#emptyDataset> rdf:type ja:RDFDataset .
diff --git 
a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-3.ttl 
b/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-3.ttl
deleted file mode 100644
index 19caef108b..0000000000
--- a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-3.ttl
+++ /dev/null
@@ -1,15 +0,0 @@
-@prefix :        <#> .
-@prefix fuseki:  <http://jena.apache.org/fuseki#> .
-@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-
-@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
-
-<#service1> rdf:type fuseki:Service ;
-    # URI of the dataset -- http://host:port/ds
-    fuseki:name                        "ABC   DEF" ; 
-    fuseki:serviceQuery                "sparql" ;
-    fuseki:dataset                     <#emptyDataset> ;
-    .
-
-<#emptyDataset> rdf:type ja:RDFDataset .
diff --git 
a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-4.ttl 
b/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-4.ttl
deleted file mode 100644
index f57840e418..0000000000
--- a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-bad-name-4.ttl
+++ /dev/null
@@ -1,15 +0,0 @@
-@prefix :        <#> .
-@prefix fuseki:  <http://jena.apache.org/fuseki#> .
-@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-
-@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
-
-<#service1> rdf:type fuseki:Service ;
-    # URI of the dataset -- http://host:port/ds
-    fuseki:name                        "/ABC DEF  " ; 
-    fuseki:serviceQuery                "sparql" ;
-    fuseki:dataset                     <#emptyDataset> ;
-    .
-
-<#emptyDataset> rdf:type ja:RDFDataset .
diff --git a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-inf.ttl 
b/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-inf.ttl
deleted file mode 100644
index b75cf18ce3..0000000000
--- a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-inf.ttl
+++ /dev/null
@@ -1,30 +0,0 @@
-PREFIX :        <#>
-PREFIX fuseki:  <http://jena.apache.org/fuseki#>
-PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-
-PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
-PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
-PREFIX tdb2:    <http://jena.apache.org/2016/tdb#>
-
-<#service2> rdf:type fuseki:Service ;
-    fuseki:name                        "test-ds4" ; 
-    fuseki:serviceQuery                "sparql" ;
-    fuseki:dataset                     <#infDataset> ;
-    .
-    
-<#infDataset> rdf:type      ja:RDFDataset ;
-     ja:defaultGraph <#infGraph> ;
-     . 
-
-<#infGraph> a ja:InfModel;
-    ja:reasoner [ja:reasonerURL 
<http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>] ;
-    ja:baseModel <#tdb_graph> ;
-  .
-
-<#tdb_graph> rdf:type tdb2:GraphTDB ;
-    tdb2:dataset <#tdb_dataset> ;
-    .
-
-<#tdb_dataset> rdf:type tdb2:DatasetTDB ;
-    tdb2:location "--mem--" ;
-    .
diff --git a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-plain-1.ttl 
b/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-plain-1.ttl
deleted file mode 100644
index f993f350fd..0000000000
--- a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-plain-1.ttl
+++ /dev/null
@@ -1,17 +0,0 @@
-## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
-
-PREFIX :        <#>
-PREFIX fuseki:  <http://jena.apache.org/fuseki#>
-PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-
-PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
-PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
-
-<#service1> #rdf:type fuseki:Service ;
-    # URI of the dataset -- http://host:port/ds
-    fuseki:name                        "test-ds1" ; 
-    fuseki:serviceQuery                "sparql" ;
-    fuseki:dataset                     <#emptyDataset> ;
-    .
-
-<#emptyDataset> rdf:type ja:RDFDataset .
diff --git a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-plain-2.ttl 
b/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-plain-2.ttl
deleted file mode 100644
index d4b3fc9022..0000000000
--- a/jena-fuseki2/jena-fuseki-main/testing/Config/config-ds-plain-2.ttl
+++ /dev/null
@@ -1,18 +0,0 @@
-## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
-
-PREFIX :        <#>
-PREFIX fuseki:  <http://jena.apache.org/fuseki#>
-PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
-PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
-
-<#service1> rdf:type fuseki:Service ;
-    fuseki:name                       "test-ds2" ; 
-    fuseki:endpoint [
-        fuseki:operation fuseki:query ; 
-        fuseki:name "sparql"
-    ] ;
-    fuseki:dataset                    <#emptyDataset> ;
-    .
-
-<#emptyDataset> rdf:type ja:MemoryDataset .
diff --git a/jena-fuseki2/jena-fuseki-main/testing/Config/config-tdb2a.ttl 
b/jena-fuseki2/jena-fuseki-main/testing/Config/config-tdb2a.ttl
deleted file mode 100644
index 6ad26b9835..0000000000
--- a/jena-fuseki2/jena-fuseki-main/testing/Config/config-tdb2a.ttl
+++ /dev/null
@@ -1,18 +0,0 @@
-## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
-
-PREFIX :        <#>
-PREFIX fuseki:  <http://jena.apache.org/fuseki#>
-PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-
-PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
-PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
-PREFIX tdb2:    <http://jena.apache.org/2016/tdb#>
-
-<#service1> rdf:type fuseki:Service ;
-    fuseki:name           "test-tdb2a" ; 
-    fuseki:endpoint       [ fuseki:name "sparql" ;
-                            fuseki:operation fuseki:query ] ;
-    fuseki:dataset        <#dataset> .
-
-<#dataset> rdf:type      tdb2:DatasetTDB2 ;
-    tdb2:location "target/tdb2a" .
diff --git a/jena-fuseki2/jena-fuseki-main/testing/Config/config-tdb2b.ttl 
b/jena-fuseki2/jena-fuseki-main/testing/Config/config-tdb2b.ttl
deleted file mode 100644
index 56a8a9a0d3..0000000000
--- a/jena-fuseki2/jena-fuseki-main/testing/Config/config-tdb2b.ttl
+++ /dev/null
@@ -1,18 +0,0 @@
-## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
-
-PREFIX :        <#>
-PREFIX fuseki:  <http://jena.apache.org/fuseki#>
-PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-
-PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
-PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
-PREFIX tdb2:    <http://jena.apache.org/2016/tdb#>
-
-<#service1> rdf:type fuseki:Service ;
-    fuseki:name           "test-tdb2b" ; 
-    fuseki:endpoint       [ fuseki:name "sparql" ;
-                            fuseki:operation fuseki:query ] ;
-    fuseki:dataset        <#dataset> .
-
-<#dataset> rdf:type      tdb2:DatasetTDB2 ;
-    tdb2:location "--mem--" .
diff --git a/jena-fuseki2/jena-fuseki-main/testing/Config/config-tdb2c.ttl 
b/jena-fuseki2/jena-fuseki-main/testing/Config/config-tdb2c.ttl
deleted file mode 100644
index 359edd43de..0000000000
--- a/jena-fuseki2/jena-fuseki-main/testing/Config/config-tdb2c.ttl
+++ /dev/null
@@ -1,19 +0,0 @@
-## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
-
-PREFIX :        <#>
-PREFIX fuseki:  <http://jena.apache.org/fuseki#>
-PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-
-PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
-PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
-PREFIX tdb2:    <http://jena.apache.org/2016/tdb#>
-
-<#service1> rdf:type fuseki:Service ;
-    fuseki:name           "test-tdb2b" ; 
-    fuseki:endpoint       [ fuseki:name "sparql" ;
-                            fuseki:operation fuseki:query ] ;
-    fuseki:dataset        <#dataset> .
-
-<#dataset> rdf:type      tdb2:DatasetTDB2 ;
-    # Bad.
-    tdb2:location "../tdb2c" .

Reply via email to