From e9d7d646ae5a4b0311c4a68cacf210ad8c373804 Mon Sep 17 00:00:00 2001 From: Maged Elaasar Date: Mon, 11 Nov 2024 13:30:29 -0800 Subject: [PATCH] rename owl-shacl-fuseki to owl-shacl --- build.gradle | 2 +- owl-shacl-fuseki-gradle/build.gradle | 7 ------- .../.classpath | 0 .../.project | 4 ++-- .../.settings/org.eclipse.buildship.core.prefs | 0 .../.settings/org.eclipse.core.resources.prefs | 0 .../.settings/org.eclipse.jdt.core.prefs | 0 owl-shacl-gradle/build.gradle | 7 +++++++ .../io/opencaesar/owl/shacl/OwlShaclTask.java | 16 ++++++++-------- {owl-shacl-fuseki => owl-shacl}/.classpath | 0 {owl-shacl-fuseki => owl-shacl}/.project | 17 ++++++++--------- .../.settings/org.eclipse.buildship.core.prefs | 0 .../.settings/org.eclipse.core.resources.prefs | 0 .../.settings/org.eclipse.jdt.core.prefs | 0 {owl-shacl-fuseki => owl-shacl}/README.md | 14 +++++++------- {owl-shacl-fuseki => owl-shacl}/build.gradle | 8 ++++---- .../io/opencaesar/owl/shacl/OwlShaclApp.java | 16 ++++++++-------- .../src/main/resources/log4j.xml | 0 settings.gradle | 4 ++-- 19 files changed, 47 insertions(+), 48 deletions(-) delete mode 100755 owl-shacl-fuseki-gradle/build.gradle rename {owl-shacl-fuseki-gradle => owl-shacl-gradle}/.classpath (100%) rename {owl-shacl-fuseki-gradle => owl-shacl-gradle}/.project (82%) rename {owl-shacl-fuseki-gradle => owl-shacl-gradle}/.settings/org.eclipse.buildship.core.prefs (100%) rename {owl-shacl-fuseki-gradle => owl-shacl-gradle}/.settings/org.eclipse.core.resources.prefs (100%) rename {owl-shacl-fuseki-gradle => owl-shacl-gradle}/.settings/org.eclipse.jdt.core.prefs (100%) create mode 100755 owl-shacl-gradle/build.gradle rename owl-shacl-fuseki-gradle/src/main/java/io/opencaesar/owl/shacl/fuseki/OwlShaclFusekiTask.java => owl-shacl-gradle/src/main/java/io/opencaesar/owl/shacl/OwlShaclTask.java (90%) rename {owl-shacl-fuseki => owl-shacl}/.classpath (100%) rename {owl-shacl-fuseki => owl-shacl}/.project (58%) rename {owl-shacl-fuseki => owl-shacl}/.settings/org.eclipse.buildship.core.prefs (100%) rename {owl-shacl-fuseki => owl-shacl}/.settings/org.eclipse.core.resources.prefs (100%) rename {owl-shacl-fuseki => owl-shacl}/.settings/org.eclipse.jdt.core.prefs (100%) rename {owl-shacl-fuseki => owl-shacl}/README.md (73%) rename {owl-shacl-fuseki => owl-shacl}/build.gradle (60%) rename owl-shacl-fuseki/src/main/java/io/opencaesar/owl/shacl/fuseki/OwlShaclFusekiApp.java => owl-shacl/src/main/java/io/opencaesar/owl/shacl/OwlShaclApp.java (96%) rename {owl-shacl-fuseki => owl-shacl}/src/main/resources/log4j.xml (100%) diff --git a/build.gradle b/build.gradle index e266b7fc..e82a6274 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ subprojects { group = 'io.opencaesar.owl' - version = '2.13.0' + version = '2.14.0' ext.versions = [ owl: '5.1.17', diff --git a/owl-shacl-fuseki-gradle/build.gradle b/owl-shacl-fuseki-gradle/build.gradle deleted file mode 100755 index e7bc0290..00000000 --- a/owl-shacl-fuseki-gradle/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -ext.title = 'OWL SHACL Fuseki Gradle' -description = 'A gradle task to invoke owl shacl fuseki' - -dependencies { - implementation gradleApi() - implementation project (':owl-shacl-fuseki') -} diff --git a/owl-shacl-fuseki-gradle/.classpath b/owl-shacl-gradle/.classpath similarity index 100% rename from owl-shacl-fuseki-gradle/.classpath rename to owl-shacl-gradle/.classpath diff --git a/owl-shacl-fuseki-gradle/.project b/owl-shacl-gradle/.project similarity index 82% rename from owl-shacl-fuseki-gradle/.project rename to owl-shacl-gradle/.project index bbdd92fe..4e232c58 100644 --- a/owl-shacl-fuseki-gradle/.project +++ b/owl-shacl-gradle/.project @@ -1,7 +1,7 @@ - owl-shacl-fuseki-gradle - Project owl-shacl-fuseki-gradle created by Buildship. + owl-shacl-gradle + Project owl-shacl-gradle created by Buildship. diff --git a/owl-shacl-fuseki-gradle/.settings/org.eclipse.buildship.core.prefs b/owl-shacl-gradle/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from owl-shacl-fuseki-gradle/.settings/org.eclipse.buildship.core.prefs rename to owl-shacl-gradle/.settings/org.eclipse.buildship.core.prefs diff --git a/owl-shacl-fuseki-gradle/.settings/org.eclipse.core.resources.prefs b/owl-shacl-gradle/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from owl-shacl-fuseki-gradle/.settings/org.eclipse.core.resources.prefs rename to owl-shacl-gradle/.settings/org.eclipse.core.resources.prefs diff --git a/owl-shacl-fuseki-gradle/.settings/org.eclipse.jdt.core.prefs b/owl-shacl-gradle/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from owl-shacl-fuseki-gradle/.settings/org.eclipse.jdt.core.prefs rename to owl-shacl-gradle/.settings/org.eclipse.jdt.core.prefs diff --git a/owl-shacl-gradle/build.gradle b/owl-shacl-gradle/build.gradle new file mode 100755 index 00000000..4a9ad319 --- /dev/null +++ b/owl-shacl-gradle/build.gradle @@ -0,0 +1,7 @@ +ext.title = 'OWL SHACL Gradle' +description = 'A gradle task to run shacl rules' + +dependencies { + implementation gradleApi() + implementation project (':owl-shacl') +} diff --git a/owl-shacl-fuseki-gradle/src/main/java/io/opencaesar/owl/shacl/fuseki/OwlShaclFusekiTask.java b/owl-shacl-gradle/src/main/java/io/opencaesar/owl/shacl/OwlShaclTask.java similarity index 90% rename from owl-shacl-fuseki-gradle/src/main/java/io/opencaesar/owl/shacl/fuseki/OwlShaclFusekiTask.java rename to owl-shacl-gradle/src/main/java/io/opencaesar/owl/shacl/OwlShaclTask.java index 856a86ab..fd4becf1 100644 --- a/owl-shacl-fuseki-gradle/src/main/java/io/opencaesar/owl/shacl/fuseki/OwlShaclFusekiTask.java +++ b/owl-shacl-gradle/src/main/java/io/opencaesar/owl/shacl/OwlShaclTask.java @@ -1,4 +1,4 @@ -package io.opencaesar.owl.shacl.fuseki; +package io.opencaesar.owl.shacl; import java.io.File; import java.io.IOException; @@ -20,18 +20,18 @@ import org.gradle.work.Incremental; /** - * Gradle task for querying a fuseki endpoint using *.shacl queries. + * Gradle task for running SHACLE rules on a dataset */ -public abstract class OwlShaclFusekiTask extends DefaultTask { +public abstract class OwlShaclTask extends DefaultTask { /** - * Creates a new OwlShaclFusekiTask object + * Creates a new OwlShaclTask object */ - public OwlShaclFusekiTask() { + public OwlShaclTask() { } /** - * The required gradle task input Fuseki endpoint URL. + * The required gradle task input endpoint URL. * * @return String Property */ @@ -97,7 +97,7 @@ protected ConfigurableFileCollection getInputFiles() throws IOException { @SuppressWarnings("deprecation") protected ConfigurableFileCollection getOutputFiles() throws IOException { if (getQueryPath().isPresent() && getResultPath().isPresent()) { - String extension = OwlShaclFusekiApp.OUTPUT_FORMAT; + String extension = OwlShaclApp.OUTPUT_FORMAT; final List outputFiles = new ArrayList<>(); if (getQueryPath().get().isFile()) { outputFiles.add(replacePathAndExtension(getQueryPath().get(), getResultPath().get(), extension)); @@ -140,7 +140,7 @@ public void run() { args.add("-d"); } try { - OwlShaclFusekiApp.main(args.toArray(new String[0])); + OwlShaclApp.main(args.toArray(new String[0])); } catch (Exception e) { throw new GradleException(e.getLocalizedMessage(), e); } diff --git a/owl-shacl-fuseki/.classpath b/owl-shacl/.classpath similarity index 100% rename from owl-shacl-fuseki/.classpath rename to owl-shacl/.classpath diff --git a/owl-shacl-fuseki/.project b/owl-shacl/.project similarity index 58% rename from owl-shacl-fuseki/.project rename to owl-shacl/.project index 8f34807f..d66c9650 100644 --- a/owl-shacl-fuseki/.project +++ b/owl-shacl/.project @@ -1,20 +1,19 @@ - owl-shacl-fuseki - A tool to execute a set of SHACL queries on a given Fuseki+SHACL dataset - - - org.eclipse.jdt.core.javanature - org.eclipse.buildship.core.gradleprojectnature - + owl-shacl + A tool to execute a set of SHACL rules on a given dataset + + org.eclipse.jdt.core.javabuilder - + + org.eclipse.buildship.core.gradleprojectbuilder - + + diff --git a/owl-shacl-fuseki/.settings/org.eclipse.buildship.core.prefs b/owl-shacl/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from owl-shacl-fuseki/.settings/org.eclipse.buildship.core.prefs rename to owl-shacl/.settings/org.eclipse.buildship.core.prefs diff --git a/owl-shacl-fuseki/.settings/org.eclipse.core.resources.prefs b/owl-shacl/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from owl-shacl-fuseki/.settings/org.eclipse.core.resources.prefs rename to owl-shacl/.settings/org.eclipse.core.resources.prefs diff --git a/owl-shacl-fuseki/.settings/org.eclipse.jdt.core.prefs b/owl-shacl/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from owl-shacl-fuseki/.settings/org.eclipse.jdt.core.prefs rename to owl-shacl/.settings/org.eclipse.jdt.core.prefs diff --git a/owl-shacl-fuseki/README.md b/owl-shacl/README.md similarity index 73% rename from owl-shacl-fuseki/README.md rename to owl-shacl/README.md index d25b8be5..aaa3c926 100644 --- a/owl-shacl-fuseki/README.md +++ b/owl-shacl/README.md @@ -1,22 +1,22 @@ -# OWL Shacl Fuseki +# OWL Shacl [![Release](https://img.shields.io/github/v/tag/opencaesar/owl-tools?label=release)](https://github.com/opencaesar/owl-tools/releases/latest) -A tool to execute a SHACL query on a given Fuseki+SHACL endpoint. +A tool to execute SHACL rules on a given dataset. ## Run as CLI MacOS/Linux: ``` -./gradlew owl-shacl-fuseki:run --args="..." +./gradlew owl-shacl:run --args="..." ``` Windows: ``` -gradlew.bat owl-shacl-fuseki:run --args="..." +gradlew.bat owl-shacl:run --args="..." ``` Args: ``` --e | --endpoint-url http://fusekiURL/databaseName [Required] +-e | --endpoint-url http://URL/databaseName [Required] -s | --shacl-service shacl [Optional, default is 'shacl') -q | --query-path path/to/queries.shacl [Required] (Accepts either a .shacl file or a directory that will be searched for .shacl files) @@ -35,10 +35,10 @@ buildscript { mavenCentral() } dependencies { - classpath 'io.opencaesar.owl:owl-shacl-fuseki-gradle:+' + classpath 'io.opencaesar.owl:owl-shacl-gradle:+' } } -task owlShaclFuseki(type:io.opencaesar.owl.query.OwlShaclFusekiTask) { +task owlShacl(type:io.opencaesar.owl.query.OwlShaclßTask) { endpointURL = 'url-of-sparql-endpoint' [Required] shaclService = 'shacl' [Optional, default='shacl'] queryPath = file('path/to/queries.shacl') [Required, path to file or folder] diff --git a/owl-shacl-fuseki/build.gradle b/owl-shacl/build.gradle similarity index 60% rename from owl-shacl-fuseki/build.gradle rename to owl-shacl/build.gradle index cb08844e..aa50aa9a 100644 --- a/owl-shacl-fuseki/build.gradle +++ b/owl-shacl/build.gradle @@ -1,9 +1,9 @@ apply plugin: 'application' -ext.title = 'OWL SHACL Fuseki' -description = 'A tool to execute a set of SHACL queries on a given Fuseki+SHACL dataset' -mainClassName = 'io.opencaesar.owl.query.OwlShaclFusekiApp' -applicationName = 'owl-shacl-fuseki' +ext.title = 'OWL SHACL' +description = 'A tool to execute a set of SHACL rules on a given dataset' +mainClassName = 'io.opencaesar.owl.query.OwlShaclApp' +applicationName = 'owl-shacl' dependencies { implementation "com.beust:jcommander:${versions.jcommander}" diff --git a/owl-shacl-fuseki/src/main/java/io/opencaesar/owl/shacl/fuseki/OwlShaclFusekiApp.java b/owl-shacl/src/main/java/io/opencaesar/owl/shacl/OwlShaclApp.java similarity index 96% rename from owl-shacl-fuseki/src/main/java/io/opencaesar/owl/shacl/fuseki/OwlShaclFusekiApp.java rename to owl-shacl/src/main/java/io/opencaesar/owl/shacl/OwlShaclApp.java index 35bbfc39..6fc0e4d4 100644 --- a/owl-shacl-fuseki/src/main/java/io/opencaesar/owl/shacl/fuseki/OwlShaclFusekiApp.java +++ b/owl-shacl/src/main/java/io/opencaesar/owl/shacl/OwlShaclApp.java @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package io.opencaesar.owl.shacl.fuseki; +package io.opencaesar.owl.shacl; import java.io.File; import java.io.FileInputStream; @@ -51,9 +51,9 @@ import com.github.jsonldjava.shaded.com.google.common.base.Suppliers; /** - * Utility for querying a Fuseki server using SHACL queries. + * Utility for validating a dataset in a triple store */ -public class OwlShaclFusekiApp { +public class OwlShaclApp { @Parameter( names = { "--endpoint-url", "-e" }, @@ -105,18 +105,18 @@ public class OwlShaclFusekiApp { public static String OUTPUT_FORMAT = "ttl"; - private final Logger LOGGER = Logger.getLogger(OwlShaclFusekiApp.class); + private final Logger LOGGER = Logger.getLogger(OwlShaclApp.class); static { DOMConfigurator.configure(ClassLoader.getSystemClassLoader().getResource("log4j.xml")); } /** - * Application for querying a Fuseki server. + * Application for querying a server. * @param args Application arguments. * @throws Exception Error */ public static void main(final String... args) throws Exception { - final OwlShaclFusekiApp app = new OwlShaclFusekiApp(); + final OwlShaclApp app = new OwlShaclApp(); final JCommander builder = JCommander.newBuilder().addObject(app).build(); builder.parse(args); if (app.help) { @@ -131,9 +131,9 @@ public static void main(final String... args) throws Exception { } /** - * Creates a new OwlShaclFusekiApp object + * Creates a new OwlShaclApp object */ - public OwlShaclFusekiApp() { + public OwlShaclApp() { } private void run() throws Exception { diff --git a/owl-shacl-fuseki/src/main/resources/log4j.xml b/owl-shacl/src/main/resources/log4j.xml similarity index 100% rename from owl-shacl-fuseki/src/main/resources/log4j.xml rename to owl-shacl/src/main/resources/log4j.xml diff --git a/settings.gradle b/settings.gradle index a51011a2..d8314bbc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -12,7 +12,7 @@ include 'owl-reason' include 'owl-reason-gradle' include 'owl-save' include 'owl-save-gradle' -include 'owl-shacl-fuseki' -include 'owl-shacl-fuseki-gradle' +include 'owl-shacl' +include 'owl-shacl-gradle' include 'owl-tdb' include 'owl-tdb-gradle'