From 7be1d2ba7668d8c7d1c66f1d44a617e9ee25ea69 Mon Sep 17 00:00:00 2001 From: Martin Ledvinka Date: Mon, 5 Aug 2024 14:31:33 +0200 Subject: [PATCH] [Fix] Return validation message with '@none' language when it has none. --- .../cz/cvut/kbss/termit/persistence/validation/Validator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/cz/cvut/kbss/termit/persistence/validation/Validator.java b/src/main/java/cz/cvut/kbss/termit/persistence/validation/Validator.java index 2b0b8a767..63b0689cc 100644 --- a/src/main/java/cz/cvut/kbss/termit/persistence/validation/Validator.java +++ b/src/main/java/cz/cvut/kbss/termit/persistence/validation/Validator.java @@ -20,6 +20,7 @@ import com.github.sgov.server.ValidationResultSeverityComparator; import cz.cvut.kbss.jopa.model.EntityManager; import cz.cvut.kbss.jopa.model.MultilingualString; +import cz.cvut.kbss.jsonld.JsonLd; import cz.cvut.kbss.termit.exception.TermItException; import cz.cvut.kbss.termit.model.validation.ValidationResult; import cz.cvut.kbss.termit.persistence.context.VocabularyContextMapper; @@ -154,7 +155,7 @@ public List validate(final Collection vocabularyIris) { .map(RDFNode::asLiteral) .collect(Collectors.toMap( lit -> lit.getLanguage().isBlank() ? - Constants.DEFAULT_LANGUAGE : lit.getLanguage(), + JsonLd.NONE : lit.getLanguage(), Literal::getLexicalForm))); return new ValidationResult()