From 8cb905ca1def23ab5f0781858cfafb4c9a4b8910 Mon Sep 17 00:00:00 2001 From: Martin Ledvinka Date: Tue, 8 Oct 2024 11:05:23 +0200 Subject: [PATCH] [kbss-cvut/termit-ui#528] Extend configuration with modeling tool URL parameter. --- "ontology/termit-glos\303\241\305\231.ttl" | 9 +++++++++ ontology/termit-model.ttl | 4 ++++ .../cvut/kbss/termit/dto/ConfigurationDto.java | 11 +++++++++++ .../service/config/ConfigurationProvider.java | 1 + .../cz/cvut/kbss/termit/util/Configuration.java | 17 +++++++++++++++++ 5 files changed, 42 insertions(+) diff --git "a/ontology/termit-glos\303\241\305\231.ttl" "b/ontology/termit-glos\303\241\305\231.ttl" index 0a36d37a4..f32e1e84b 100644 --- "a/ontology/termit-glos\303\241\305\231.ttl" +++ "b/ontology/termit-glos\303\241\305\231.ttl" @@ -640,3 +640,12 @@ termit-pojem:požadavek-na-změnu-hesla termit:glosář ; "Password reset request"@en , "Požadavek na změnu hesla"@cs . + +termit-pojem:má-adresu-modelovacího-nástroje + a ; + + , ; + + termit:glosář ; + + "Has modeling tool address"@en , "Má adresu modelovacího nástroje"@cs . diff --git a/ontology/termit-model.ttl b/ontology/termit-model.ttl index b5ef518cc..09444df7f 100644 --- a/ontology/termit-model.ttl +++ b/ontology/termit-model.ttl @@ -337,4 +337,8 @@ termit-pojem:koncový-stav-pojmu termit-pojem:požadavek-na-změnu-hesla a , owl:Class . +termit-pojem:má-adresu-modelovacího-nástroje + a owl:AnnotationProperty , ; + rdfs:subPropertyOf . + diff --git a/src/main/java/cz/cvut/kbss/termit/dto/ConfigurationDto.java b/src/main/java/cz/cvut/kbss/termit/dto/ConfigurationDto.java index 8b4591fcc..460ab58d6 100644 --- a/src/main/java/cz/cvut/kbss/termit/dto/ConfigurationDto.java +++ b/src/main/java/cz/cvut/kbss/termit/dto/ConfigurationDto.java @@ -53,6 +53,9 @@ public class ConfigurationDto implements Serializable { @OWLDataProperty(iri = Vocabulary.s_p_ma_oddelovac_verze) private String versionSeparator; + @OWLAnnotationProperty(iri = Vocabulary.s_p_ma_adresu_modelovaciho_nastroje) + private String modelingToolUrl; + public String getLanguage() { return language; } @@ -92,4 +95,12 @@ public String getVersionSeparator() { public void setVersionSeparator(String versionSeparator) { this.versionSeparator = versionSeparator; } + + public String getModelingToolUrl() { + return modelingToolUrl; + } + + public void setModelingToolUrl(String modelingToolUrl) { + this.modelingToolUrl = modelingToolUrl; + } } diff --git a/src/main/java/cz/cvut/kbss/termit/service/config/ConfigurationProvider.java b/src/main/java/cz/cvut/kbss/termit/service/config/ConfigurationProvider.java index 2673d7391..084e75f56 100644 --- a/src/main/java/cz/cvut/kbss/termit/service/config/ConfigurationProvider.java +++ b/src/main/java/cz/cvut/kbss/termit/service/config/ConfigurationProvider.java @@ -59,6 +59,7 @@ public ConfigurationDto getConfiguration() { result.setRoles(new HashSet<>(service.findAll())); result.setMaxFileUploadSize(maxFileUploadSize); result.setVersionSeparator(config.getNamespace().getSnapshot().getSeparator()); + result.setModelingToolUrl(config.getModelingToolUrl()); return result; } } diff --git a/src/main/java/cz/cvut/kbss/termit/util/Configuration.java b/src/main/java/cz/cvut/kbss/termit/util/Configuration.java index e066fe444..310cda8b8 100644 --- a/src/main/java/cz/cvut/kbss/termit/util/Configuration.java +++ b/src/main/java/cz/cvut/kbss/termit/util/Configuration.java @@ -49,6 +49,14 @@ public class Configuration { * It is used, for example, for links in emails sent to users. */ private String url = "http://localhost:3000/#"; + + /** + * URL of the modeling tool. + *

+ * The modeling tool can be used to further specify the relationships between terms. + */ + private String modelingToolUrl; + /** * Name of the JMX bean exported by TermIt. *

@@ -88,6 +96,7 @@ public class Configuration { *

* By default, generated identifiers may contain accented characters (like č). Setting this configuration to * {@code true} ensures all generated identifiers are ASCII-only and accented character are normalized to ASCII. + * * @configurationdoc.default false */ private boolean asciiIdentifiers = false; @@ -139,6 +148,14 @@ public void setUrl(String url) { this.url = url; } + public String getModelingToolUrl() { + return modelingToolUrl; + } + + public void setModelingToolUrl(String modelingToolUrl) { + this.modelingToolUrl = modelingToolUrl; + } + public String getJmxBeanName() { return jmxBeanName; }