Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 15569 invoked from network); 5 Sep 2007 12:22:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2007 12:22:48 -0000 Received: (qmail 88106 invoked by uid 500); 5 Sep 2007 12:22:37 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 88064 invoked by uid 500); 5 Sep 2007 12:22:37 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 88027 invoked by uid 99); 5 Sep 2007 12:22:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 05:22:37 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 12:23:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 11B3E1A9832; Wed, 5 Sep 2007 05:22:11 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@jackrabbit.apache.org From: mreutegg@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070905122211.11B3E1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 + * QueryManager.createPreparedQuery. + * + * @since JCR 2.0 + */ +public interface PreparedQuery extends Query { + + /** + * Binds the given value to the variable named varName. + * + * @param varName name of variable in query + * @param value value to bind + * @throws IllegalArgumentException if varName 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. + *

+ * To satisfy the And 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. + *

+ * The query is invalid if no value is bound to + * {@link #getBindVariableName bindVariableName}. + *

+ * 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}. + *

+ * A node-tuple satisfies the constraint only if: + *

  selectorNode.getParent().isSame(session.getNode(path))
+ * would return true, where selectorNode is the node for the + * specified selector. + *

+ * The query is invalid if: + *

    + *
  • {@link #getSelectorName selector} is not the name of a selector in the + * query, or
  • + *
  • {@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.
  • + *
+ * + * @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: + *
  childSelectorNode.getParent().isSame(parentSelectorNode)
+ * would return true, where childSelectorNode is the node for + * {@link #getChildSelectorName childSelector} and parentSelectorNode + * is the node for {@link #getParentSelectorName parentSelector}. + *

+ * The query is invalid if: + *

    + *
  • {@link #getChildSelectorName childSelector} is not the name of a + * selector in the query, or
  • + *
  • {@link #getParentSelectorName parentSelector} is not the name of a + * selector in the query, or
  • + *
  • {@link #getChildSelectorName childSelector} is the same as + * {@link #getParentSelectorName parentSelector}. + *
+ * + * @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. + *

+ * 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 nodeType attribute of {@link #getSelectorName selector}. + *

+ * 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}.propertyName". + *

+ * The query is invalid if: + *

    + *
  • {@link #getSelectorName selector} is not the name of a selector in the + * query, or
  • + *
  • {@link #getPropertyName property} is specified but it not a a + * syntactically valid JCR name, or
  • + *
  • {@link #getPropertyName property} is specified but does not evaluate to + * a scalar value, or
  • + *
  • {@link #getPropertyName property} is specified but + * {@link #getColumnName columnName} is omitted, or
  • + *
  • {@link #getPropertyName property} is omitted but + * {@link #getColumnName columnName} is specified, or
  • + *
  • 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).
  • + *
+ * 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. + *

+ * + * @return the column name; must be null if + * getPropertyName 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. + *

+ * 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 Comparison constraint is satisfied as a + * whole if the comparison against any element of the array is satisfied. + *

+ * 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. + *

+ * Certain operators may only be applied to values of certain property types. + * The following describes required operator support for each property type: + *

    + *
  • STRING
      + *
    • EqualTo, NotEqualTo, LessThan, + * LessThanOrEqualTo, GreaterThan, + * GreaterThanOrEqualTo, Like
  • + *
  • BINARY
      + *
    • None
  • + *
  • DATE, LONG, DOUBLE, + * DECIMAL
      + *
    • EqualTo, NotEqualTo, LessThan, + * LessThanOrEqualTo, GreaterThan, + * GreaterThanOrEqualTo
  • + *
  • BOOLEAN, NAME, PATH, + * REFERENCE, WEAKREFERENCE, URI
      + *
    • EqualTo, NotEqualTo
  • + *
+ *

+ * If {@link #getOperator operator} is not supported for the property type of + * {@link #getOperand1 operand1}, the query is invalid. + *

+ * 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. + *

+ * The EqualTo operator is satisfied only if the value of + * {@link #getOperand1 operand1} equals the value of + * {@link #getOperand2 operand2}. + *

+ * The NotEqualTo operator is satisfied unless the value of + * {@link #getOperand1 operand1} equals the value of + * {@link #getOperand2 operand2}. + *

+ * The LessThan operator is satisfied only if the value of + * {@link #getOperand1 operand1} is ordered before the value of + * {@link #getOperand2 operand2}. + *

+ * The LessThanOrEqualTo operator is satisfied unless the + * value of {@link #getOperand1 operand1} is ordered after the value of + * {@link #getOperand2 operand2}. + *

+ * The GreaterThan operator is satisfied only if the value + * of {@link #getOperand1 operand1} is ordered after the value of + * {@link #getOperand2 operand2}. + *

+ * The GreaterThanOrEqualTo operator is satisfied unless the + * value of {@link #getOperand1 operand1} is ordered before the value of + * {@link #getOperand2 operand2}. + *

+ * The Like operator is satisfied only if the value of + * {@link #getOperand1 operand1} matches the pattern specified by the + * value of {@link #getOperand2 operand2}, where in the pattern: + *

    + *
  • the character "%" matches zero or more characters, and
  • + *
  • the character "_" (underscore) matches exactly one + * character, and
  • + *
  • the string "\x" matches the character + * "x", and
  • + *
  • all other characters match themselves.
  • + *
+ * + * @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 + *
    + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_EQUAL_TO},
  • + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_NOT_EQUAL_TO},
  • + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_LESS_THAN},
  • + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_LESS_THAN_OR_EQUAL_TO},
  • + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_GREATER_THAN},
  • + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_GREATER_THAN_OR_EQUAL_TO}, or
  • + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#OPERATOR_LIKE}
  • + *
+ */ + 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. + *

+ * 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}. + *

+ * A node-tuple satisfies the constraint only if: + *

  selectorNode.getAncestor(n).isSame(session.getNode(path)) &&
+ *     selectorNode.getDepth() > n
+ * would return true for some non-negative integer n, where + * {@link #getSelectorName selectorNode} is the node for the specified + * selector. + *

+ * The query is invalid if: + *

    + *
  • {@link #getSelectorName selector} is not the name of a selector in the + * query, or
  • + *
  • {@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.
  • + *
+ * + * @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: + *
  descendantSelectorNode.getAncestor(n).isSame(ancestorSelectorNode) &&
+ *     descendantSelectorNode.getDepth() > n
+ * would return true some some non-negative integer n, where + * descendantSelectorNode is the node for + * {@link #getDescendantSelectorName descendantSelector} and + * ancestorSelectorNode is the node for + * {@link #getAncestorSelectorName ancestorSelector}. + *

+ * The query is invalid if: + *

    + *
  • {@link #getDescendantSelectorName descendantSelector} is not the name + * of a selector in the query, or
  • + *
  • {@link #getAncestorSelectorName ancestorSelector} is not the name of a + * selector in the query, or
  • + *
  • {@link #getDescendantSelectorName descendantSelector} is the same as + * {@link #getAncestorSelectorName ancestorSelector}. + *
+ * + * @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. + *

+ * A node-tuple satisfies the constraint only if: + *

    + *
  • {@link #getSelector1Name selector1} has a property named + * {@link #getProperty1Name property1}, and
  • + *
  • {@link #getSelector2Name selector2} has a property named + * {@link #getProperty2Name property2}, and
  • + *
  • the value of {@link #getProperty1Name property1} equals the value of + * {@link #getProperty2Name property2}
  • + *
+ *

+ * The query is invalid if: + *

    + *
  • {@link #getSelector1Name selector1} is not the name of a selector in + * the query, or
  • + *
  • {@link #getSelector2Name selector2} is not the name of a selector in + * the query, or
  • + *
  • {@link #getSelector1Name selector1} is the same as + * {@link #getSelector2Name selector2}, or
  • + *
  • {@link #getProperty1Name property1} is not a syntactically valid JCR + * name, or
  • + *
  • {@link #getProperty2Name property2} is not a syntactically valid JCR + * name, or
  • + *
  • the value of {@link #getProperty1Name property1} is not the same + * property type as the name of {@link #getProperty2Name property2}, or
  • + *
  • {@link #getProperty1Name property1} is a multi-valued property, or
  • + *
  • {@link #getProperty2Name property2} is a multi-valued property, or
  • + *
  • {@link #getProperty1Name property1} is a BINARY property, or
  • + *
  • {@link #getProperty2Name property2} is a BINARY property.
  • + *
+ * + * @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. + *

+ * 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). + *

+ * Which properties (if any) in a repository are full-text indexed is + * implementation determined. + *

+ * 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. + *

+ * 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. + *

+ * At minimum, an implementation must support the following + * {@link #getFullTextSearchExpression fullTextSearchExpression} grammar: + *

  fullTextSearchExpression ::= [-]term {whitespace [OR] whitespace [-]term}
+ * 

+ * term ::= word | '"' word {whitespace word} '"' + *

+ * word ::= (A string containing no whitespace) + *

+ * whitespace ::= (A string of only whitespace) + *

+ *

+ * A query satisfies a FullTextSearch 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: + *

    + *
  • A term not preceded with "-" (minus sign) is satisfied + * only if the value contains that term.
  • + *
  • A term preceded with "-" (minus sign) is satisfied only + * if the value does not contain that term.
  • + *
  • Terms separated by whitespace are implicitly "ANDed".
  • + *
  • Terms separated by "OR" are "ORed".
  • + *
  • "AND" has higher precedence than "OR". + *
  • Within a term, each double quote ("), "-" + * (minus sign), and "\" (backslash) must be escaped by a + * preceding "\" (backslash).
  • + *
+ *

+ * The query is invalid if: + *

    + *
  • {@link #getSelectorName selector} is not the name of a selector in the + * query, or
  • + *
  • {@link #getPropertyName property} is specified but is not a syntactically + * valid JCR name, or
  • + *
  • {@link #getFullTextSearchExpression fullTextSearchExpression} does not + * conform to the above grammar (as augmented by the implementation).
  • + *
+ *

+ * 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. + * + * @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 DOUBLE value equal to the full-text search score + * of a node. + *

+ * Full-text search score ranks a selector's nodes by their relevance to the + * fullTextSearchExpression specified in a {@link FullTextSearch}. + * The values to which FullTextSearchScore evaluates and the + * interpretation of those values are implementation specific. + * FullTextSearchScore may evaluate to a constant value in a + * repository that does not support full-text search scoring or has no + * full-text indexed properties. + *

+ * 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. + *

+ * 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 + *

    + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#JOIN_TYPE_INNER},
  • + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#JOIN_TYPE_LEFT_OUTER},
  • + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#JOIN_TYPE_RIGHT_OUTER}
  • + *
+ */ + 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. + *

+ * The length is computed as though the getLength method (or + * getLengths, if multi-valued) of javax.jcr.Property + * were called. + *

+ * If {@link #getPropertyValue propertyValue} evaluates to null, the + * Length 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}. + *

+ * 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 toLowerCase() method of + * java.lang.String were called. + *

+ * If {@link #getOperand operand} evaluates to null, the LowerCase + * 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 NAME value equal to the local (unprefixed) name + * of a node. + *

+ * 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 NAME value equal to the namespace-qualified + * name of a node. + *

+ * 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. + *

+ * To satisfy the Not constraint, the node-tuple must not + * satisfy {@link #getConstraint constraint}. + * + * @since JCR 2.0 + */ +public interface Not + extends Constraint { + /** + * Gets the constraint negated by this Not 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. + *

+ * To satisfy the Or constraint, the node-tuple must either: + *

    + *
  • satisfy {@link #getConstraint1 constraint1} but not + * {@link #getConstraint2 constraint2}, or
  • + *
  • satisfy {@link #getConstraint2 constraint2} but not + * {@link #getConstraint1 constraint1}, or
  • + *
  • satisfy both {@link #getConstraint1 constraint1} and + * {@link #getConstraint2 constraint2}.
  • + *
+ * + * @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. + *

+ * For a first node-tuple, nt1, for which {@link #getOperand operand} + * evaluates to v1, and a second node-tuple, nt2, for + * which {@link #getOperand operand} evaluates to v2: + *

    + *
  • If {@link #getOrder order} is Ascending, then:
      + *
    • if either v1 is null, v2 is null, or both + * v1 and v2 are null, the relative order of + * nt1 and nt2 is implementation determined, + * otherwise
    • + *
    • if v1 is a different property type than v2, + * the relative order of nt1 and nt2 is + * implementation determined, otherwise
    • + *
    • if v1 is ordered before v2, then + * nt1 precedes nt2, otherwise
    • + *
    • if v1 is ordered after v2, then + * nt2 precedes nt1, otherwise
    • + *
    • the relative order of nt1 and nt2 is + * implementation determined and may be arbitrary.
  • + *
  • Otherwise, if {@link #getOrder order} is Descending, then:
      + *
    • if either v1 is null, v2 is null, or both + * v1 and v2 are null, the relative order of + * nt1 and nt2 is implementation determined, + * otherwise
    • + *
    • if v1 is a different property type than v2, + * the relative order of nt1 and nt2 is + * implementation determined, otherwise
    • + *
    • if v1 is ordered before v2, then + * nt2 precedes nt1, otherwise
    • + *
    • if v1 is ordered after v2, then + * nt1 precedes nt2, otherwise
    • + *
    • the relative order of nt1 and nt2 is + * implementation determined and may be arbitrary.
  • + *
+ * 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 + *
    + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#ORDER_ASCENDING} or
  • + *
  • {@link org.apache.jackrabbit.core.query.jsr283.qom.QueryObjectModelConstants#ORDER_DESCENDING}
  • + *
+ */ + 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. + *

+ * A node-tuple satisfies the constraint if the selector node has a property + * named {@link #getPropertyName property}. + *

+ * The query is invalid if: + *

    + *
  • {@link #getSelectorName selector} is not the name of a selector in the + * query, or
  • + *
  • {@link #getPropertyName property} is not a syntactically valid JCR + * name.
  • + *
+ * + * @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. + *

+ * If, for a node-tuple, the {@link #getSelectorName selector} node does not + * have a property named {@link #getPropertyName property}, the operand + * evaluates to null. + *

+ * The query is invalid if: + *

    + *
  • {@link #getSelectorName selector} is not the name of a selector in the + * query, or
  • + *
  • {@link #getPropertyName property} is not a syntactically valid JCR + * name.
  • + *
+ * + * @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. + *

+ * 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. + *

+ * A query consists of: + *

    + *
  • 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.
  • + *
  • an optional constraint. When the query is evaluated, the constraint + * filters the set of node-tuples.
  • + *
  • 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).
  • + *
  • 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.
  • + *
+ *

+ * 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