jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r768954 [4/4] - in /jackrabbit/trunk: jackrabbit-api/src/main/java/org/apache/jackrabbit/api/jsr283/query/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query...
Date Mon, 27 Apr 2009 12:43:31 GMT
Added: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/DescendantNodeJoinConditionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/DescendantNodeJoinConditionTest.java?rev=768954&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/DescendantNodeJoinConditionTest.java
(added)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/DescendantNodeJoinConditionTest.java
Mon Apr 27 12:43:28 2009
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.api.jsr283.query.qom;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+
+import org.apache.jackrabbit.spi.commons.query.jsr283.qom.JoinCondition;
+import org.apache.jackrabbit.spi.commons.query.jsr283.qom.QueryObjectModel;
+
+/**
+ * <code>DescendantNodeJoinConditionTest</code> contains test cases that cover
+ * <code>DescendantNodeJoinCondition</code>.
+ */
+public class DescendantNodeJoinConditionTest extends AbstractJoinTest {
+
+    private Node n1;
+
+    private Node n2;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        n1 = testRootNode.addNode(nodeName1, testNodeType);
+        n2 = n1.addNode(nodeName2, testNodeType);
+        n2.addMixin(mixReferenceable);
+        testRootNode.save();
+    }
+
+    public void testInnerJoin() throws RepositoryException {
+        JoinCondition c = qomFactory.descendantNodeJoinCondition(LEFT, RIGHT);
+        QueryObjectModel qom = createQuery(JOIN_TYPE_INNER, c);
+        checkResult(qom.execute(), new Node[][]{{n2, n1}});
+    }
+
+    public void testRightOuterJoin() throws RepositoryException {
+        JoinCondition c = qomFactory.descendantNodeJoinCondition(LEFT, RIGHT);
+        QueryObjectModel qom = createQuery(JOIN_TYPE_RIGHT_OUTER, c);
+        checkResult(qom.execute(), new Node[][]{{n2, n1}, {null, n2}});
+    }
+
+    public void testLeftOuterJoin() throws RepositoryException {
+        JoinCondition c = qomFactory.descendantNodeJoinCondition(LEFT, RIGHT);
+        QueryObjectModel qom = createQuery(JOIN_TYPE_LEFT_OUTER, c);
+        List result = new ArrayList();
+        result.add(new Node[]{n2, n1});
+        // for each ancestor-or-self of testRootNode check
+        // whether it is of type testNodeType and add
+        // two matches in that case
+        Node n = testRootNode;
+        for (;;) {
+            if (n.isNodeType(testNodeType)) {
+                result.add(new Node[]{n1, n});
+                result.add(new Node[]{n2, n});
+            }
+            if (n.getDepth() == 0) {
+                break;
+            } else {
+                n = n.getParent();
+            }
+        }
+        if (result.size() == 1) {
+            // n1 not yet covered
+            result.add(new Node[]{n1, null});
+        }
+        checkResult(qom.execute(), (Node[][]) result.toArray(new Node[result.size()][]));
+    }
+}

Propchange: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/DescendantNodeJoinConditionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/DescendantNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/DescendantNodeTest.java?rev=768954&r1=768218&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/DescendantNodeTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/DescendantNodeTest.java
Mon Apr 27 12:43:28 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.core.query.qom;
+package org.apache.jackrabbit.api.jsr283.query.qom;
 
 import org.apache.jackrabbit.test.NotExecutableException;
 

Added: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/EquiJoinConditionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/EquiJoinConditionTest.java?rev=768954&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/EquiJoinConditionTest.java
(added)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/EquiJoinConditionTest.java
Mon Apr 27 12:43:28 2009
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.api.jsr283.query.qom;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+
+import org.apache.jackrabbit.spi.commons.query.jsr283.qom.QueryObjectModel;
+import org.apache.jackrabbit.spi.commons.query.jsr283.qom.JoinCondition;
+
+/**
+ * <code>EquiJoinConditionTest</code> contains test cases that cover
+ * <code>EquiJoinCondition</code>.
+ */
+public class EquiJoinConditionTest extends AbstractJoinTest {
+
+    private Node n1;
+
+    private Node n2;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        String value = createRandomString(10);
+        n1 = testRootNode.addNode(nodeName1, testNodeType);
+        n1.setProperty(propertyName1, value);
+
+        n2 = n1.addNode(nodeName2, testNodeType);
+        n2.setProperty(propertyName1, value);
+        n2.setProperty(propertyName2, value);
+        n2.addMixin(mixReferenceable);
+        testRootNode.save();
+    }
+
+    public void testInnerJoin1() throws RepositoryException {
+        JoinCondition c = qomFactory.equiJoinCondition(
+                LEFT, propertyName1, RIGHT, propertyName2);
+        QueryObjectModel qom = createQuery(JOIN_TYPE_INNER, c);
+        checkResult(qom.execute(), new Node[][]{{n1, n2}, {n2, n2}});
+    }
+
+    public void testInnerJoin2() throws RepositoryException {
+        JoinCondition c = qomFactory.equiJoinCondition(
+                LEFT, propertyName2, RIGHT, propertyName1);
+        QueryObjectModel qom = createQuery(JOIN_TYPE_INNER, c);
+        checkResult(qom.execute(), new Node[][]{{n2, n1}, {n2, n2}});
+    }
+
+    public void testRightOuterJoin1() throws RepositoryException {
+        JoinCondition c = qomFactory.equiJoinCondition(
+                LEFT, propertyName1, RIGHT, propertyName2);
+        QueryObjectModel qom = createQuery(JOIN_TYPE_RIGHT_OUTER, c);
+        checkResult(qom.execute(), new Node[][]{{null, n1}, {n1, n2}, {n2, n2}});
+    }
+
+    public void testRightOuterJoin2() throws RepositoryException {
+        JoinCondition c = qomFactory.equiJoinCondition(
+                LEFT, propertyName2, RIGHT, propertyName1);
+        QueryObjectModel qom = createQuery(JOIN_TYPE_RIGHT_OUTER, c);
+        checkResult(qom.execute(), new Node[][]{{n2, n1}, {n2, n2}});
+    }
+
+    public void testLeftOuterJoin1() throws RepositoryException {
+        JoinCondition c = qomFactory.equiJoinCondition(
+                LEFT, propertyName1, RIGHT, propertyName2);
+        QueryObjectModel qom = createQuery(JOIN_TYPE_LEFT_OUTER, c);
+        checkResult(qom.execute(), new Node[][]{{n1, n2}, {n2, n2}});
+    }
+
+
+    public void testLeftOuterJoin2() throws RepositoryException {
+        JoinCondition c = qomFactory.equiJoinCondition(
+                LEFT, propertyName2, RIGHT, propertyName1);
+        QueryObjectModel qom = createQuery(JOIN_TYPE_LEFT_OUTER, c);
+        checkResult(qom.execute(), new Node[][]{{n1, null}, {n2, n1}, {n2, n2}});
+    }
+}

Propchange: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/EquiJoinConditionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/LengthTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/LengthTest.java?rev=768954&r1=768218&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/LengthTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/LengthTest.java
Mon Apr 27 12:43:28 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.core.query.qom;
+package org.apache.jackrabbit.api.jsr283.query.qom;
 
 import org.apache.jackrabbit.test.NotExecutableException;
 
@@ -123,15 +123,6 @@
         // TODO
     }
 
-    public void testLike() throws RepositoryException {
-        try {
-            executeQuery(propertyName1, OPERATOR_LIKE, 1);
-            fail("Must throw InvalidQueryException when like operator is used with length
operand");
-        } catch (InvalidQueryException e) {
-            // expected
-        }
-    }
-
     //------------------------< conversion tests >------------------------------
 
     public void testLengthStringLiteral() throws RepositoryException {

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/NodeLocalNameTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/NodeLocalNameTest.java?rev=768954&r1=768218&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/NodeLocalNameTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/NodeLocalNameTest.java
Mon Apr 27 12:43:28 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.core.query.qom;
+package org.apache.jackrabbit.api.jsr283.query.qom;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/NodeNameTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/NodeNameTest.java?rev=768954&r1=768218&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/NodeNameTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/NodeNameTest.java
Mon Apr 27 12:43:28 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.core.query.qom;
+package org.apache.jackrabbit.api.jsr283.query.qom;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/PropertyExistenceTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/PropertyExistenceTest.java?rev=768954&r1=768218&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/PropertyExistenceTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/PropertyExistenceTest.java
Mon Apr 27 12:43:28 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.core.query.qom;
+package org.apache.jackrabbit.api.jsr283.query.qom;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Node;

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/QueryObjectModelFactoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/QueryObjectModelFactoryTest.java?rev=768954&r1=768218&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/QueryObjectModelFactoryTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/QueryObjectModelFactoryTest.java
Mon Apr 27 12:43:28 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.core.query.qom;
+package org.apache.jackrabbit.api.jsr283.query.qom;
 
 import org.apache.jackrabbit.spi.commons.query.jsr283.qom.And;
 import org.apache.jackrabbit.spi.commons.query.jsr283.qom.PropertyExistence;

Added: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SameNodeJoinConditionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SameNodeJoinConditionTest.java?rev=768954&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SameNodeJoinConditionTest.java
(added)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SameNodeJoinConditionTest.java
Mon Apr 27 12:43:28 2009
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.api.jsr283.query.qom;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Node;
+import javax.jcr.query.QueryResult;
+
+import org.apache.jackrabbit.spi.commons.query.jsr283.qom.QueryObjectModel;
+import org.apache.jackrabbit.spi.commons.query.jsr283.qom.JoinCondition;
+
+/**
+ * <code>SameNodeJoinConditionTest</code> contains test cases that cover
+ * <code>SameNodeJoinCondition</code>.
+ */
+public class SameNodeJoinConditionTest extends AbstractJoinTest {
+
+    private Node n1;
+
+    private Node n2;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        n1 = testRootNode.addNode(nodeName1, testNodeType);
+        n2 = n1.addNode(nodeName2, testNodeType);
+        n2.addMixin(mixReferenceable);
+        testRootNode.save();
+    }
+
+    public void testInnerJoin() throws RepositoryException {
+        QueryObjectModel qom = createQuery(JOIN_TYPE_INNER, (String) null);
+        QueryResult result = qom.execute();
+        checkResult(result, new Node[][]{{n1, n1}, {n2, n2}});
+    }
+
+    public void testInnerJoinWithPath() throws RepositoryException {
+        QueryObjectModel qom = createQuery(JOIN_TYPE_INNER, nodeName2);
+        QueryResult result = qom.execute();
+        checkResult(result, new Node[][]{{n2, n1}});
+    }
+
+    public void testLeftOuterJoin() throws RepositoryException {
+       QueryObjectModel qom = qomFactory.createQuery(
+               qomFactory.join(
+                        qomFactory.selector(testNodeType, LEFT),
+                        qomFactory.selector(mixReferenceable, RIGHT),
+                        JOIN_TYPE_LEFT_OUTER,
+                        qomFactory.sameNodeJoinCondition(LEFT, RIGHT)
+                ),
+               qomFactory.descendantNode(LEFT, testRoot),
+               null, null);
+
+        QueryResult result = qom.execute();
+        checkResult(result, new Node[][]{{n1, null}, {n2, n2}});
+    }
+
+    public void testLeftOuterJoinWithPath() throws RepositoryException {
+        QueryObjectModel qom = createQuery(JOIN_TYPE_LEFT_OUTER, nodeName2);
+        QueryResult result = qom.execute();
+        checkResult(result, new Node[][]{{n1, null}, {n2, n1}});
+    }
+
+    public void testRightOuterJoin() throws RepositoryException {
+        QueryObjectModel qom = qomFactory.createQuery(
+                qomFactory.join(
+                         qomFactory.selector(mixReferenceable, LEFT),
+                         qomFactory.selector(testNodeType, RIGHT),
+                         JOIN_TYPE_RIGHT_OUTER,
+                         qomFactory.sameNodeJoinCondition(LEFT, RIGHT)
+                 ),
+                qomFactory.descendantNode(RIGHT, testRoot),
+                null, null);
+
+        QueryResult result = qom.execute();
+        checkResult(result, new Node[][]{{null, n1}, {n2, n2}});
+    }
+
+    public void testRightOuterJoinWithPath() throws RepositoryException {
+        QueryObjectModel qom = qomFactory.createQuery(
+                qomFactory.join(
+                         qomFactory.selector(mixReferenceable, LEFT),
+                         qomFactory.selector(testNodeType, RIGHT),
+                         JOIN_TYPE_RIGHT_OUTER,
+                         qomFactory.sameNodeJoinCondition(LEFT, RIGHT, nodeName2)
+                 ),
+                qomFactory.descendantNode(RIGHT, testRoot),
+                null, null);
+
+        QueryResult result = qom.execute();
+        checkResult(result, new Node[][]{{n2, n1}, {null, n2}});
+    }
+
+    //-----------------------------< utilities >--------------------------------
+
+    private QueryObjectModel createQuery(int joinType, String relPath)
+            throws RepositoryException {
+        JoinCondition c;
+        if (relPath != null) {
+            c = qomFactory.sameNodeJoinCondition(LEFT, RIGHT, relPath);
+        } else {
+            c = qomFactory.sameNodeJoinCondition(LEFT, RIGHT);
+        }
+        return createQuery(joinType, c);
+    }
+}

Propchange: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SameNodeJoinConditionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SameNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SameNodeTest.java?rev=768954&r1=768218&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SameNodeTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SameNodeTest.java
Mon Apr 27 12:43:28 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.core.query.qom;
+package org.apache.jackrabbit.api.jsr283.query.qom;
 
 import org.apache.jackrabbit.test.NotExecutableException;
 

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SelectorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SelectorTest.java?rev=768954&r1=768218&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SelectorTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/SelectorTest.java
Mon Apr 27 12:43:28 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.core.query.qom;
+package org.apache.jackrabbit.api.jsr283.query.qom;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.NodeIterator;

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/TestAll.java?rev=768954&r1=768218&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/TestAll.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/TestAll.java
Mon Apr 27 12:43:28 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.core.query.qom;
+package org.apache.jackrabbit.api.jsr283.query.qom;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
@@ -30,13 +30,17 @@
         TestSuite suite = new TestSuite("QOM tests");
 
         suite.addTestSuite(BindVariableValueTest.class);
+        suite.addTestSuite(ChildNodeJoinConditionTest.class);
         suite.addTestSuite(ChildNodeTest.class);
+        suite.addTestSuite(DescendantNodeJoinConditionTest.class);
         suite.addTestSuite(DescendantNodeTest.class);
+        suite.addTestSuite(EquiJoinConditionTest.class);
         suite.addTestSuite(LengthTest.class);
         suite.addTestSuite(NodeLocalNameTest.class);
         suite.addTestSuite(NodeNameTest.class);
         suite.addTestSuite(PropertyExistenceTest.class);
         suite.addTestSuite(QueryObjectModelFactoryTest.class);
+        suite.addTestSuite(SameNodeJoinConditionTest.class); 
         suite.addTestSuite(SameNodeTest.class);
         suite.addTestSuite(SelectorTest.class);
         suite.addTestSuite(UpperLowerCaseTest.class);

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/UpperLowerCaseTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/UpperLowerCaseTest.java?rev=768954&r1=768218&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/UpperLowerCaseTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/query/qom/UpperLowerCaseTest.java
Mon Apr 27 12:43:28 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.core.query.qom;
+package org.apache.jackrabbit.api.jsr283.query.qom;
 
 import org.apache.jackrabbit.spi.commons.query.jsr283.qom.DynamicOperand;
 

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/ChildNodeJoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/ChildNodeJoinConditionImpl.java?rev=768954&r1=768953&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/ChildNodeJoinConditionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/ChildNodeJoinConditionImpl.java
Mon Apr 27 12:43:28 2009
@@ -64,6 +64,24 @@
         return getJCRName(parentSelectorName);
     }
 
+    /**
+     * Gets the name of the child selector.
+     *
+     * @return the selector name; non-null
+     */
+    public Name getChildSelectorQName() {
+        return childSelectorName;
+    }
+
+    /**
+     * Gets the name of the parent selector.
+     *
+     * @return the selector name; non-null
+     */
+    public Name getParentSelectorQName() {
+        return parentSelectorName;
+    }
+
     //------------------------< AbstractQOMNode >-------------------------------
 
     /**

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/DescendantNodeJoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/DescendantNodeJoinConditionImpl.java?rev=768954&r1=768953&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/DescendantNodeJoinConditionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/DescendantNodeJoinConditionImpl.java
Mon Apr 27 12:43:28 2009
@@ -64,6 +64,24 @@
         return getJCRName(ancestorSelectorName);
     }
 
+    /**
+     * Gets the name of the descendant selector.
+     *
+     * @return the selector name; non-null
+     */
+    public Name getDescendantSelectorQName() {
+        return descendantSelectorName;
+    }
+
+    /**
+     * Gets the name of the ancestor selector.
+     *
+     * @return the selector name; non-null
+     */
+    public Name getAncestorSelectorQName() {
+        return ancestorSelectorName;
+    }
+
     //------------------------< AbstractQOMNode >-------------------------------
 
     /**

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/EquiJoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/EquiJoinConditionImpl.java?rev=768954&r1=768953&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/EquiJoinConditionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/EquiJoinConditionImpl.java
Mon Apr 27 12:43:28 2009
@@ -114,6 +114,24 @@
         return selector2Name;
     }
 
+    /**
+     * Gets the property name in the first selector.
+     *
+     * @return the property name; non-null
+     */
+    public Name getProperty1QName() {
+        return property1Name;
+    }
+
+    /**
+     * Gets the property name in the second selector.
+     *
+     * @return the property name; non-null
+     */
+    public Name getProperty2QName() {
+        return property2Name;
+    }
+
     //------------------------< AbstractQOMNode >-------------------------------
 
     /**

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/SameNodeJoinConditionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/SameNodeJoinConditionImpl.java?rev=768954&r1=768953&r2=768954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/SameNodeJoinConditionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/SameNodeJoinConditionImpl.java
Mon Apr 27 12:43:28 2009
@@ -99,6 +99,15 @@
         return selector2Name;
     }
 
+    /**
+     * Gets the path relative to the second selector.
+     *
+     * @return the relative path, or null for none
+     */
+    public Path getSelector2QPath() {
+        return selector2Path;
+    }
+
     //------------------------< AbstractQOMNode >-------------------------------
 
     /**



Mime
View raw message