Skip to content

[Issue 3767] Replacement of language comparisons using '=' by the 'langMatches' (without whitespace changes)

backups requested to merge github/fork/TAMULib/issue-3767 into main

Created by: ghost

Issue #3767 Problems associated with the use of sparqlContentTripleSource in the applicationSetup.n3 configuration file:

What does this pull request do?

This PR fixes the language context management issue in the Capability Map when using VIVO which uses AWS-Neptune TripleStore

What's new?

As described in the issue, VIVO's CapabilityMap using AWS-Neptune as a TripleStore is not working properly. The malfunction is related to the disfunction of the expertise search bar. The cause of this malfunction is that, unlike the other triple stores, the linguistic value of the tags is stored in lower case. For example: the term "Label"@en-CA is actually stored in AWS-Neptune as "Label"@en-ca. The solution is to modify the SPARQL queries in the Java code so that the filters process the language parameters regardless of case sensitivity.

Here is a code sample to be replaced

FILTER (LANG(?orgLabelSecondary) = '" + language + "') \n" +

Replacement code example

FILTER (langMatches(lang(?orgLabelSecondary), '" + language+"' ) ) \n"

How should this be tested?

VIVO installation using AWS-Neptune

  1. Installing AWS-Neptune To reproduce the BUG, it is absolutely necessary to install an instance of AWS-Neptune. The following documentation Setting up Neptune allows to install a Neptune instance.

  2. Installing VIVO (master branch)

  • Extract and compile VIVO
  • Install a VIVO-home according to the specifications indicated by VIVO's documentations:

Using web-based triple stores Fuseki as alternate triple store

  1. Run VIVO and load Sample Data After starting VIVO, you can download the sample data contained at: -VIVO Sample data Repo Upload files:

sample-data-i18n-de_DE.ttl sample-data-i18n-en_CA.ttl sample-data-i18n-en_US.ttl sample-data-i18n-fr_CA.ttl sample-data-i18n-fr_FR.ttl sample-data-i18n.ttl

  1. Observe the problem Browse the CapabilityMap and try to search for an expertise. You will see that it is not possible to perform a search.

  2. Evaluate the RP

  • Stop VIVO; extract the code from the PR, compile VIVO; and start VIVO
  • Browse the CapabilityMap and try to search for an expertise. You will see that it is possible to perform a search.

Additional Notes:

see also:

Interested parties

@VIVO-project/vivo-committers

Merge request reports