Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TermIt UI#528 OntoGrapher integration #307

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ontology/termit-glosář.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -640,3 +640,12 @@ termit-pojem:požadavek-na-změnu-hesla
termit:glosář ;
<http://www.w3.org/2004/02/skos/core#prefLabel>
"Password reset request"@en , "Požadavek na změnu hesla"@cs .

termit-pojem:má-adresu-modelovacího-nástroje
a <http://www.w3.org/2004/02/skos/core#Concept> ;
<http://www.w3.org/2004/02/skos/core#broader>
<https://slovník.gov.cz/základní/pojem/vlastnost> , <https://slovník.gov.cz/základní/pojem/typ-vlastnosti> ;
<http://www.w3.org/2004/02/skos/core#inScheme>
termit:glosář ;
<http://www.w3.org/2004/02/skos/core#prefLabel>
"Has modeling tool address"@en , "Má adresu modelovacího nástroje"@cs .
4 changes: 4 additions & 0 deletions ontology/termit-model.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,8 @@ termit-pojem:koncový-stav-pojmu
termit-pojem:požadavek-na-změnu-hesla
a <https://slovník.gov.cz/základní/pojem/typ-objektu>, owl:Class .

termit-pojem:má-adresu-modelovacího-nástroje
a owl:AnnotationProperty , <https://slovník.gov.cz/základní/pojem/typ-vlastnosti> ;
rdfs:subPropertyOf <https://slovník.gov.cz/základní/pojem/vlastnost> .


11 changes: 11 additions & 0 deletions src/main/java/cz/cvut/kbss/termit/dto/ConfigurationDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -216,11 +215,26 @@ public Set<URI> 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<RdfsStatement> getTermRelations(Vocabulary vocabulary) {
return repositoryService.getTermRelations(vocabulary);
}

/**
* Gets statements representing relationships between the specified vocabulary and other vocabularies.
* <p>
* 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<RdfsStatement> getVocabularyRelations(Vocabulary vocabulary) {
return repositoryService.getVocabularyRelations(vocabulary, VOCABULARY_REMOVAL_IGNORED_RELATIONS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
17 changes: 17 additions & 0 deletions src/main/java/cz/cvut/kbss/termit/util/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>
* The modeling tool can be used to further specify the relationships between terms.
*/
private String modelingToolUrl;

/**
* Name of the JMX bean exported by TermIt.
* <p>
Expand Down Expand Up @@ -88,6 +96,7 @@ public class Configuration {
* <p>
* 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;
Expand Down Expand Up @@ -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;
}
Expand Down