diff --git a/inception/inception-api-annotation/src/main/java/de/tudarmstadt/ukp/inception/annotation/feature/multistring/MultiSelectTextFeatureEditor.java b/inception/inception-api-annotation/src/main/java/de/tudarmstadt/ukp/inception/annotation/feature/multistring/MultiSelectTextFeatureEditor.java index 06bf01df7db..b19a3e357af 100644 --- a/inception/inception-api-annotation/src/main/java/de/tudarmstadt/ukp/inception/annotation/feature/multistring/MultiSelectTextFeatureEditor.java +++ b/inception/inception-api-annotation/src/main/java/de/tudarmstadt/ukp/inception/annotation/feature/multistring/MultiSelectTextFeatureEditor.java @@ -39,7 +39,6 @@ import org.wicketstuff.kendo.ui.renderer.ChoiceRenderer; import de.tudarmstadt.ukp.clarin.webanno.model.ReorderableTag; -import de.tudarmstadt.ukp.clarin.webanno.model.TagSet; import de.tudarmstadt.ukp.inception.annotation.feature.misc.ConstraintsInUseIndicator; import de.tudarmstadt.ukp.inception.annotation.feature.string.KendoChoiceDescriptionScriptReference; import de.tudarmstadt.ukp.inception.annotation.feature.string.StringFeatureSupportProperties; @@ -228,11 +227,11 @@ public FormComponent getFocusComponent() private List getChoices(final IModel aFeatureStateModel, String aInput) { - String input = aInput != null ? aInput.trim() : ""; + var input = aInput != null ? aInput.trim() : ""; - FeatureState featureState = aFeatureStateModel.getObject(); - TagSet tagset = featureState.getFeature().getTagset(); - List choices = new ArrayList<>(); + var featureState = aFeatureStateModel.getObject(); + var tagset = featureState.getFeature().getTagset(); + var choices = new ArrayList(); Collection values; if (featureState.getValue() instanceof Collection) { @@ -254,7 +253,7 @@ private List getChoices(final IModel aFeatureState // If the currently selected values contain any values not covered by the tagset, // add virtual entries for them as well - for (String value : values) { + for (var value : values) { if (!choices.stream().anyMatch(t -> t.getName().equals(value))) { choices.add(new ReorderableTag(value, false)); } @@ -262,29 +261,28 @@ private List getChoices(final IModel aFeatureState if (!input.isEmpty()) { // Move any entries that match the input case-insensitive to the top - List inputMatchesInsensitive = choices.stream() // + var inputMatchesInsensitive = choices.stream() // .filter(t -> t.getName().equalsIgnoreCase(input)) // .collect(toList()); - for (ReorderableTag t : inputMatchesInsensitive) { + for (var t : inputMatchesInsensitive) { choices.remove(t); choices.add(0, t); } // Move any entries that match the input case-sensitive to the top - List inputMatchesSensitive = choices.stream() // + var inputMatchesSensitive = choices.stream() // .filter(t -> t.getName().equals(input)) // .collect(toList()); if (inputMatchesSensitive.isEmpty()) { // If the input does not match any tagset entry, add a new virtual entry for - // the - // input so that we can select that and add it - this has no description. + // the input so that we can select that and add it - this has no description. // If the input matches an existing entry, move it to the top. if (tagset == null || tagset.isCreateTag()) { choices.add(0, new ReorderableTag(input, false)); } } else { - for (ReorderableTag t : inputMatchesSensitive) { + for (var t : inputMatchesSensitive) { choices.remove(t); choices.add(0, t); } diff --git a/inception/inception-api-annotation/src/main/java/de/tudarmstadt/ukp/inception/annotation/feature/multistring/MultiValueStringFeatureTraitsEditor.java b/inception/inception-api-annotation/src/main/java/de/tudarmstadt/ukp/inception/annotation/feature/multistring/MultiValueStringFeatureTraitsEditor.java index bb18f104132..7363e7c64ca 100644 --- a/inception/inception-api-annotation/src/main/java/de/tudarmstadt/ukp/inception/annotation/feature/multistring/MultiValueStringFeatureTraitsEditor.java +++ b/inception/inception-api-annotation/src/main/java/de/tudarmstadt/ukp/inception/annotation/feature/multistring/MultiValueStringFeatureTraitsEditor.java @@ -58,8 +58,7 @@ public MultiValueStringFeatureTraitsEditor(String aId, traits = CompoundPropertyModel.of(getFeatureSupport().readTraits(feature.getObject())); - Form form = new Form(MID_FORM, - traits) + var form = new Form(MID_FORM, traits) { private static final long serialVersionUID = -3109239605783291123L; @@ -74,7 +73,7 @@ protected void onSubmit() form.setOutputMarkupPlaceholderTag(true); add(form); - DropDownChoice tagset = new DropDownChoice<>("tagset"); + var tagset = new DropDownChoice("tagset"); tagset.setOutputMarkupPlaceholderTag(true); tagset.setChoiceRenderer(new ChoiceRenderer<>("name")); tagset.setNullValid(true); diff --git a/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/exporter/ExportedKnowledgeBase.java b/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/exporter/ExportedKnowledgeBase.java index 6535674f2e6..622666b2406 100644 --- a/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/exporter/ExportedKnowledgeBase.java +++ b/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/exporter/ExportedKnowledgeBase.java @@ -90,6 +90,9 @@ public class ExportedKnowledgeBase @JsonProperty("additional_matching_properties") private List additionalMatchingProperties; + @JsonProperty("additional_languages") + private List additionalLanguages; + @JsonProperty("default_language") private String defaultLanguage; @@ -314,6 +317,16 @@ public List getAdditionalMatchingProperties() return additionalMatchingProperties; } + public void setAdditionalLanguages(List aAdditionalLanguages) + { + additionalLanguages = aAdditionalLanguages; + } + + public List getAdditionalLanguages() + { + return additionalLanguages; + } + public String getDefaultLanguage() { return defaultLanguage; diff --git a/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/exporter/KnowledgeBaseExporter.java b/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/exporter/KnowledgeBaseExporter.java index 28a0fab6863..c133535b5ce 100644 --- a/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/exporter/KnowledgeBaseExporter.java +++ b/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/exporter/KnowledgeBaseExporter.java @@ -132,6 +132,7 @@ public void exportData(FullProjectExportRequest aRequest, ProjectExportTaskMonit exportedKB.setRootConcepts(new ArrayList<>(kb.getRootConcepts())); exportedKB.setAdditionalMatchingProperties( new ArrayList<>(kb.getAdditionalMatchingProperties())); + exportedKB.setAdditionalLanguages(new ArrayList<>(kb.getAdditionalLanguages())); exportedKB.setDefaultLanguage(kb.getDefaultLanguage()); exportedKB.setDefaultDatasetIri( kb.getDefaultDatasetIri() != null ? kb.getDefaultDatasetIri() : null); @@ -242,6 +243,13 @@ public void importData(ProjectImportRequest aRequest, Project aProject, kb.setAdditionalMatchingProperties(new ArrayList<>()); } + if (exportedKB.getAdditionalLanguages() != null) { + kb.setAdditionalLanguages(exportedKB.getAdditionalLanguages()); + } + else { + kb.setAdditionalLanguages(new ArrayList<>()); + } + kb.setDefaultLanguage(exportedKB.getDefaultLanguage()); kb.setDefaultDatasetIri( exportedKB.getDefaultDatasetIri() != null ? exportedKB.getDefaultDatasetIri() // diff --git a/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/model/KnowledgeBase.java b/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/model/KnowledgeBase.java index f42722d5958..d853ee1b02e 100644 --- a/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/model/KnowledgeBase.java +++ b/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/model/KnowledgeBase.java @@ -203,6 +203,11 @@ public class KnowledgeBase @Column private String defaultLanguage; + @ElementCollection(fetch = FetchType.EAGER) + @CollectionTable(name = "knowledgebase_add_languages") + @Column(name = "name") + private Set additionalLanguages = new LinkedHashSet<>(); + /** * Limits the number of results that can be retrieved from a SPARQL query. */ @@ -223,9 +228,9 @@ public String getRepositoryId() return repositoryId; } - public void setRepositoryId(String repositoryId) + public void setRepositoryId(String aRepositoryId) { - this.repositoryId = repositoryId; + repositoryId = aRepositoryId; } public Project getProject() @@ -233,9 +238,9 @@ public Project getProject() return project; } - public void setProject(Project project) + public void setProject(Project aProject) { - this.project = project; + project = aProject; } public String getName() @@ -243,9 +248,9 @@ public String getName() return name; } - public void setName(String name) + public void setName(String aName) { - this.name = name; + name = aName; } public RepositoryType getType() @@ -253,9 +258,9 @@ public RepositoryType getType() return type; } - public void setType(RepositoryType type) + public void setType(RepositoryType aType) { - this.type = type; + type = aType; } public String getClassIri() @@ -487,6 +492,16 @@ public void applyAdditionalMatchingProperties(KnowledgeBaseProfile aProfile) } } + public void applyAdditionalLanguages(KnowledgeBaseProfile aProfile) + { + if (aProfile.getAdditionalLanguages() == null) { + additionalLanguages = emptySet(); + } + else { + additionalLanguages = new LinkedHashSet<>(aProfile.getAdditionalLanguages()); + } + } + public String getDefaultDatasetIri() { return defaultDatasetIri; @@ -517,6 +532,19 @@ public Set getAdditionalMatchingProperties() return additionalMatchingProperties; } + public void setAdditionalLanguages(Collection aAdditionalLanguages) + { + additionalLanguages = new LinkedHashSet<>(); + if (aAdditionalLanguages != null) { + additionalLanguages.addAll(aAdditionalLanguages); + } + } + + public Set getAdditionalLanguages() + { + return additionalLanguages; + } + public boolean isUseFuzzy() { return useFuzzy; diff --git a/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/querybuilder/SPARQLQueryBuilder.java b/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/querybuilder/SPARQLQueryBuilder.java index 8450dc32f05..421bf5f1269 100644 --- a/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/querybuilder/SPARQLQueryBuilder.java +++ b/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/querybuilder/SPARQLQueryBuilder.java @@ -208,9 +208,7 @@ protected Iri getLabelProperty(KnowledgeBase aKb) protected String getLabelPropertyAsString(KnowledgeBase aKb) { switch (this) { - case ITEM: // fall-through - case CLASS: // fall-through - case INSTANCE: + case ITEM, CLASS, INSTANCE: return aKb.getLabelIri(); case PROPERTY: return aKb.getPropertyLabelIri(); @@ -222,9 +220,7 @@ protected String getLabelPropertyAsString(KnowledgeBase aKb) protected Iri getDescriptionProperty(KnowledgeBase aKb) { switch (this) { - case ITEM: // fall-through - case CLASS: // fall-through - case INSTANCE: + case ITEM, CLASS, INSTANCE: return iri(aKb.getDescriptionIri()); case PROPERTY: return iri(aKb.getPropertyDescriptionIri()); @@ -236,9 +232,7 @@ protected Iri getDescriptionProperty(KnowledgeBase aKb) protected List getAdditionalMatchingProperties(KnowledgeBase aKb) { switch (this) { - case ITEM: // fall-through - case CLASS: // fall-through - case INSTANCE: + case ITEM, CLASS, INSTANCE: return aKb.getAdditionalMatchingProperties().stream() // .map(Rdf::iri) // .collect(toList()); @@ -302,9 +296,7 @@ protected GraphPattern ancestorsPattern(KnowledgeBase aKB, Iri aContext) var subPropertyProperty = iri(aKB.getSubPropertyIri()); switch (this) { - case ITEM: - case CLASS: - case INSTANCE: { + case ITEM, CLASS, INSTANCE: { var classPatterns = new ArrayList(); classPatterns.add(aContext.has( PropertyPathBuilder.of(subClassProperty).oneOrMore().build(), VAR_SUBJECT)); @@ -329,13 +321,13 @@ protected GraphPattern ancestorsPattern(KnowledgeBase aKB, Iri aContext) */ protected GraphPattern childrenPattern(KnowledgeBase aKB, Iri aContext) { - Iri subPropertyProperty = iri(aKB.getSubPropertyIri()); - Iri subClassProperty = iri(aKB.getSubclassIri()); - Iri typeOfProperty = iri(aKB.getTypeIri()); + var subPropertyProperty = iri(aKB.getSubPropertyIri()); + var subClassProperty = iri(aKB.getSubclassIri()); + var typeOfProperty = iri(aKB.getTypeIri()); switch (this) { case ITEM: { - List classPatterns = new ArrayList<>(); + var classPatterns = new ArrayList(); classPatterns .add(VAR_SUBJECT.has(() -> subClassProperty.getQueryString(), aContext)); classPatterns.add(VAR_SUBJECT.has(typeOfProperty, aContext)); @@ -351,7 +343,7 @@ protected GraphPattern childrenPattern(KnowledgeBase aKB, Iri aContext) case CLASS: { // Follow the subclass property and also take into account owl:intersectionOf if // using OWL classes - List classPatterns = new ArrayList<>(); + var classPatterns = new ArrayList(); classPatterns.add(VAR_SUBJECT.has(subClassProperty, aContext)); if (OWL.CLASS.stringValue().equals(aKB.getClassIri())) { classPatterns.add(VAR_SUBJECT.has(OWL_INTERSECTIONOF_PATH, aContext)); @@ -371,13 +363,13 @@ protected GraphPattern childrenPattern(KnowledgeBase aKB, Iri aContext) */ protected GraphPattern parentsPattern(KnowledgeBase aKB, Iri aContext) { - Iri subClassProperty = iri(aKB.getSubclassIri()); - Iri subPropertyProperty = iri(aKB.getSubPropertyIri()); - Iri typeOfProperty = iri(aKB.getTypeIri()); + var subClassProperty = iri(aKB.getSubclassIri()); + var subPropertyProperty = iri(aKB.getSubPropertyIri()); + var typeOfProperty = iri(aKB.getTypeIri()); switch (this) { case CLASS: { - List classPatterns = new ArrayList<>(); + var classPatterns = new ArrayList(); classPatterns.add(aContext.has(subClassProperty, VAR_SUBJECT)); classPatterns.add(aContext.has(typeOfProperty, VAR_SUBJECT)); if (OWL.CLASS.stringValue().equals(aKB.getClassIri())) { @@ -443,10 +435,7 @@ protected GraphPattern rootsPattern(KnowledgeBase aKb) protected Iri getDeprecationProperty(KnowledgeBase aKb) { switch (this) { - case ITEM: // fall-through - case CLASS: // fall-through - case INSTANCE: // fall-through - case PROPERTY: + case ITEM, CLASS, INSTANCE, PROPERTY: return iri(aKb.getDeprecationPropertyIri()); default: throw new IllegalStateException("Unsupported mode: " + this); @@ -479,7 +468,7 @@ public static SPARQLQueryPrimaryConditions forItems(KnowledgeBase aKB) */ public static SPARQLQueryPrimaryConditions forClasses(KnowledgeBase aKB) { - SPARQLQueryBuilder builder = new SPARQLQueryBuilder(aKB, Mode.CLASS); + var builder = new SPARQLQueryBuilder(aKB, Mode.CLASS); builder.limitToClasses(); return builder; } @@ -494,7 +483,7 @@ public static SPARQLQueryPrimaryConditions forClasses(KnowledgeBase aKB) */ public static SPARQLQueryPrimaryConditions forInstances(KnowledgeBase aKB) { - SPARQLQueryBuilder builder = new SPARQLQueryBuilder(aKB, Mode.INSTANCE); + var builder = new SPARQLQueryBuilder(aKB, Mode.INSTANCE); builder.limitToInstances(); return builder; } @@ -509,7 +498,7 @@ public static SPARQLQueryPrimaryConditions forInstances(KnowledgeBase aKB) */ public static SPARQLQueryPrimaryConditions forProperties(KnowledgeBase aKB) { - SPARQLQueryBuilder builder = new SPARQLQueryBuilder(aKB, Mode.PROPERTY); + var builder = new SPARQLQueryBuilder(aKB, Mode.PROPERTY); builder.limitToProperties(); return builder; } @@ -529,7 +518,9 @@ public static SPARQLQueryPrimaryConditions forProperties(KnowledgeBase aKB) var appCtx = ApplicationContextProvider.getApplicationContext(); if (appCtx != null) { var props = appCtx.getBean(KnowledgeBaseProperties.class); - withFallbackLanguages(props.getDefaultFallbackLanguages()); + var langs = new LinkedHashSet<>(props.getDefaultFallbackLanguages()); + langs.addAll(aKB.getAdditionalLanguages()); + withFallbackLanguages(langs); } } @@ -1144,12 +1135,12 @@ private void limitToProperties() private GraphPattern isPropertyPattern() { - Iri propertyIri = iri(kb.getPropertyTypeIri()); - Iri subPropertyProperty = iri(kb.getSubPropertyIri()); - Iri typeOfProperty = iri(kb.getTypeIri()); - Iri pSubClass = iri(kb.getSubclassIri()); + var propertyIri = iri(kb.getPropertyTypeIri()); + var subPropertyProperty = iri(kb.getSubPropertyIri()); + var typeOfProperty = iri(kb.getTypeIri()); + var pSubClass = iri(kb.getSubclassIri()); - List propertyPatterns = new ArrayList<>(); + var propertyPatterns = new ArrayList(); // An item is a property if ... // ... it is explicitly defined as being a property @@ -1296,15 +1287,14 @@ public SelectQuery selectQuery() @Override public List asHandles(RepositoryConnection aConnection, boolean aAll) { - long startTime = currentTimeMillis(); - String queryId = toHexString(hashCode()); + var startTime = currentTimeMillis(); + var queryId = toHexString(hashCode()); - String queryString = selectQuery().getQueryString(); + var queryString = selectQuery().getQueryString(); // queryString = QueryParserUtil.parseQuery(QueryLanguage.SPARQL, queryString, null) // .toString(); LOG.trace("[{}] Query: {}", queryId, queryString); - List results; if (returnEmptyResult) { LOG.debug("[{}] Query was skipped because it would not return any results anyway", queryId); @@ -1313,12 +1303,12 @@ public List asHandles(RepositoryConnection aConnection, boolean aAll) } try { - TupleQuery tupleQuery = aConnection.prepareTupleQuery(queryString); + var tupleQuery = aConnection.prepareTupleQuery(queryString); tupleQuery.setIncludeInferred(includeInferred); - results = evaluateListQuery(tupleQuery, aAll); + var results = evaluateListQuery(tupleQuery, aAll); results.sort(comparing(KBObject::getUiLabel, CASE_INSENSITIVE_ORDER)); - long duration = currentTimeMillis() - startTime; + var duration = currentTimeMillis() - startTime; LOG.debug("[{}] Query returned {} results in {}ms {}", queryId, results.size(), duration, duration > 1000 ? "-- SLOW QUERY!" : ""); @@ -1348,14 +1338,14 @@ public List asHandles(RepositoryConnection aConnection, boolean aAll) @Override public boolean exists(RepositoryConnection aConnection, boolean aAll) { - long startTime = currentTimeMillis(); - String queryId = toHexString(hashCode()); + var startTime = currentTimeMillis(); + var queryId = toHexString(hashCode()); limit(1); - SelectQuery query = selectQuery(); + var query = selectQuery(); - String queryString = query.getQueryString(); + var queryString = query.getQueryString(); LOG.trace("[{}] Query: {}", queryId, queryString); if (returnEmptyResult) { @@ -1366,10 +1356,10 @@ public boolean exists(RepositoryConnection aConnection, boolean aAll) } try { - TupleQuery tupleQuery = aConnection.prepareTupleQuery(queryString); - boolean result = !evaluateListQuery(tupleQuery, aAll).isEmpty(); + var tupleQuery = aConnection.prepareTupleQuery(queryString); + var result = !evaluateListQuery(tupleQuery, aAll).isEmpty(); - long duration = currentTimeMillis() - startTime; + var duration = currentTimeMillis() - startTime; LOG.debug("[{}] Query returned {} in {}ms {}", queryId, result, duration, duration > 1000 ? "-- SLOW QUERY!" : ""); @@ -1388,15 +1378,14 @@ public boolean exists(RepositoryConnection aConnection, boolean aAll) @Override public Optional asHandle(RepositoryConnection aConnection, boolean aAll) { - long startTime = currentTimeMillis(); - String queryId = toHexString(hashCode()); + var startTime = currentTimeMillis(); + var queryId = toHexString(hashCode()); limit(1); - String queryString = selectQuery().getQueryString(); + var queryString = selectQuery().getQueryString(); LOG.trace("[{}] Query: {}", queryId, queryString); - Optional result; if (returnEmptyResult) { LOG.debug("[{}] Query was skipped because it would not return any results anyway", queryId); @@ -1404,11 +1393,11 @@ public Optional asHandle(RepositoryConnection aConnection, boolean aAl } try { - TupleQuery tupleQuery = aConnection.prepareTupleQuery(queryString); + var tupleQuery = aConnection.prepareTupleQuery(queryString); tupleQuery.setIncludeInferred(includeInferred); - result = evaluateListQuery(tupleQuery, aAll).stream().findFirst(); + var result = evaluateListQuery(tupleQuery, aAll).stream().findFirst(); - long duration = currentTimeMillis() - startTime; + var duration = currentTimeMillis() - startTime; LOG.debug("[{}] Query returned a result in {}ms {}", queryId, duration, duration > 1000 ? "-- SLOW QUERY!" : ""); @@ -1519,8 +1508,8 @@ else if (langPrio.indexOf(current.getLanguage()) > langPrio private void extractLabel(KBHandle aTargetHandle, BindingSet aSourceBindings) { - Binding prefLabel = aSourceBindings.getBinding(VAR_PREF_LABEL_NAME); - Binding matchTerm = aSourceBindings.getBinding(VAR_MATCH_TERM_NAME); + var prefLabel = aSourceBindings.getBinding(VAR_PREF_LABEL_NAME); + var matchTerm = aSourceBindings.getBinding(VAR_MATCH_TERM_NAME); // Obtain name either from the pref-label or from the match term if available if (prefLabel != null) { diff --git a/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/yaml/KnowledgeBaseProfile.java b/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/yaml/KnowledgeBaseProfile.java index 00aa9149b98..d5cef3306a3 100644 --- a/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/yaml/KnowledgeBaseProfile.java +++ b/inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/yaml/KnowledgeBaseProfile.java @@ -63,6 +63,9 @@ public class KnowledgeBaseProfile @JsonProperty("additional-matching-properties") private List additionalMatchingProperties; + @JsonProperty("additional-languages") + private List additionalLanguages; + @JsonProperty("info") private KnowledgeBaseInfo info; @@ -177,6 +180,16 @@ public void setAdditionalMatchingProperties(List aProperties) additionalMatchingProperties = aProperties; } + public List getAdditionalLanguages() + { + return additionalLanguages; + } + + public void setAdditionalLanguages(List aLanguages) + { + additionalLanguages = aLanguages; + } + public KnowledgeBaseInfo getInfo() { return info; @@ -226,7 +239,7 @@ public static Map readKnowledgeBaseProfiles() thro try (var r = new InputStreamReader( KnowledgeBaseProfile.class.getResourceAsStream(KNOWLEDGEBASE_PROFILES_YAML), UTF_8)) { - ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); + var mapper = new ObjectMapper(new YAMLFactory()); return mapper.readValue(r, new TypeReference>() { }); @@ -243,20 +256,25 @@ public boolean equals(Object o) return false; } KnowledgeBaseProfile that = (KnowledgeBaseProfile) o; - return Objects.equals(name, that.name) && Objects.equals(disabled, that.disabled) - && Objects.equals(access, that.access) && Objects.equals(mapping, that.mapping) - && Objects.equals(type, that.type) - && Objects.equals(rootConcepts, that.rootConcepts) - && Objects.equals(info, that.info) && Objects.equals(reification, that.reification) - && Objects.equals(defaultLanguage, that.defaultLanguage) - && Objects.equals(defaultDataset, that.defaultDataset); + return Objects.equals(name, that.name) // + && Objects.equals(disabled, that.disabled) // + && Objects.equals(access, that.access) // + && Objects.equals(mapping, that.mapping) // + && Objects.equals(type, that.type) // + && Objects.equals(rootConcepts, that.rootConcepts) // + && Objects.equals(info, that.info) // + && Objects.equals(reification, that.reification) // + && Objects.equals(defaultLanguage, that.defaultLanguage) // + && Objects.equals(defaultDataset, that.defaultDataset) // + && Objects.equals(additionalMatchingProperties, that.additionalMatchingProperties) // + && Objects.equals(additionalLanguages, that.additionalLanguages); } @Override public int hashCode() { return Objects.hash(name, disabled, type, access, mapping, rootConcepts, info, reification, - defaultLanguage, defaultDataset); + defaultLanguage, defaultDataset, additionalMatchingProperties, additionalLanguages); } @Override diff --git a/inception/inception-kb/src/main/resources/de/tudarmstadt/ukp/inception/kb/model/db-changelog.xml b/inception/inception-kb/src/main/resources/de/tudarmstadt/ukp/inception/kb/model/db-changelog.xml index 7b9c35f75f4..6d718a72bc2 100644 --- a/inception/inception-kb/src/main/resources/de/tudarmstadt/ukp/inception/kb/model/db-changelog.xml +++ b/inception/inception-kb/src/main/resources/de/tudarmstadt/ukp/inception/kb/model/db-changelog.xml @@ -490,4 +490,19 @@ + + + + + + + + + + + + + + + diff --git a/inception/inception-ui-kb/src/main/java/de/tudarmstadt/ukp/inception/ui/kb/project/GeneralSettingsPanel.html b/inception/inception-ui-kb/src/main/java/de/tudarmstadt/ukp/inception/ui/kb/project/GeneralSettingsPanel.html index e82ad93be87..a7dee9e5c8c 100644 --- a/inception/inception-ui-kb/src/main/java/de/tudarmstadt/ukp/inception/ui/kb/project/GeneralSettingsPanel.html +++ b/inception/inception-ui-kb/src/main/java/de/tudarmstadt/ukp/inception/ui/kb/project/GeneralSettingsPanel.html @@ -41,6 +41,14 @@
+
+ +
+