jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r572936 [1/2] - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283: ./ qom/
Date Wed, 05 Sep 2007 12:21:47 GMT
Author: mreutegg
Date: Wed Sep  5 05:21:44 2007
New Revision: 572936

URL: http://svn.apache.org/viewvc?rev=572936&view=rev
Log:
JCR-1104: JSR 283 support
- temporary JQOM interfaces

Added:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/PreparedQuery.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/And.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/BindVariableValue.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/ChildNode.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/ChildNodeJoinCondition.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Column.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Comparison.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Constraint.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DescendantNode.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DescendantNodeJoinCondition.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DynamicOperand.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/EquiJoinCondition.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/FullTextSearch.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/FullTextSearchScore.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Join.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/JoinCondition.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Length.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/LowerCase.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/NodeLocalName.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/NodeName.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Not.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Operand.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Or.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Ordering.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/PropertyExistence.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/PropertyValue.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/QueryObjectModel.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/QueryObjectModelConstants.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/QueryObjectModelFactory.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/SameNode.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/SameNodeJoinCondition.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Selector.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Source.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/StaticOperand.java   (with props)
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/UpperCase.java   (with props)

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/PreparedQuery.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/PreparedQuery.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/PreparedQuery.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/PreparedQuery.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,41 @@
+/*
+ * 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.core.query.jsr283;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.query.Query;
+
+/**
+ * A prepared query. A new prepared query is created by calling
+ * <code>QueryManager.createPreparedQuery</code>.
+ *
+ * @since JCR 2.0
+ */
+public interface PreparedQuery extends Query {
+
+    /**
+     * Binds the given <code>value</code> to the variable named <code>varName</code>.
+     *
+     * @param varName name of variable in query
+     * @param value value to bind
+     * @throws IllegalArgumentException if <code>varName</code> is not a valid variable in this query.
+     * @throws RepositoryException if an error occurs.
+     */
+    public void bindValue(String varName, Value value)
+            throws IllegalArgumentException, RepositoryException;
+}

Propchange: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/PreparedQuery.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/And.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/And.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/And.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/And.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,42 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Performs a logical conjunction of two other constraints.
+ * <p/>
+ * To satisfy the <code>And</code> constraint, a node-tuple must satisfy both
+ * {@link #getConstraint1 constraint1} and {@link #getConstraint2 constraint2}.
+ *
+ * @since JCR 2.0
+ */
+public interface And
+        extends Constraint {
+    /**
+     * Gets the first constraint.
+     *
+     * @return the constraint; non-null
+     */
+    public Constraint getConstraint1();
+
+    /**
+     * Gets the second constraint.
+     *
+     * @return the constraint; non-null
+     */
+    public Constraint getConstraint2();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/BindVariableValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/BindVariableValue.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/BindVariableValue.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/BindVariableValue.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,38 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Evaluates to the value of a bind variable.
+ * <p/>
+ * The query is invalid if no value is bound to
+ * {@link #getBindVariableName bindVariableName}.
+ * <p/>
+ * The query is invalid if {@link #getBindVariableName bindVariableName} is
+ * not a valid JCR prefix.
+ *
+ * @since JCR 2.0
+ */
+public interface BindVariableValue
+        extends StaticOperand {
+    /**
+     * Gets the name of the bind variable.
+     *
+     * @return the bind variable name; non-null
+     */
+    public String getBindVariableName();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/ChildNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/ChildNode.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/ChildNode.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/ChildNode.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,56 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Tests whether the {@link #getSelectorName selector} node is a child of a
+ * node reachable by absolute path {@link #getPath path}.
+ * <p/>
+ * A node-tuple satisfies the constraint only if:
+ * <pre>  selectorNode.getParent().isSame(session.getNode(path))</pre>
+ * would return true, where <code>selectorNode</code> is the node for the
+ * specified selector.
+ * <p/>
+ * The query is invalid if:
+ * <ul>
+ * <li>{@link #getSelectorName selector} is not the name of a selector in the
+ * query, or</li>
+ * <li>{@link #getPath path} is not a syntactically valid absolute path.  Note,
+ * however, that if the path is syntactically valid but does not identify a
+ * node in the repository (or the node is not visible to this session,
+ * because of access control constraints), the query is valid but the
+ * constraint is not satisfied.</li>
+ * </ul>
+ *
+ * @since JCR 2.0
+ */
+public interface ChildNode
+        extends Constraint {
+    /**
+     * Gets the name of the selector against which to apply this constraint.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelectorName();
+
+    /**
+     * Gets the absolute path.
+     *
+     * @return the path; non-null
+     */
+    public String getPath();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/ChildNodeJoinCondition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/ChildNodeJoinCondition.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/ChildNodeJoinCondition.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/ChildNodeJoinCondition.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,55 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Tests whether the {@link #getChildSelectorName childSelector} node is a child
+ * of the {@link #getParentSelectorName parentSelector} node.  A node-tuple
+ * satisfies the constraint only if:
+ * <pre>  childSelectorNode.getParent().isSame(parentSelectorNode)</pre>
+ * would return true, where <code>childSelectorNode</code> is the node for
+ * {@link #getChildSelectorName childSelector} and <code>parentSelectorNode</code>
+ * is the node for {@link #getParentSelectorName parentSelector}.
+ * <p/>
+ * The query is invalid if:
+ * <ul>
+ * <li>{@link #getChildSelectorName childSelector} is not the name of a
+ * selector in the query, or</li>
+ * <li>{@link #getParentSelectorName parentSelector} is not the name of a
+ * selector in the query, or</li>
+ * <li>{@link #getChildSelectorName childSelector} is the same as
+ * {@link #getParentSelectorName parentSelector}.
+ * </ul>
+ *
+ * @since JCR 2.0
+ */
+public interface ChildNodeJoinCondition
+        extends JoinCondition {
+    /**
+     * Gets the name of the child selector.
+     *
+     * @return the selector name; non-null
+     */
+    public String getChildSelectorName();
+
+    /**
+     * Gets the name of the parent selector.
+     *
+     * @return the selector name; non-null
+     */
+    public String getParentSelectorName();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Column.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Column.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Column.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Column.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,82 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Defines a column to include in the tabular view of query results.
+ * <p/>
+ * If {@link #getPropertyName property} is not specified, a column is included
+ * for each single-valued non-residual property of the node type specified by
+ * the <code>nodeType</code> attribute of {@link #getSelectorName selector}.
+ * <p/>
+ * If {@link #getPropertyName property} is specified,
+ * {@link #getColumnName columnName} is required and used to name the column
+ * in the tabular results.  If {@link #getPropertyName property} is not
+ * specified, {@link #getColumnName columnName} must not be specified, and
+ * the included columns will be named
+ * "{@link #getSelectorName selector}.<i>propertyName</i>".
+ * <p/>
+ * The query is invalid if:
+ * <ul>
+ * <li>{@link #getSelectorName selector} is not the name of a selector in the
+ * query, or</li>
+ * <li>{@link #getPropertyName property} is specified but it not a a
+ * syntactically valid JCR name, or</li>
+ * <li>{@link #getPropertyName property} is specified but does not evaluate to
+ * a scalar value, or</li>
+ * <li>{@link #getPropertyName property} is specified but
+ * {@link #getColumnName columnName} is omitted, or</li>
+ * <li>{@link #getPropertyName property} is omitted but
+ * {@link #getColumnName columnName} is specified, or</li>
+ * <li>the columns in the tabular view are not uniquely named, whether those
+ * column names are specified by {@link #getColumnName columnName} (if
+ * {@link #getPropertyName property} is specified) or generated as
+ * described above (if {@link #getPropertyName property} is omitted).</li>
+ * </ul>
+ * If {@link #getPropertyName property} is specified but, for a node-tuple, the
+ * selector node does not have a property named {@link #getPropertyName property},
+ * the query is valid and the column has null value.
+ *
+ * @since JCR 2.0
+ */
+public interface Column {
+    /**
+     * Gets the name of the selector.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelectorName();
+
+    /**
+     * Gets the name of the property.
+     *
+     * @return the property name, or null to include a column for
+     *         each single-value non-residual property of the
+     *         selector's node type
+     */
+    public String getPropertyName();
+
+    /**
+     * Gets the column name.
+     * <p/>
+     *
+     * @return the column name; must be null if
+     *         <code>getPropertyName</code> is null and non-null
+     *         otherwise
+     */
+    public String getColumnName();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Comparison.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Comparison.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Comparison.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Comparison.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,130 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Filters node-tuples based on the outcome of a binary operation.
+ * <p/>
+ * For any comparison, {@link #getOperand2 operand2} always evaluates to a
+ * scalar value.  In contrast, {@link #getOperand1 operand1} may evaluate to
+ * an array of values (for example, the value of a multi-valued property),
+ * in which case the comparison is separately performed for each element of
+ * the array, and the <code>Comparison</code> constraint is satisfied as a
+ * whole if the comparison against <i>any</i> element of the array is satisfied.
+ * <p/>
+ * If {@link #getOperand1 operand1} and {@link #getOperand2 operand2}
+ * evaluate to values of different property types, the value of
+ * {@link #getOperand2 operand2} is converted to the property type of
+ * the value of {@link #getOperand1 operand1}.  If the type conversion
+ * fails, the query is invalid.
+ * <p/>
+ * Certain operators may only be applied to values of certain property types.
+ * The following describes required operator support for each property type:
+ * <ul>
+ * <li><code>STRING</code><ul>
+ * <li><code>EqualTo</code>, <code>NotEqualTo</code>, <code>LessThan</code>,
+ * <code>LessThanOrEqualTo</code>, <code>GreaterThan</code>,
+ * <code>GreaterThanOrEqualTo</code>, <code>Like</code></li></ul></li>
+ * <li><code>BINARY</code><ul>
+ * <li>None</li></ul></li>
+ * <li><code>DATE</code>, <code>LONG</code>, <code>DOUBLE</code>,
+ * <code>DECIMAL</code><ul>
+ * <li><code>EqualTo</code>, <code>NotEqualTo</code>, <code>LessThan</code>,
+ * <code>LessThanOrEqualTo</code>, <code>GreaterThan</code>,
+ * <code>GreaterThanOrEqualTo</code></li></ul></li>
+ * <li><code>BOOLEAN</code>, <code>NAME</code>, <code>PATH</code>,
+ * <code>REFERENCE</code>, <code>WEAKREFERENCE</code>, <code>URI</code><ul>
+ * <li><code>EqualTo</code>, <code>NotEqualTo</code></li></ul></li>
+ * </ul>
+ * <p/>
+ * If {@link #getOperator operator} is not supported for the property type of
+ * {@link #getOperand1 operand1}, the query is invalid.
+ * <p/>
+ * If {@link #getOperand1 operand1} evaluates to null (for example, if the
+ * operand evaluates the value of a property which does not exist), the
+ * constraint is not satisfied.
+ * <p/>
+ * The <code>EqualTo</code> operator is satisfied <i>only if</i> the value of
+ * {@link #getOperand1 operand1} equals the value of
+ * {@link #getOperand2 operand2}.
+ * <p/>
+ * The <code>NotEqualTo</code> operator is satisfied <i>unless</i> the value of
+ * {@link #getOperand1 operand1} equals the value of
+ * {@link #getOperand2 operand2}.
+ * <p/>
+ * The <code>LessThan</code> operator is satisfied <i>only if</i> the value of
+ * {@link #getOperand1 operand1} is ordered <i>before</i> the value of
+ * {@link #getOperand2 operand2}.
+ * <p/>
+ * The <code>LessThanOrEqualTo</code> operator is satisfied <i>unless</i> the
+ * value of {@link #getOperand1 operand1} is ordered <i>after</i> the value of
+ * {@link #getOperand2 operand2}.
+ * <p/>
+ * The <code>GreaterThan</code> operator is satisfied <i>only if</i> the value
+ * of {@link #getOperand1 operand1} is ordered <i>after</i> the value of
+ * {@link #getOperand2 operand2}.
+ * <p/>
+ * The <code>GreaterThanOrEqualTo</code> operator is satisfied <i>unless</i> the
+ * value of {@link #getOperand1 operand1} is ordered <i>before</i> the value of
+ * {@link #getOperand2 operand2}.
+ * <p/>
+ * The <code>Like</code> operator is satisfied only if the value of
+ * {@link #getOperand1 operand1} <i>matches</i> the pattern specified by the
+ * value of {@link #getOperand2 operand2}, where in the pattern:
+ * <ul>
+ * <li>the character "<code>%</code>" matches zero or more characters, and</li>
+ * <li>the character "<code>_</code>" (underscore) matches exactly one
+ * character, and</li>
+ * <li>the string "<code>\<i>x</i></code>" matches the character
+ * "<code><i>x</i></code>", and</li>
+ * <li>all other characters match themselves.</li>
+ * </ul>
+ *
+ * @since JCR 2.0
+ */
+public interface Comparison
+        extends Constraint {
+    /**
+     * Gets the first operand.
+     *
+     * @return the operand; non-null
+     */
+    public DynamicOperand getOperand1();
+
+    /**
+     * Gets the operator.
+     *
+     * @return either
+     *         <ul>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_EQUAL_TO},</li>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_NOT_EQUAL_TO},</li>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_LESS_THAN},</li>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_LESS_THAN_OR_EQUAL_TO},</li>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_GREATER_THAN},</li>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_GREATER_THAN_OR_EQUAL_TO}, or</li>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_LIKE}</li>
+     *         </ul>
+     */
+    public int getOperator();
+
+    /**
+     * Gets the second operand.
+     *
+     * @return the operand; non-null
+     */
+    public StaticOperand getOperand2();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Constraint.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Constraint.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Constraint.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Constraint.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,29 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Filters the set of node-tuples formed by evaluating the query's selectors
+ * and the joins between them.
+ * <p/>
+ * To be included in the query results, a node-tuple must satisfy the
+ * constraint.
+ *
+ * @since JCR 2.0
+ */
+public interface Constraint {
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DescendantNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DescendantNode.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DescendantNode.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DescendantNode.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,58 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Tests whether the {@link #getSelectorName selector} node is a descendant
+ * of a node reachable by absolute path {@link #getPath path}.
+ * <p/>
+ * A node-tuple satisfies the constraint only if:
+ * <pre>  selectorNode.getAncestor(n).isSame(session.getNode(path)) &&
+ *     selectorNode.getDepth() > n</pre>
+ * would return true for some non-negative integer <code>n</code>, where
+ * {@link #getSelectorName selectorNode} is the node for the specified
+ * selector.
+ * <p/>
+ * The query is invalid if:
+ * <ul>
+ * <li>{@link #getSelectorName selector} is not the name of a selector in the
+ * query, or</li>
+ * <li>{@link #getPath path} is not a syntactically valid absolute path.  Note,
+ * however, that if the path is syntactically valid but does not identify a
+ * node in the repository (or the node is not visible to this session,
+ * because of access control constraints), the query is valid but the
+ * constraint is not satisfied.</li>
+ * </ul>
+ *
+ * @since JCR 2.0
+ */
+public interface DescendantNode
+        extends Constraint {
+    /**
+     * Gets the name of the selector against which to apply this constraint.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelectorName();
+
+    /**
+     * Gets the absolute path.
+     *
+     * @return the path; non-null
+     */
+    public String getPath();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DescendantNodeJoinCondition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DescendantNodeJoinCondition.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DescendantNodeJoinCondition.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DescendantNodeJoinCondition.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,58 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Tests whether the {@link #getDescendantSelectorName descendantSelector} node
+ * is a descendant of the {@link #getAncestorSelectorName ancestorSelector}
+ * node.  A node-tuple satisfies the constraint only if:
+ * <pre>  descendantSelectorNode.getAncestor(n).isSame(ancestorSelectorNode) &&
+ *     descendantSelectorNode.getDepth() > n</pre>
+ * would return true some some non-negative integer <code>n</code>, where
+ * <code>descendantSelectorNode</code> is the node for
+ * {@link #getDescendantSelectorName descendantSelector} and
+ * <code>ancestorSelectorNode</code> is the node for
+ * {@link #getAncestorSelectorName ancestorSelector}.
+ * <p/>
+ * The query is invalid if:
+ * <ul>
+ * <li>{@link #getDescendantSelectorName descendantSelector} is not the name
+ * of a selector in the query, or</li>
+ * <li>{@link #getAncestorSelectorName ancestorSelector} is not the name of a
+ * selector in the query, or</li>
+ * <li>{@link #getDescendantSelectorName descendantSelector} is the same as
+ * {@link #getAncestorSelectorName ancestorSelector}.
+ * </ul>
+ *
+ * @since JCR 2.0
+ */
+public interface DescendantNodeJoinCondition
+        extends JoinCondition {
+    /**
+     * Gets the name of the descendant selector.
+     *
+     * @return the selector name; non-null
+     */
+    public String getDescendantSelectorName();
+
+    /**
+     * Gets the name of the ancestor selector.
+     *
+     * @return the selector name; non-null
+     */
+    public String getAncestorSelectorName();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DynamicOperand.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DynamicOperand.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DynamicOperand.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/DynamicOperand.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,26 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * An operand whose value can only be determined in evaluating the query.
+ *
+ * @since JCR 2.0
+ */
+public interface DynamicOperand
+        extends Operand {
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/EquiJoinCondition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/EquiJoinCondition.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/EquiJoinCondition.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/EquiJoinCondition.java Wed Sep  5 05:21:44 2007
@@ -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.core.query.jsr283.qom;
+
+/**
+ * Tests whether the value of a property in a first selector is equal to the
+ * value of a property in a second selector.
+ * <p/>
+ * A node-tuple satisfies the constraint only if:
+ * <ul>
+ * <li>{@link #getSelector1Name selector1} has a property named
+ * {@link #getProperty1Name property1}, and</li>
+ * <li>{@link #getSelector2Name selector2} has a property named
+ * {@link #getProperty2Name property2}, and</li>
+ * <li>the value of {@link #getProperty1Name property1} equals the value of
+ * {@link #getProperty2Name property2}</li>
+ * </ul>
+ * <p/>
+ * The query is invalid if:
+ * <ul>
+ * <li>{@link #getSelector1Name selector1} is not the name of a selector in
+ * the query, or</li>
+ * <li>{@link #getSelector2Name selector2} is not the name of a selector in
+ * the query, or</li>
+ * <li>{@link #getSelector1Name selector1} is the same as
+ * {@link #getSelector2Name selector2}, or</li>
+ * <li>{@link #getProperty1Name property1} is not a syntactically valid JCR
+ * name, or</li>
+ * <li>{@link #getProperty2Name property2} is not a syntactically valid JCR
+ * name, or</li>
+ * <li>the value of {@link #getProperty1Name property1} is not the same
+ * property type as the name of {@link #getProperty2Name property2}, or</li>
+ * <li>{@link #getProperty1Name property1} is a multi-valued property, or</li>
+ * <li>{@link #getProperty2Name property2} is a multi-valued property, or</li>
+ * <li>{@link #getProperty1Name property1} is a <code>BINARY</code> property, or</li>
+ * <li>{@link #getProperty2Name property2} is a <code>BINARY</code> property.</li>
+ * </ul>
+ *
+ * @since JCR 2.0
+ */
+public interface EquiJoinCondition
+        extends JoinCondition {
+    /**
+     * Gets the name of the first selector.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelector1Name();
+
+    /**
+     * Gets the property name in the first selector.
+     *
+     * @return the property name; non-null
+     */
+    public String getProperty1Name();
+
+    /**
+     * Gets the name of the second selector.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelector2Name();
+
+    /**
+     * Gets the property name in the second selector.
+     *
+     * @return the property name; non-null
+     */
+    public String getProperty2Name();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/FullTextSearch.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/FullTextSearch.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/FullTextSearch.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/FullTextSearch.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,115 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Performs a full-text search.
+ * <p/>
+ * The full-text search expression is evaluated against the set of full-text
+ * indexed properties within the full-text search scope.  If
+ * {@link #getPropertyName property} is specified, the full-text search scope
+ * is the property of that name on the {@link #getSelectorName selector} node
+ * in the node-tuple; otherwise the full-text search scope is all properties
+ * of the {@link #getSelectorName selector} node (or, in some implementations,
+ * all properties in the node subtree).
+ * <p/>
+ * Which properties (if any) in a repository are full-text indexed is
+ * implementation determined.
+ * <p/>
+ * It is also implementation determined whether
+ * {@link #getFullTextSearchExpression fullTextSearchExpression} is
+ * independently evaluated against each full-text indexed property in the
+ * full-text search scope, or collectively evaluated against the set of such
+ * properties using some implementation-determined mechanism.
+ * <p/>
+ * Similarly, for multi-valued properties, it is implementation determined
+ * whether {@link #getFullTextSearchExpression fullTextSearchExpression} is
+ * independently evaluated against each element in the array of values, or
+ * collectively evaluated against the array of values using some
+ * implementation-determined mechanism.
+ * <p/>
+ * At minimum, an implementation must support the following
+ * {@link #getFullTextSearchExpression fullTextSearchExpression} grammar:
+ * <pre>  fullTextSearchExpression ::= [-]term {whitespace [OR] whitespace [-]term}
+ * <p/>
+ *  term ::= word | '"' word {whitespace word} '"'
+ * <p/>
+ *  word ::= (A string containing no whitespace)
+ * <p/>
+ *  whitespace ::= (A string of only whitespace)
+ * </pre>
+ * <p/>
+ * A query satisfies a <code>FullTextSearch</code> constraint if the
+ * value (or values) of the full-text indexed properties within the
+ * full-text search scope satisfy the specified
+ * {@link #getFullTextSearchExpression fullTextSearchExpression},
+ * evaluated as follows:
+ * <ul>
+ * <li>A term not preceded with "<code>-</code>" (minus sign) is satisfied
+ * only if the value contains that term.</li>
+ * <li>A term preceded with "<code>-</code>" (minus sign) is satisfied only
+ * if the value does not contain that term.</li>
+ * <li>Terms separated by whitespace are implicitly "ANDed".</li>
+ * <li>Terms separated by "<code>OR</code>" are "ORed".</li>
+ * <li>"AND" has higher precedence than "OR".
+ * <li>Within a term, each double quote (<code>"</code>), "<code>-</code>"
+ * (minus sign), and "<code>\</code>" (backslash) must be escaped by a
+ * preceding "<code>\</code>" (backslash).</li>
+ * </ul>
+ * <p/>
+ * The query is invalid if:
+ * <ul>
+ * <li>{@link #getSelectorName selector} is not the name of a selector in the
+ * query, or</li>
+ * <li>{@link #getPropertyName property} is specified but is not a syntactically
+ * valid JCR name, or</li>
+ * <li>{@link #getFullTextSearchExpression fullTextSearchExpression} does not
+ * conform to the above grammar (as augmented by the implementation).</li>
+ * </ul>
+ * <p/>
+ * If {@link #getPropertyName property} is specified but, for a node-tuple,
+ * the selector node does not have a property named {@link #getPropertyName
+ * property}, the query is valid but the constraint is not satisfied.</li>
+ *
+ * @since JCR 2.0
+ */
+public interface FullTextSearch
+        extends Constraint {
+    /**
+     * Gets the name of the selector against which to apply this constraint.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelectorName();
+
+    /**
+     * Gets the name of the property.
+     *
+     * @return the property name if the full-text search scope
+     *         is a property, otherwise null if the full-text
+     *         search scope is the node (or node subtree, in
+     *         some implementations).
+     */
+    public String getPropertyName();
+
+    /**
+     * Gets the full-text search expression.
+     *
+     * @return the full-text search expression; non-null
+     */
+    public String getFullTextSearchExpression();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/FullTextSearchScore.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/FullTextSearchScore.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/FullTextSearchScore.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/FullTextSearchScore.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,44 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Evaluates to a <code>DOUBLE</code> value equal to the full-text search score
+ * of a node.
+ * <p/>
+ * Full-text search score ranks a selector's nodes by their relevance to the
+ * <code>fullTextSearchExpression</code> specified in a {@link FullTextSearch}.
+ * The values to which <code>FullTextSearchScore</code> evaluates and the
+ * interpretation of those values are implementation specific.
+ * <code>FullTextSearchScore</code> may evaluate to a constant value in a
+ * repository that does not support full-text search scoring or has no
+ * full-text indexed properties.
+ * <p/>
+ * The query is invalid if {@link #getSelectorName selector} is not the name
+ * of a selector in the query.
+ *
+ * @since JCR 2.0
+ */
+public interface FullTextSearchScore
+        extends DynamicOperand {
+    /**
+     * Gets the name of the selector against which to evaluate this operand.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelectorName();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Join.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Join.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Join.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Join.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,61 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Performs a join between two node-tuple sources.
+ * <p/>
+ * The query is invalid if {@link #getLeft left} is the same source as
+ * {@link #getRight right}.
+ *
+ * @since JCR 2.0
+ */
+public interface Join
+        extends Source {
+    /**
+     * Gets the left node-tuple source.
+     *
+     * @return the left source; non-null
+     */
+    public Source getLeft();
+
+    /**
+     * Gets the right node-tuple source.
+     *
+     * @return the right source; non-null
+     */
+    public Source getRight();
+
+    /**
+     * Gets the join type.
+     *
+     * @return either
+     *         <ul>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#JOIN_TYPE_INNER},</li>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#JOIN_TYPE_LEFT_OUTER},</li>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#JOIN_TYPE_RIGHT_OUTER}</li>
+     *         </ul>
+     */
+    public int getJoinType();
+
+    /**
+     * Gets the join condition.
+     *
+     * @return the join condition; non-null
+     */
+    public JoinCondition getJoinCondition();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/JoinCondition.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/JoinCondition.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/JoinCondition.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/JoinCondition.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,25 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Filters the set of node-tuples fromed from a {@link Join join}.
+ *
+ * @since JCR 2.0
+ */
+public interface JoinCondition {
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Length.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Length.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Length.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Length.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,39 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Evaluates to the length (or lengths, if multi-valued) of a property.
+ * <p/>
+ * The length is computed as though the <code>getLength</code> method (or
+ * <code>getLengths</code>, if multi-valued) of <code>javax.jcr.Property</code>
+ * were called.
+ * <p/>
+ * If {@link #getPropertyValue propertyValue} evaluates to null, the
+ * <code>Length</code> operand also evaluates to null.
+ *
+ * @since JCR 2.0
+ */
+public interface Length
+        extends DynamicOperand {
+    /**
+     * Gets the property value for which to compute the length.
+     *
+     * @return the property value; non-null
+     */
+    public PropertyValue getPropertyValue();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/LowerCase.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/LowerCase.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/LowerCase.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/LowerCase.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,41 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Evaluates to the lower-case string value (or values, if multi-valued) of
+ * {@link #getOperand operand}.
+ * <p/>
+ * If {@link #getOperand operand} does not evaluate to a string value, its
+ * value is first converted to a string.  The lower-case string value is
+ * computed as though the <code>toLowerCase()</code> method of
+ * <code>java.lang.String</code> were called.
+ * <p/>
+ * If {@link #getOperand operand} evaluates to null, the <code>LowerCase</code>
+ * operand also evaluates to null.
+ *
+ * @since JCR 2.0
+ */
+public interface LowerCase
+        extends DynamicOperand {
+    /**
+     * Gets the operand whose value is converted to a lower-case string.
+     *
+     * @return the operand; non-null
+     */
+    public DynamicOperand getOperand();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/NodeLocalName.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/NodeLocalName.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/NodeLocalName.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/NodeLocalName.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,36 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Evaluates to a <code>NAME</code> value equal to the local (unprefixed) name
+ * of a node.
+ * <p/>
+ * The query is invalid if {@link #getSelectorName selector} is not the name of
+ * a selector in the query.
+ *
+ * @since JCR 2.0
+ */
+public interface NodeLocalName
+        extends DynamicOperand {
+    /**
+     * Gets the name of the selector against which to evaluate this operand.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelectorName();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/NodeName.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/NodeName.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/NodeName.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/NodeName.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,36 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Evaluates to a <code>NAME</code> value equal to the namespace-qualified
+ * name of a node.
+ * <p/>
+ * The query is invalid if {@link #getSelectorName selector} is not the name
+ * of a selector in the query.
+ *
+ * @since JCR 2.0
+ */
+public interface NodeName
+        extends DynamicOperand {
+    /**
+     * Gets the name of the selector against which to evaluate this operand.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelectorName();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Not.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Not.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Not.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Not.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,35 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Performs a logical negation of another constraint.
+ * <p/>
+ * To satisfy the <code>Not</code> constraint, the node-tuple must <i>not</i>
+ * satisfy {@link #getConstraint constraint}.
+ *
+ * @since JCR 2.0
+ */
+public interface Not
+        extends Constraint {
+    /**
+     * Gets the constraint negated by this <code>Not</code> constraint.
+     *
+     * @return the constraint; non-null
+     */
+    public Constraint getConstraint();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Operand.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Operand.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Operand.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Operand.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,25 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * An operand to a binary operation specified by a {@link Comparison}.
+ *
+ * @since JCR 2.0
+ */
+public interface Operand {
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Or.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Or.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Or.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Or.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,49 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Performs a logical disjunction of two other constraints.
+ * <p/>
+ * To satisfy the <code>Or</code> constraint, the node-tuple must either:
+ * <ul>
+ * <li>satisfy {@link #getConstraint1 constraint1} but not
+ * {@link #getConstraint2 constraint2}, or</li>
+ * <li>satisfy {@link #getConstraint2 constraint2} but not
+ * {@link #getConstraint1 constraint1}, or</li>
+ * <li>satisfy both {@link #getConstraint1 constraint1} and
+ * {@link #getConstraint2 constraint2}.</li>
+ * </ul>
+ *
+ * @since JCR 2.0
+ */
+public interface Or
+        extends Constraint {
+    /**
+     * Gets the first constraint.
+     *
+     * @return the constraint; non-null
+     */
+    public Constraint getConstraint1();
+
+    /**
+     * Gets the second constraint.
+     *
+     * @return the constraint; non-null
+     */
+    public Constraint getConstraint2();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Ordering.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Ordering.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Ordering.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/Ordering.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,79 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Determines the relative order of two node-tuples by evaluating
+ * {@link #getOperand operand} for each.
+ * <p/>
+ * For a first node-tuple, <code>nt1</code>, for which {@link #getOperand operand}
+ * evaluates to <code>v1</code>, and a second node-tuple, <code>nt2</code>, for
+ * which {@link #getOperand operand} evaluates to <code>v2</code>:
+ * <ul>
+ * <li>If {@link #getOrder order} is <code>Ascending</code>, then:<ul>
+ * <li>if either <code>v1</code> is null, <code>v2</code> is null, or both
+ * <code>v1</code> and <code>v2</code> are null, the relative order of
+ * <code>nt1</code> and <code>nt2</code> is implementation determined,
+ * otherwise</li>
+ * <li>if <code>v1</code> is a different property type than <code>v2</code>,
+ * the relative order of <code>nt1</code> and <code>nt2</code> is
+ * implementation determined, otherwise</li>
+ * <li>if <code>v1</code> is ordered before <code>v2</code>, then
+ * <code>nt1</code> precedes <code>nt2</code>, otherwise</li>
+ * <li>if <code>v1</code> is ordered after <code>v2</code>, then
+ * <code>nt2</code> precedes <code>nt1</code>, otherwise</li>
+ * <li>the relative order of <code>nt1</code> and <code>nt2</code> is
+ * implementation determined and may be arbitrary.</li></ul></li>
+ * <li>Otherwise, if {@link #getOrder order} is <code>Descending</code>, then:<ul>
+ * <li>if either <code>v1</code> is null, <code>v2</code> is null, or both
+ * <code>v1</code> and <code>v2</code> are null, the relative order of
+ * <code>nt1</code> and <code>nt2</code> is implementation determined,
+ * otherwise</li>
+ * <li>if <code>v1</code> is a different property type than <code>v2</code>,
+ * the relative order of <code>nt1</code> and <code>nt2</code> is
+ * implementation determined, otherwise</li>
+ * <li>if <code>v1</code> is ordered before <code>v2</code>, then
+ * <code>nt2</code> precedes <code>nt1</code>, otherwise</li>
+ * <li>if <code>v1</code> is ordered after <code>v2</code>, then
+ * <code>nt1</code> precedes <code>nt2</code>, otherwise</li>
+ * <li>the relative order of <code>nt1</code> and <code>nt2</code> is
+ * implementation determined and may be arbitrary.</li></ul></li>
+ * </ul>
+ * The query is invalid if {@link #getOperand operand} does not evaluate to a
+ * scalar value.
+ *
+ * @since JCR 2.0
+ */
+public interface Ordering {
+    /**
+     * The operand by which to order.
+     *
+     * @return the operand; non-null
+     */
+    public DynamicOperand getOperand();
+
+    /**
+     * Gets the order.
+     *
+     * @return either
+     *         <ul>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#ORDER_ASCENDING} or</li>
+     *         <li>{@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#ORDER_DESCENDING}</li>
+     *         </ul>
+     */
+    public int getOrder();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/PropertyExistence.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/PropertyExistence.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/PropertyExistence.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/PropertyExistence.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,50 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Tests the existence of a property.
+ * <p/>
+ * A node-tuple satisfies the constraint if the selector node has a property
+ * named {@link #getPropertyName property}.
+ * <p/>
+ * The query is invalid if:
+ * <ul>
+ * <li>{@link #getSelectorName selector} is not the name of a selector in the
+ * query, or</li>
+ * <li>{@link #getPropertyName property} is not a syntactically valid JCR
+ * name.</li>
+ * </ul>
+ *
+ * @since JCR 2.0
+ */
+public interface PropertyExistence
+        extends Constraint {
+    /**
+     * Gets the name of the selector against which to apply this constraint.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelectorName();
+
+    /**
+     * Gets the name of the property.
+     *
+     * @return the property name; non-null
+     */
+    public String getPropertyName();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/PropertyValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/PropertyValue.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/PropertyValue.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/PropertyValue.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,51 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+/**
+ * Evaluates to the value (or values, if multi-valued) of a property.
+ * <p/>
+ * If, for a node-tuple, the {@link #getSelectorName selector} node does not
+ * have a property named {@link #getPropertyName property}, the operand
+ * evaluates to null.
+ * <p/>
+ * The query is invalid if:
+ * <ul>
+ * <li>{@link #getSelectorName selector} is not the name of a selector in the
+ * query, or</li>
+ * <li>{@link #getPropertyName property} is not a syntactically valid JCR
+ * name.</li>
+ * </ul>
+ *
+ * @since JCR 2.0
+ */
+public interface PropertyValue
+        extends DynamicOperand {
+    /**
+     * Gets the name of the selector against which to evaluate this operand.
+     *
+     * @return the selector name; non-null
+     */
+    public String getSelectorName();
+
+    /**
+     * Gets the name of the property.
+     *
+     * @return the property name; non-null
+     */
+    public String getPropertyName();
+}

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

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/QueryObjectModel.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/QueryObjectModel.java?rev=572936&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/QueryObjectModel.java (added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/jsr283/qom/QueryObjectModel.java Wed Sep  5 05:21:44 2007
@@ -0,0 +1,87 @@
+/*
+ * 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.core.query.jsr283.qom;
+
+import org.apache.jackrabbit.core.query.jsr283.PreparedQuery;
+
+/**
+ * A query in the JCR query object model.
+ * <p/>
+ * The JCR query object model describes the queries that can be evaluated
+ * by a JCR repository independent of any particular query language, such
+ * as SQL.
+ * <p/>
+ * A query consists of:
+ * <ul>
+ * <li>a source.  When the query is evaluated, the source evaluates its
+ * selectors and the joins between them to produce a (possibly empty)
+ * set of node-tuples.  This is a set of 1-tuples if the query has one
+ * selector (and therefore no joins), a set of 2-tuples if the query has
+ * two selectors (and therefore one join), a set of 3-tuples if the query
+ * has three selectors (two joins), and so forth.</li>
+ * <li>an optional constraint.  When the query is evaluated, the constraint
+ * filters the set of node-tuples.</li>
+ * <li>a list of zero or more orderings.  The orderings specify the order in
+ * which the node-tuples appear in the query results.  The relative order
+ * of two node-tuples is determined by evaluating the specified orderings,
+ * in list order, until encountering an ordering for which one node-tuple
+ * precedes the other.  If no orderings are specified, or if for none of
+ * the specified orderings does one node-tuple precede the other, then the
+ * relative order of the node-tuples is implementation determined (and may
+ * be arbitrary).</li>
+ * <li>a list of zero or more columns to include in the tabular view of the
+ * query results.  If no columns are specified, the columns available in
+ * the tabular view are implementation determined, but minimally include,
+ * for each selector, a column for each single-valued non-residual property
+ * of the selector's node type.</li>
+ * </ul>
+ * <p/>
+ * The query object model representation of a query is created by factory
+ * methods in the {@link QueryObjectModelFactory}.
+ *
+ * @since JCR 2.0
+ */
+public interface QueryObjectModel
+        extends PreparedQuery {
+    /**
+     * Gets the node-tuple source for this query.
+     *
+     * @return the node-tuple source; non-null
+     */
+    public Source getSource();
+
+    /**
+     * Gets the constraint for this query.
+     *
+     * @return the constraint, or null if none
+     */
+    public Constraint getConstraint();
+
+    /**
+     * Gets the orderings for this query.
+     *
+     * @return an array of zero or more orderings; non-null
+     */
+    public Ordering[] getOrderings();
+
+    /**
+     * Gets the columns for this query.
+     *
+     * @return an array of zero or more columns; non-null
+     */
+    public Column[] getColumns();
+}

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



Mime
View raw message