[VIVO-1059] Improve bind parameter method in SparqlQueryDataGetter so that variables with a common root are bound correctly - e.g. binding ?individual won't match ?individualURI
(Does not use full set of allowed Sparql characters, but should catch all commonly used cases)
This commit is contained in:
parent
937a3abca5
commit
4883621236
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ public class SparqlQueryDataGetter extends DataGetterBase implements DataGetter{
|
|||
private String bindParameters(String text, Map<String, String> merged) {
|
||||
String bound = text;
|
||||
for (String key : merged.keySet()) {
|
||||
bound = bound.replace('?' + key, '<' + merged.get(key) + '>');
|
||||
bound = bound.replaceAll("[?$]" + key + "[^a-zA-Z0-9_\\-]", '<' + merged.get(key) + '>');
|
||||
}
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("parameters: " + merged);
|
||||
|
|
Loading…
Add table
Reference in a new issue