Hi David,
I think I located the cause for STANBOL-697 in
SparqlQueryUtils#addDataTypeValueConstraint(..)
This method supports multiple values. In the "any" mode (Entities need
only to have one of the parsed values) it adds UNIONS to the SPARQL
query. In case only a single value is parsed than the starting '{' was
added, but the '}' was never added.
That means that the reason for this is not a missing '}' but an
unintended '{' that is added for ValueConstraints (and
ReferenceConstraints) with a single value.
>> I think the issue is line SparqlQueryUtils.java:448 [1]:
>> queryString.append(" . \n");
>>
>> It adds a dot even though the constraint is the last in the set.
[..]
> I can confirm that, after applying the fix, it is working.
Adding an additional ’}' in this place would fix the issue for queries
used by the Stanbol Enhancer, but will not work for other FieldQueries
(e.g. those without a ValueConstraint or ReferenceConstraint).
>
> In order to find the issue I've added some traces in relevant classes. It
> might be nice to pull back those traces in the source tree, as they might
> turn useful in the future as well.
>
For sure. Can you please provide a Patch file with your changes
instead of the ZIP file with the changed Java classes.
best
Rupert
--
| Rupert Westenthaler [email protected]
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen