Skip to content

Commit

Permalink
rename owl-shacl-fuseki to owl-shacl
Browse files Browse the repository at this point in the history
  • Loading branch information
melaasar committed Nov 11, 2024
1 parent 29ad2c8 commit e9d7d64
Show file tree
Hide file tree
Showing 19 changed files with 47 additions and 48 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
subprojects {
group = 'io.opencaesar.owl'
version = '2.13.0'
version = '2.14.0'

ext.versions = [
owl: '5.1.17',
Expand Down
7 changes: 0 additions & 7 deletions owl-shacl-fuseki-gradle/build.gradle

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>owl-shacl-fuseki-gradle</name>
<comment>Project owl-shacl-fuseki-gradle created by Buildship.</comment>
<name>owl-shacl-gradle</name>
<comment>Project owl-shacl-gradle created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
Expand Down
7 changes: 7 additions & 0 deletions owl-shacl-gradle/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ext.title = 'OWL SHACL Gradle'
description = 'A gradle task to run shacl rules'

dependencies {
implementation gradleApi()
implementation project (':owl-shacl')
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.opencaesar.owl.shacl.fuseki;
package io.opencaesar.owl.shacl;

import java.io.File;
import java.io.IOException;
Expand All @@ -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
*/
Expand Down Expand Up @@ -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<File> outputFiles = new ArrayList<>();
if (getQueryPath().get().isFile()) {
outputFiles.add(replacePathAndExtension(getQueryPath().get(), getResultPath().get(), extension));
Expand Down Expand Up @@ -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);
}
Expand Down
File renamed without changes.
17 changes: 8 additions & 9 deletions owl-shacl-fuseki/.project → owl-shacl/.project
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>owl-shacl-fuseki</name>
<comment>A tool to execute a set of SHACL queries on a given Fuseki+SHACL dataset</comment>
<projects/>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<name>owl-shacl</name>
<comment>A tool to execute a set of SHACL rules on a given dataset</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments/>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments/>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
Expand Down
14 changes: 7 additions & 7 deletions owl-shacl-fuseki/README.md → owl-shacl/README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions owl-shacl-fuseki/build.gradle → owl-shacl/build.gradle
Original file line number Diff line number Diff line change
@@ -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}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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" },
Expand Down Expand Up @@ -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) {
Expand All @@ -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 {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit e9d7d64

Please sign in to comment.