From 93ecf9984443d3cc54e4b5fa86cc426d5dae3b68 Mon Sep 17 00:00:00 2001 From: Miroslav Blasko Date: Fri, 29 Sep 2023 22:21:17 +0200 Subject: [PATCH] [Upd] Refactor --- .../main/java/cz/cvut/spipes/modules/ImportE5XModule.java | 1 + .../main/java/cz/cvut/spipes/modules/SUTimeModuleNew.java | 4 +++- .../cvut/spipes/modules/ApplyConstructAbstractModule.java | 8 ++++---- .../modules/ApplyConstructWithScrollableCursorModule.java | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/s-pipes-modules/module-eccairs/src/main/java/cz/cvut/spipes/modules/ImportE5XModule.java b/s-pipes-modules/module-eccairs/src/main/java/cz/cvut/spipes/modules/ImportE5XModule.java index ee4dbfb9..6b2fa24b 100644 --- a/s-pipes-modules/module-eccairs/src/main/java/cz/cvut/spipes/modules/ImportE5XModule.java +++ b/s-pipes-modules/module-eccairs/src/main/java/cz/cvut/spipes/modules/ImportE5XModule.java @@ -41,6 +41,7 @@ public class ImportE5XModule extends AbstractModule { private static final Logger LOG = LoggerFactory.getLogger(ImportE5XModule.class); // TODO - this parameter id defined with IRI in s-pipes-modules\module.sms.ttl + // TODO - we should be able to annotate directly "StreamResource e5xResource" instead @Parameter(name = "has-resource-uri", comment = "Uri of a resource referencing content of an e5x file.") private String e5xResourceUriStr; diff --git a/s-pipes-modules/module-nlp/src/main/java/cz/cvut/spipes/modules/SUTimeModuleNew.java b/s-pipes-modules/module-nlp/src/main/java/cz/cvut/spipes/modules/SUTimeModuleNew.java index c393c5bd..9d319b5e 100644 --- a/s-pipes-modules/module-nlp/src/main/java/cz/cvut/spipes/modules/SUTimeModuleNew.java +++ b/s-pipes-modules/module-nlp/src/main/java/cz/cvut/spipes/modules/SUTimeModuleNew.java @@ -57,7 +57,9 @@ public class SUTimeModuleNew extends AbstractModule { private boolean isReplace; //kbss:parseText - @Parameter(name = "is-parse-text", comment = "Whether the query should be taken from sp:text property instead of from SPIN serialization") + @Parameter(urlPrefix = KBSS_MODULE.uri, name = "is-parse-text", + comment = "Whether the query should be taken from sp:text property instead of from SPIN serialization," + + " default is true.") private boolean parseText; @Parameter(urlPrefix = DescriptorModel.prefix, name = "has-rule-file", comment = "Rule file, multivalued.")// TODO - review comment diff --git a/s-pipes-modules/module-sparql-endpoint/src/main/java/cz/cvut/spipes/modules/ApplyConstructAbstractModule.java b/s-pipes-modules/module-sparql-endpoint/src/main/java/cz/cvut/spipes/modules/ApplyConstructAbstractModule.java index aff6a2df..d78227fd 100644 --- a/s-pipes-modules/module-sparql-endpoint/src/main/java/cz/cvut/spipes/modules/ApplyConstructAbstractModule.java +++ b/s-pipes-modules/module-sparql-endpoint/src/main/java/cz/cvut/spipes/modules/ApplyConstructAbstractModule.java @@ -3,7 +3,6 @@ import cz.cvut.spipes.constants.KBSS_MODULE; import cz.cvut.spipes.constants.SML; import cz.cvut.spipes.engine.ExecutionContext; -import cz.cvut.spipes.modules.annotations.SPipesModule; import cz.cvut.spipes.util.JenaUtils; import cz.cvut.spipes.util.QueryUtils; import org.apache.jena.query.Query; @@ -36,8 +35,9 @@ public abstract class ApplyConstructAbstractModule extends AnnotatedAbstractModu protected boolean isReplace; //kbss:parseText - @Parameter(name = "is-parse-text", - comment = "Whether the query should be taken from sp:text property instead of from SPIN serialization" + @Parameter(urlPrefix = KBSS_MODULE.uri, name = "is-parse-text", + comment = "Whether the query should be taken from sp:text property instead of from SPIN serialization," + + " default is true." ) protected boolean parseText; @@ -182,7 +182,7 @@ public void loadConfiguration() { //TODO default value must be taken from template definition isReplace = this.getPropertyValue(SML.replace, false); - parseText = this.getPropertyValue(KBSS_MODULE.is_parse_text, false); + parseText = this.getPropertyValue(KBSS_MODULE.is_parse_text, true); iterationCount = this.getPropertyValue(KBSS_MODULE.has_max_iteration_count, -1); } diff --git a/s-pipes-modules/module-sparql-endpoint/src/main/java/cz/cvut/spipes/modules/ApplyConstructWithScrollableCursorModule.java b/s-pipes-modules/module-sparql-endpoint/src/main/java/cz/cvut/spipes/modules/ApplyConstructWithScrollableCursorModule.java index ffb08a72..bf6754f5 100644 --- a/s-pipes-modules/module-sparql-endpoint/src/main/java/cz/cvut/spipes/modules/ApplyConstructWithScrollableCursorModule.java +++ b/s-pipes-modules/module-sparql-endpoint/src/main/java/cz/cvut/spipes/modules/ApplyConstructWithScrollableCursorModule.java @@ -15,7 +15,7 @@ @SPipesModule(label = "apply construct with scrollable cursor", comment = "Runs one or more construct queries (bound to sml:constructQuery) on the input triples. Queries are " + "executed multiple times with scrollable cursor that is injected through query marker #${LIMIT_OFFSET}. " + - "The marker is replaced each time with appropriatei by sparql constructs 'LIMIT ?limit' and 'OFFSET ?offset'. " + + "The marker is replaced each time with appropriate by sparql constructs 'LIMIT ?limit' and 'OFFSET ?offset'. " + "Within each construct query The output RDF will consist of the constructed triples and (unless sml:replace is true) " + "the input triples.") public class ApplyConstructWithScrollableCursorModule extends ApplyConstructAbstractModule {