From 74f9eb75cf17976621ed0b4958bd2bc0d578c62c Mon Sep 17 00:00:00 2001 From: Jens Pots Date: Tue, 28 May 2024 21:16:33 +0200 Subject: [PATCH] feat: overhauled ontology imports --- build.gradle.kts | 3 ++ src/main/kotlin/parser/Parser.kt | 30 +++++++++++----- src/main/kotlin/runner/ProcessorDefinition.kt | 34 +++++++++++++++++++ src/main/kotlin/std/FileReader.kt | 2 ++ src/main/kotlin/std/FileWriter.kt | 2 ++ src/main/kotlin/std/HttpFetch.kt | 2 ++ src/main/kotlin/std/RDFValidator.kt | 2 ++ src/main/kotlin/{logging => util}/Log.kt | 0 src/main/kotlin/util/Reflect.kt | 19 +++++++++++ src/main/resources/pipeline.ttl | 20 ++--------- src/main/resources/queries/processors.sparql | 34 ------------------- src/main/resources/std/file_reader.ttl | 6 +--- src/main/resources/std/file_writer.ttl | 6 +--- src/main/resources/std/http_fetch.ttl | 6 +--- src/main/resources/std/rdf_validator.ttl | 6 +--- .../sources => java/processors}/Filter.java | 4 +++ .../sources => java/processors}/Literals.java | 4 +++ .../processors}/Optionals.java | 4 +++ .../sources => java/processors}/Range.java | 4 +++ .../sources => java/processors}/Reporter.java | 4 +++ .../sources => java/processors}/Square.java | 4 +++ .../sources => kotlin/processors}/Negator.kt | 4 +++ src/test/kotlin/std/RDFValidatorTest.kt | 4 +-- src/test/resources/pipelines/filter.ttl | 5 --- src/test/resources/pipelines/literals.ttl | 5 --- .../resources/pipelines/negative_range.ttl | 7 ---- src/test/resources/pipelines/optionals.ttl | 5 --- .../resources/pipelines/range_reporter.ttl | 7 ---- src/test/resources/processors/filter.ttl | 4 +-- src/test/resources/processors/literals.ttl | 4 +-- src/test/resources/processors/negator.ttl | 4 +-- src/test/resources/processors/optionals.ttl | 4 +-- src/test/resources/processors/range.ttl | 4 +-- src/test/resources/processors/reporter.ttl | 4 +-- src/test/resources/processors/square.ttl | 4 +-- 35 files changed, 128 insertions(+), 133 deletions(-) create mode 100644 src/main/kotlin/runner/ProcessorDefinition.kt rename src/main/kotlin/{logging => util}/Log.kt (100%) create mode 100644 src/main/kotlin/util/Reflect.kt delete mode 100644 src/main/resources/queries/processors.sparql rename src/test/{resources/sources => java/processors}/Filter.java (88%) rename src/test/{resources/sources => java/processors}/Literals.java (87%) rename src/test/{resources/sources => java/processors}/Optionals.java (81%) rename src/test/{resources/sources => java/processors}/Range.java (85%) rename src/test/{resources/sources => java/processors}/Reporter.java (80%) rename src/test/{resources/sources => java/processors}/Square.java (87%) rename src/test/{resources/sources => kotlin/processors}/Negator.kt (85%) diff --git a/build.gradle.kts b/build.gradle.kts index d3f40c2..6af6b39 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -51,6 +51,9 @@ repositories { dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0") + // Reflections + implementation("org.reflections:reflections:0.10.2") + // Guava implementation("com.google.guava:guava:33.2.0-jre") diff --git a/src/main/kotlin/parser/Parser.kt b/src/main/kotlin/parser/Parser.kt index 73d4aa5..379957f 100644 --- a/src/main/kotlin/parser/Parser.kt +++ b/src/main/kotlin/parser/Parser.kt @@ -5,16 +5,22 @@ import kotlinx.coroutines.channels.Channel import org.apache.jena.rdf.model.RDFNode import technology.idlab.bridge.* import technology.idlab.extensions.* -import technology.idlab.extensions.loadIntoJVM import technology.idlab.extensions.query import technology.idlab.extensions.readModelRecursively -import technology.idlab.extensions.validate import technology.idlab.logging.Log import technology.idlab.runner.Processor +import technology.idlab.runner.ProcessorDefinition class Parser(file: File) { - /** An RDF model of the configuration file. */ - private val model = file.readModelRecursively().validate() + /** RDF model which imports the base pipeline ontology. */ + private val model = + this::class + .java + .getResource("/pipeline.ttl") + .let { it ?: Log.shared.fatal("Pipeline file not found") } + .toURI() + .let { File(it) } + .readModelRecursively() /** Class references to the different processors. */ private val processors: MutableMap> = mutableMapOf() @@ -33,14 +39,20 @@ class Parser(file: File) { /** Parse the model for processor declarations and save results as a field. */ init { - model.query("/queries/processors.sparql") { - val uri = it["processor"].toString() - val path = it["file"].toString().drop(7) - val sourceFile = File(path) - processors[uri] = sourceFile.loadIntoJVM() + ProcessorDefinition.scan().forEach { + // Save the processor class and URI to the map. + processors[it.uri] = it.clazz + + // Load the ontology file into the model. + model.read(it.ontology.inputStream(), null, "TTL") } } + /** Parse the pipeline. */ + init { + model.read(file.inputStream(), null, "TTL").validate() + } + /** Parse the shape for each processor. */ init { processors.forEach { processor -> diff --git a/src/main/kotlin/runner/ProcessorDefinition.kt b/src/main/kotlin/runner/ProcessorDefinition.kt new file mode 100644 index 0000000..f736b19 --- /dev/null +++ b/src/main/kotlin/runner/ProcessorDefinition.kt @@ -0,0 +1,34 @@ +package technology.idlab.runner + +import java.io.File +import technology.idlab.logging.Log +import technology.idlab.util.classesWithAnnotation + +@Target(AnnotationTarget.CLASS) +@Retention(AnnotationRetention.RUNTIME) +@MustBeDocumented +annotation class ProcessorDefinition(val resource: String) { + data class Config(val clazz: Class, val ontology: File, val uri: String) + + companion object { + fun scan(): List { + return classesWithAnnotation(ProcessorDefinition::class.java) + .map { + try { + it.asSubclass(Processor::class.java) + } catch (e: ClassCastException) { + Log.shared.fatal("Class $it is not a Processor") + } + } + .map { + val annotation = it.getAnnotation(ProcessorDefinition::class.java) + + val resource = + it.getResource(annotation.resource) + ?: Log.shared.fatal("Resource ${annotation.resource} not found") + + Config(it, File(resource.toURI()), "https://w3id.org/conn/jvm#${it.simpleName}") + } + } + } +} diff --git a/src/main/kotlin/std/FileReader.kt b/src/main/kotlin/std/FileReader.kt index 82172f3..7d1bc74 100644 --- a/src/main/kotlin/std/FileReader.kt +++ b/src/main/kotlin/std/FileReader.kt @@ -3,7 +3,9 @@ package technology.idlab.std import java.io.File import technology.idlab.bridge.Writer import technology.idlab.runner.Processor +import technology.idlab.runner.ProcessorDefinition +@ProcessorDefinition("/std/file_reader.ttl") class FileReader(args: Map) : Processor(args) { /** Arguments */ private val path: String = this.getArgument("path") diff --git a/src/main/kotlin/std/FileWriter.kt b/src/main/kotlin/std/FileWriter.kt index 41e6179..b875684 100644 --- a/src/main/kotlin/std/FileWriter.kt +++ b/src/main/kotlin/std/FileWriter.kt @@ -3,7 +3,9 @@ package technology.idlab.std import java.io.File import technology.idlab.bridge.Reader import technology.idlab.runner.Processor +import technology.idlab.runner.ProcessorDefinition +@ProcessorDefinition("/std/file_writer.ttl") class FileWriter(args: Map) : Processor(args) { /** Processor default values. */ private val overwriteDefault = true diff --git a/src/main/kotlin/std/HttpFetch.kt b/src/main/kotlin/std/HttpFetch.kt index 3110e92..219b7ed 100644 --- a/src/main/kotlin/std/HttpFetch.kt +++ b/src/main/kotlin/std/HttpFetch.kt @@ -9,7 +9,9 @@ import io.ktor.http.* import kotlinx.coroutines.runBlocking import technology.idlab.bridge.Writer import technology.idlab.runner.Processor +import technology.idlab.runner.ProcessorDefinition +@ProcessorDefinition("/std/http_fetch.ttl") class HttpFetch(args: Map) : Processor(args) { /** Meta configuration. */ private var engine: HttpClientEngine = CIO.create() diff --git a/src/main/kotlin/std/RDFValidator.kt b/src/main/kotlin/std/RDFValidator.kt index 21fee9d..2764849 100644 --- a/src/main/kotlin/std/RDFValidator.kt +++ b/src/main/kotlin/std/RDFValidator.kt @@ -11,7 +11,9 @@ import technology.idlab.bridge.Writer import technology.idlab.extensions.readModelRecursively import technology.idlab.logging.Log import technology.idlab.runner.Processor +import technology.idlab.runner.ProcessorDefinition +@ProcessorDefinition("/std/rdf_validator.ttl") class RDFValidator(args: Map) : Processor(args) { /** Default values. */ private val errorIsFatalDefault = false diff --git a/src/main/kotlin/logging/Log.kt b/src/main/kotlin/util/Log.kt similarity index 100% rename from src/main/kotlin/logging/Log.kt rename to src/main/kotlin/util/Log.kt diff --git a/src/main/kotlin/util/Reflect.kt b/src/main/kotlin/util/Reflect.kt new file mode 100644 index 0000000..aca96a0 --- /dev/null +++ b/src/main/kotlin/util/Reflect.kt @@ -0,0 +1,19 @@ +package technology.idlab.util + +import org.reflections.Reflections +import org.reflections.scanners.Scanners +import org.reflections.util.ConfigurationBuilder + +internal fun classesWithAnnotation(annotation: Class): Set> { + // Get a list of all classes with type annotations. + val config = + ConfigurationBuilder() + .forPackages("") // Root package, adjust if needed + .addScanners(Scanners.TypesAnnotated) + + // Initialize a Reflections client. + val reflections = Reflections(config) + + // Filter based on JVMRunnerProcessor + return reflections.getTypesAnnotatedWith(annotation) +} diff --git a/src/main/resources/pipeline.ttl b/src/main/resources/pipeline.ttl index e7001eb..2b2187f 100644 --- a/src/main/resources/pipeline.ttl +++ b/src/main/resources/pipeline.ttl @@ -5,28 +5,12 @@ @prefix rdfs: . @prefix owl: . -# Include the Standard Processor Library -<> owl:imports - <./std/file_reader.ttl>, - <./std/file_writer.ttl>, - <./std/http_fetch.ttl>, - <./std/rdf_validator.ttl>. - # Definition of a Processor. [] a sh:NodeShape; sh:targetClass jvm:Processor; - sh:property [ - sh:path jvm:file; - sh:minCount 1; - sh:maxCount 1; - ], [ - sh:path jvm:language; - sh:in( "Java" "Kotlin" ); - sh:datatype xsd:string; - sh:minCount 1; - sh:maxCount 1; - ]. + sh:closed true; + sh:ignoredProperties ( rdf:type ). # A bridge takes in a reader and writer. [] diff --git a/src/main/resources/queries/processors.sparql b/src/main/resources/queries/processors.sparql deleted file mode 100644 index 052bf1a..0000000 --- a/src/main/resources/queries/processors.sparql +++ /dev/null @@ -1,34 +0,0 @@ -PREFIX jvm: -PREFIX sh: -PREFIX fno: -PREFIX fnom: - -SELECT - ?processor - ?file - ?language - (group_concat(?min;separator=";") as ?mins) - (group_concat(?max;separator=";") as ?maxs) - (group_concat(?path;separator=";") as ?paths) - -WHERE { - ?processor - a jvm:Processor ; - jvm:file ?file ; - jvm:language ?language . - - ?shape - a sh:NodeShape ; - sh:targetClass ?processor ; - sh:property ?property . - - ?property sh:path ?path . - - OPTIONAL { ?property sh:minCount ?minCount. } - OPTIONAL { ?property sh:maxCount ?maxCount. } - - BIND(COALESCE(?minCount, "") AS ?min) - BIND(COALESCE(?maxCount, "") AS ?max) -} - -GROUP BY ?processor ?file ?language diff --git a/src/main/resources/std/file_reader.ttl b/src/main/resources/std/file_reader.ttl index f76755c..099f161 100644 --- a/src/main/resources/std/file_reader.ttl +++ b/src/main/resources/std/file_reader.ttl @@ -4,11 +4,7 @@ @prefix xsd: . @prefix rdf: . -<> owl:imports <../pipeline.ttl>. - -jvm:FileReader a jvm:Processor; - jvm:file <../../../classes/kotlin/main/technology/idlab/std/FileReader.class>; - jvm:language "Kotlin". +jvm:FileReader a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:FileReader; diff --git a/src/main/resources/std/file_writer.ttl b/src/main/resources/std/file_writer.ttl index b131db1..ddb91e2 100644 --- a/src/main/resources/std/file_writer.ttl +++ b/src/main/resources/std/file_writer.ttl @@ -4,11 +4,7 @@ @prefix xsd: . @prefix rdf: . -<> owl:imports <../pipeline.ttl>. - -jvm:FileWriter a jvm:Processor; - jvm:file <../../../classes/kotlin/main/technology/idlab/std/FileWriter.class>; - jvm:language "Kotlin". +jvm:FileWriter a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:FileWriter; diff --git a/src/main/resources/std/http_fetch.ttl b/src/main/resources/std/http_fetch.ttl index 92f0bea..0314f4b 100644 --- a/src/main/resources/std/http_fetch.ttl +++ b/src/main/resources/std/http_fetch.ttl @@ -4,11 +4,7 @@ @prefix xsd: . @prefix rdf: . -<> owl:imports <../pipeline.ttl>. - -jvm:HttpFetch a jvm:Processor; - jvm:file <../../../classes/kotlin/main/technology/idlab/std//HttpFetch.class>; - jvm:language "Kotlin". +jvm:HttpFetch a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:HttpFetch; diff --git a/src/main/resources/std/rdf_validator.ttl b/src/main/resources/std/rdf_validator.ttl index a38d096..686a5ea 100644 --- a/src/main/resources/std/rdf_validator.ttl +++ b/src/main/resources/std/rdf_validator.ttl @@ -4,11 +4,7 @@ @prefix xsd: . @prefix rdf: . -<> owl:imports <../pipeline.ttl>. - -jvm:RDFValidator a jvm:Processor; - jvm:file <../../../classes/kotlin/main/technology/idlab/std/RDFValidator.class>; - jvm:language "Kotlin". +jvm:RDFValidator a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:RDFValidator; diff --git a/src/test/resources/sources/Filter.java b/src/test/java/processors/Filter.java similarity index 88% rename from src/test/resources/sources/Filter.java rename to src/test/java/processors/Filter.java index 694f6cf..f29af52 100644 --- a/src/test/resources/sources/Filter.java +++ b/src/test/java/processors/Filter.java @@ -1,8 +1,12 @@ +package processors; + import java.util.List; import java.util.Map; import technology.idlab.bridge.*; import technology.idlab.runner.Processor; +import technology.idlab.runner.ProcessorDefinition; +@ProcessorDefinition(resource = "/processors/filter.ttl") public class Filter extends Processor { // Parameters private final List whitelist; diff --git a/src/test/resources/sources/Literals.java b/src/test/java/processors/Literals.java similarity index 87% rename from src/test/resources/sources/Literals.java rename to src/test/java/processors/Literals.java index 8714633..3ba3727 100644 --- a/src/test/resources/sources/Literals.java +++ b/src/test/java/processors/Literals.java @@ -1,8 +1,12 @@ +package processors; + import java.util.Date; import java.util.Map; import technology.idlab.bridge.*; import technology.idlab.runner.Processor; +import technology.idlab.runner.ProcessorDefinition; +@ProcessorDefinition(resource = "/processors/literals.ttl") public class Literals extends Processor { // Parameters private final boolean _bool; diff --git a/src/test/resources/sources/Optionals.java b/src/test/java/processors/Optionals.java similarity index 81% rename from src/test/resources/sources/Optionals.java rename to src/test/java/processors/Optionals.java index 50775b9..96b9465 100644 --- a/src/test/resources/sources/Optionals.java +++ b/src/test/java/processors/Optionals.java @@ -1,7 +1,11 @@ +package processors; + import java.util.Map; import java.util.Optional; import technology.idlab.runner.Processor; +import technology.idlab.runner.ProcessorDefinition; +@ProcessorDefinition(resource = "/processors/optionals.ttl") public class Optionals extends Processor { // Parameters public final String required; diff --git a/src/test/resources/sources/Range.java b/src/test/java/processors/Range.java similarity index 85% rename from src/test/resources/sources/Range.java rename to src/test/java/processors/Range.java index eb950e4..5ecc812 100644 --- a/src/test/resources/sources/Range.java +++ b/src/test/java/processors/Range.java @@ -1,7 +1,11 @@ +package processors; + import java.util.Map; import technology.idlab.bridge.Writer; import technology.idlab.runner.Processor; +import technology.idlab.runner.ProcessorDefinition; +@ProcessorDefinition(resource = "/processors/range.ttl") public class Range extends Processor { // Parameters private final int start; diff --git a/src/test/resources/sources/Reporter.java b/src/test/java/processors/Reporter.java similarity index 80% rename from src/test/resources/sources/Reporter.java rename to src/test/java/processors/Reporter.java index e2bd969..f9fe472 100644 --- a/src/test/resources/sources/Reporter.java +++ b/src/test/java/processors/Reporter.java @@ -1,7 +1,11 @@ +package processors; + import java.util.Map; import technology.idlab.bridge.Reader; import technology.idlab.runner.Processor; +import technology.idlab.runner.ProcessorDefinition; +@ProcessorDefinition(resource = "/processors/reporter.ttl") public class Reporter extends Processor { private final Reader reader; diff --git a/src/test/resources/sources/Square.java b/src/test/java/processors/Square.java similarity index 87% rename from src/test/resources/sources/Square.java rename to src/test/java/processors/Square.java index 23ccd3e..57f2028 100644 --- a/src/test/resources/sources/Square.java +++ b/src/test/java/processors/Square.java @@ -1,8 +1,12 @@ +package processors; + import java.util.Map; import technology.idlab.bridge.Reader; import technology.idlab.bridge.Writer; import technology.idlab.runner.Processor; +import technology.idlab.runner.ProcessorDefinition; +@ProcessorDefinition(resource = "/processors/square.ttl") public class Square extends Processor { // Channels private final Reader reader; diff --git a/src/test/resources/sources/Negator.kt b/src/test/kotlin/processors/Negator.kt similarity index 85% rename from src/test/resources/sources/Negator.kt rename to src/test/kotlin/processors/Negator.kt index 763f063..ee862c5 100644 --- a/src/test/resources/sources/Negator.kt +++ b/src/test/kotlin/processors/Negator.kt @@ -1,6 +1,10 @@ +package processors + import technology.idlab.bridge.* import technology.idlab.runner.Processor +import technology.idlab.runner.ProcessorDefinition +@ProcessorDefinition("/processors/negator.ttl") class Negator(args: Map) : Processor(args) { private val input: Reader = this.getArgument("input") private val output: Writer = this.getArgument("output") diff --git a/src/test/kotlin/std/RDFValidatorTest.kt b/src/test/kotlin/std/RDFValidatorTest.kt index 4bfc705..dc10cdd 100644 --- a/src/test/kotlin/std/RDFValidatorTest.kt +++ b/src/test/kotlin/std/RDFValidatorTest.kt @@ -15,7 +15,7 @@ import technology.idlab.std.RDFValidator /** Ontology location. */ private val ontology = - Thread.currentThread().contextClassLoader.getResource("pipeline.ttl")!!.let { File(it.file) } + File(Thread.currentThread().contextClassLoader.getResource("pipeline.ttl")!!.file) /** Textual representation of a valid SHACL file. */ private const val validShape = @@ -56,7 +56,7 @@ private const val validInput = @prefix ex: . @prefix xsd: . -ex:ValidPoint +ex:ValidPoint a ex:Point; ex:x "1"^^xsd:int; ex:y "2"^^xsd:int. diff --git a/src/test/resources/pipelines/filter.ttl b/src/test/resources/pipelines/filter.ttl index 9f16a05..c015182 100644 --- a/src/test/resources/pipelines/filter.ttl +++ b/src/test/resources/pipelines/filter.ttl @@ -2,11 +2,6 @@ @prefix xsd: . @prefix owl: . -# Include processor definitions. -<> owl:imports - <../pipeline.ttl>, - <../processors/filter.ttl>. - # Range -> Filter a jvm:MemoryChannelReader. a jvm:MemoryChannelWriter. diff --git a/src/test/resources/pipelines/literals.ttl b/src/test/resources/pipelines/literals.ttl index c5e0501..1812970 100644 --- a/src/test/resources/pipelines/literals.ttl +++ b/src/test/resources/pipelines/literals.ttl @@ -2,11 +2,6 @@ @prefix xsd: . @prefix owl: . -# Include processor definitions. -<> owl:imports - <../pipeline.ttl>, - <../processors/literals.ttl>. - # Define a filter processor. [] a jvm:Literals; diff --git a/src/test/resources/pipelines/negative_range.ttl b/src/test/resources/pipelines/negative_range.ttl index 3eee227..4e0ae75 100644 --- a/src/test/resources/pipelines/negative_range.ttl +++ b/src/test/resources/pipelines/negative_range.ttl @@ -7,13 +7,6 @@ @prefix sh: . @prefix rdf: . -# Include processor definitions. -<> owl:imports - <../pipeline.ttl>, - <../processors/negator.ttl>, - <../processors/range.ttl>, - <../processors/reporter.ttl>. - # Range -> Square a jvm:MemoryChannelReader. a jvm:MemoryChannelWriter. diff --git a/src/test/resources/pipelines/optionals.ttl b/src/test/resources/pipelines/optionals.ttl index b810fef..3455b33 100644 --- a/src/test/resources/pipelines/optionals.ttl +++ b/src/test/resources/pipelines/optionals.ttl @@ -2,11 +2,6 @@ @prefix xsd: . @prefix owl: . -# Include processor definitions. -<> owl:imports - <../pipeline.ttl>, - <../processors/optionals.ttl>. - # Define a filter processor. [] a jvm:Optionals; diff --git a/src/test/resources/pipelines/range_reporter.ttl b/src/test/resources/pipelines/range_reporter.ttl index 7dab19a..2f11c04 100644 --- a/src/test/resources/pipelines/range_reporter.ttl +++ b/src/test/resources/pipelines/range_reporter.ttl @@ -7,13 +7,6 @@ @prefix sh: . @prefix rdf: . -# Include processor definitions. -<> owl:imports - <../pipeline.ttl>, - <../processors/square.ttl>, - <../processors/range.ttl>, - <../processors/reporter.ttl>. - # Range -> Square a jvm:MemoryChannelReader. a jvm:MemoryChannelWriter. diff --git a/src/test/resources/processors/filter.ttl b/src/test/resources/processors/filter.ttl index 62cc109..1ace272 100644 --- a/src/test/resources/processors/filter.ttl +++ b/src/test/resources/processors/filter.ttl @@ -9,9 +9,7 @@ <> owl:imports <../pipeline.ttl>. -jvm:Filter a jvm:Processor; - jvm:file <../sources/Filter.java>; - jvm:language "Java". +jvm:Filter a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:Filter; diff --git a/src/test/resources/processors/literals.ttl b/src/test/resources/processors/literals.ttl index 0314c83..3eb7ed2 100644 --- a/src/test/resources/processors/literals.ttl +++ b/src/test/resources/processors/literals.ttl @@ -9,9 +9,7 @@ <> owl:imports <../pipeline.ttl>. -jvm:Literals a jvm:Processor; - jvm:file <../sources/Literals.java>; - jvm:language "Java". +jvm:Literals a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:Literals; diff --git a/src/test/resources/processors/negator.ttl b/src/test/resources/processors/negator.ttl index 4a7d93b..f3b560c 100644 --- a/src/test/resources/processors/negator.ttl +++ b/src/test/resources/processors/negator.ttl @@ -9,9 +9,7 @@ <> owl:imports <../pipeline.ttl>. -jvm:Negator a jvm:Processor; - jvm:file <../sources/Negator.kt>; - jvm:language "Kotlin". +jvm:Negator a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:Negator; diff --git a/src/test/resources/processors/optionals.ttl b/src/test/resources/processors/optionals.ttl index bf3132e..fa6528c 100644 --- a/src/test/resources/processors/optionals.ttl +++ b/src/test/resources/processors/optionals.ttl @@ -9,9 +9,7 @@ <> owl:imports <../pipeline.ttl>. -jvm:Optionals a jvm:Processor; - jvm:file <../sources/Optionals.java>; - jvm:language "Java". +jvm:Optionals a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:Optionals; diff --git a/src/test/resources/processors/range.ttl b/src/test/resources/processors/range.ttl index 94ca0b4..e06e6ab 100644 --- a/src/test/resources/processors/range.ttl +++ b/src/test/resources/processors/range.ttl @@ -9,9 +9,7 @@ <> owl:imports <../pipeline.ttl>. -jvm:Range a jvm:Processor; - jvm:file <../sources/Range.java>; - jvm:language "Java". +jvm:Range a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:Range; diff --git a/src/test/resources/processors/reporter.ttl b/src/test/resources/processors/reporter.ttl index 45f058e..7f74437 100644 --- a/src/test/resources/processors/reporter.ttl +++ b/src/test/resources/processors/reporter.ttl @@ -9,9 +9,7 @@ <> owl:imports <../pipeline.ttl>. -jvm:Reporter a jvm:Processor; - jvm:file <../sources/Reporter.java>; - jvm:language "Java". +jvm:Reporter a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:Reporter; diff --git a/src/test/resources/processors/square.ttl b/src/test/resources/processors/square.ttl index db52fcc..9b24b97 100644 --- a/src/test/resources/processors/square.ttl +++ b/src/test/resources/processors/square.ttl @@ -9,9 +9,7 @@ <> owl:imports <../pipeline.ttl>. -jvm:Square a jvm:Processor; - jvm:file <../sources/Square.java>; - jvm:language "Java". +jvm:Square a jvm:Processor. [] a sh:NodeShape; sh:targetClass jvm:Square;