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/business/VocabularyService.java b/src/main/java/cz/cvut/kbss/termit/service/business/VocabularyService.java index 6d2d409ae..6fc119251 100644 --- a/src/main/java/cz/cvut/kbss/termit/service/business/VocabularyService.java +++ b/src/main/java/cz/cvut/kbss/termit/service/business/VocabularyService.java @@ -123,9 +123,8 @@ public VocabularyService(VocabularyRepositoryService repositoryService, } /** - * Receives {@link VocabularyContentModifiedEvent} and triggers validation. - * The goal for this is to get the results cached and do not force users to wait for validation - * when they request it. + * Receives {@link VocabularyContentModifiedEvent} and triggers validation. The goal for this is to get the results + * cached and do not force users to wait for validation when they request it. */ @EventListener({VocabularyContentModifiedEvent.class, VocabularyCreatedEvent.class}) public void onVocabularyContentModified(VocabularyEvent event) { @@ -216,11 +215,26 @@ public Set getRelatedVocabularies(Vocabulary entity) { return repositoryService.getRelatedVocabularies(entity); } + /** + * Gets statements representing SKOS relationships between terms from the specified vocabulary and terms from other + * vocabularies. + * + * @param vocabulary Vocabulary whose terms' relationships to retrieve + * @return List of RDF statements + */ @PreAuthorize("@vocabularyAuthorizationService.canRead(#vocabulary)") public List getTermRelations(Vocabulary vocabulary) { return repositoryService.getTermRelations(vocabulary); } + /** + * Gets statements representing relationships between the specified vocabulary and other vocabularies. + *

+ * A selected set of relationships is excluded (for example, versioning relationships). + * + * @param vocabulary Vocabulary whose relationships to retrieve + * @return List of RDF statements + */ @PreAuthorize("@vocabularyAuthorizationService.canRead(#vocabulary)") public List getVocabularyRelations(Vocabulary vocabulary) { return repositoryService.getVocabularyRelations(vocabulary, VOCABULARY_REMOVAL_IGNORED_RELATIONS); 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; }