Hey Rupert, Are there any unit tests related to these classes? as far as I can understand any Stanbol install configured with a referenced site cache strategy other than 'All' would fail, correct?
BR, David On Sun, Jul 22, 2012 at 8:48 PM, David Riccitelli <[email protected]>wrote: > Hello Rupert, > > I now attached the patch file [stanbol-traces.diff] to the issue [ > https://issues.apache.org/jira/browse/STANBOL-697]. > > BR, > David > > > > > On Sun, Jul 22, 2012 at 8:43 PM, Rupert Westenthaler < > [email protected]> wrote: > >> Hi David, >> >> the Patch was not attached to the mail. Maybe the file was to big for the >> list. >> Anyways the patch should be added to the Issue and not be sent on the >> list. >> >> >> On Sun, Jul 22, 2012 at 7:35 PM, David Riccitelli <[email protected]> >> wrote: >> > Hello Rupert, >> > >> > Find attached the diff file. You might find some more reformatting, as >> I had >> > Eclipse apply the code conventions >> > [http://incubator.apache.org/stanbol/development/coding.html]. >> > >> >> As long as I do not have a lot of local changes this should not be a >> problem. >> >> best >> Rupert >> >> > BR, >> > David >> > >> > >> > On Sun, Jul 22, 2012 at 8:20 PM, Rupert Westenthaler >> > <[email protected]> wrote: >> >> >> >> 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 >> > >> > >> > >> > >> > -- >> > David Riccitelli >> > >> > >> ******************************************************************************** >> > InsideOut10 s.r.l. >> > P.IVA: IT-11381771002 >> > Fax: +39 0110708239 >> > --- >> > LinkedIn: http://it.linkedin.com/in/riccitelli >> > Twitter: ziodave >> > --- >> > Layar Partner Network >> > >> ******************************************************************************** >> > >> >> >> >> -- >> | Rupert Westenthaler [email protected] >> | Bodenlehenstraße 11 ++43-699-11108907 >> | A-5500 Bischofshofen >> > > > > -- > David Riccitelli > > > ******************************************************************************** > InsideOut10 s.r.l. > P.IVA: IT-11381771002 > Fax: +39 0110708239 > --- > LinkedIn: http://it.linkedin.com/in/riccitelli > Twitter: ziodave > --- > Layar Partner > Network<http://www.layar.com/publishing/developers/list/?page=1&country=&city=&keyword=insideout10&lpn=1> > > ******************************************************************************** > > -- David Riccitelli ******************************************************************************** InsideOut10 s.r.l. P.IVA: IT-11381771002 Fax: +39 0110708239 --- LinkedIn: http://it.linkedin.com/in/riccitelli Twitter: ziodave --- Layar Partner Network<http://www.layar.com/publishing/developers/list/?page=1&country=&city=&keyword=insideout10&lpn=1> ********************************************************************************
