@@ -0,0 +1,1520 @@
+/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0A%0Apackage org.caboto.security.sparql;%0A%0Aimport com.hp.hpl.jena.query.QueryFactory;%0Aimport com.hp.hpl.jena.query.Query;%0Aimport com.hp.hpl.jena.sparql.algebra.Algebra;%0Aimport com.hp.hpl.jena.sparql.algebra.Op;%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.*;%0A%0A/**%0A *%0A * @author pldms%0A */%0Apublic class DereifierTest %7B%0A%0A%0A    @Test%0A    public void testTransform() %7B%0A        Op toTransform = Algebra.parse(%0A                  %22(bgp %22%0A                + %22(triple %3Ca%3E %3Cp%3E ??0) %22%0A                + %22(triple ??0 %3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns#first%3E %3Cc%3E) %22%0A                + %22(triple ??0 %3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns#rest%3E %3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns#nil%3E) %22%0A                + %22)%22%0A        );%0A        Op got = Dereifier.apply(toTransform);%0A        Op expected = Algebra.parse(%0A                  %22(bgp %22%0A                + %22(triple ?vanno1 %3Chttp://www.w3.org/2000/10/annotation-ns#annotates%3E %3Ca%3E) %22%0A                + %22(triple ?vanno1 %3Chttp://www.w3.org/2000/10/annotation-ns#body%3E ?vbody1) %22%0A                + %22(triple ?vbody1 %3Cp%3E ??0) %22%0A                + %22(triple ??0 %3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns#first%3E %3Cc%3E) %22%0A                + %22(triple ??0 %3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns#rest%3E %3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns#nil%3E) %22%0A                + %22)%22%0A        );%0A        assertEquals(expected, got);%0A    %7D%0A%0A    @Test%0A    public void testApply() %7B%0A    %7D%0A%0A%7D

hg merge is odd