Return-Path: Delivered-To: apmail-incubator-clerezza-dev-archive@minotaur.apache.org Received: (qmail 69145 invoked from network); 15 Dec 2009 15:44:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Dec 2009 15:44:41 -0000 Received: (qmail 62153 invoked by uid 500); 15 Dec 2009 15:44:41 -0000 Delivered-To: apmail-incubator-clerezza-dev-archive@incubator.apache.org Received: (qmail 62116 invoked by uid 500); 15 Dec 2009 15:44:40 -0000 Mailing-List: contact clerezza-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: clerezza-dev@incubator.apache.org Delivered-To: mailing list clerezza-dev@incubator.apache.org Received: (qmail 62068 invoked by uid 99); 15 Dec 2009 15:44:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Dec 2009 15:44:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Dec 2009 15:44:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3300429A0018 for ; Tue, 15 Dec 2009 07:44:18 -0800 (PST) Message-ID: <820109424.1260891858207.JavaMail.jira@brutus> Date: Tue, 15 Dec 2009 15:44:18 +0000 (UTC) From: =?utf-8?Q?Reto_Bachmann-Gm=C3=BCr_=28JIRA=29?= To: clerezza-dev@incubator.apache.org Subject: [jira] Closed: (CLEREZZA-33) serialization of sparql query containing filter with regex fails In-Reply-To: <1276516190.1260880758128.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CLEREZZA-33?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Reto Bachmann-Gm=C3=BCr closed CLEREZZA-33. -------------------------------------- > serialization of sparql query containing filter with regex fails > ---------------------------------------------------------------- > > Key: CLEREZZA-33 > URL: https://issues.apache.org/jira/browse/CLEREZZA-33 > Project: Clerezza > Issue Type: Bug > Reporter: Hasan > Assignee: Hasan > > The following test fails > =09@Test > =09public void testRegex() { > =09=09final String queryString =3D "SELECT ?p WHERE { " + > =09=09=09=09" ?p ?x . " + > =09=09=09=09"FILTER REGEX(?x,\".*uni.*\"^^) }"; > =09=09Variable p =3D new Variable("p"); > =09=09SimpleSelectQuery selectQuery =3D new SimpleSelectQuery(); > =09=09selectQuery.addSelection(p); > =09=09Variable x =3D new Variable("x"); > =09=09Set triplePatterns =3D new HashSet(); > =09=09triplePatterns.add(new SimpleTriplePattern( > =09=09=09=09new UriRef("http://localhost/testitem"), p, x)); > =09=09SimpleBasicGraphPattern bgp =3D new SimpleBasicGraphPattern(tripleP= atterns); > =09=09SimpleGroupGraphPattern queryPattern =3D new SimpleGroupGraphPatter= n(); > =09=09queryPattern.addGraphPattern(bgp); > =09=09List arguments =3D new ArrayList(); > =09=09arguments.add(x); > =09=09arguments.add(new LiteralExpression(LiteralFactory.getInstance(). > =09=09=09=09createTypedLiteral(".*uni.*"))); > =09=09BuiltInCall constraint =3D new BuiltInCall("REGEX", arguments); > =09=09queryPattern.addConstraint(constraint); > =09=09selectQuery.setQueryPattern(queryPattern); > =09=09Assert.assertTrue(selectQuery.toString() > =09=09=09=09.replaceAll("( |\n)+", " ").trim().equals(queryString)); > =09} --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.