1/*2 * ModeShape (http://www.modeshape.org)3 * See the COPYRIGHT.txt file distributed with this work for information4 * regarding copyright ownership. Some portions may be licensed5 * to Red Hat, Inc. under one or more contributor license agreements.6 * See the AUTHORS.txt file in the distribution for a full listing of 7 * individual contributors.8 *9 * ModeShape is free software. Unless otherwise indicated, all code in ModeShape10 * is licensed to you under the terms of the GNU Lesser General Public License as11 * published by the Free Software Foundation; either version 2.1 of12 * the License, or (at your option) any later version.13 * 14 * ModeShape is distributed in the hope that it will be useful,15 * but WITHOUT ANY WARRANTY; without even the implied warranty of16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU17 * Lesser General Public License for more details.18 *19 * You should have received a copy of the GNU Lesser General Public20 * License along with this software; if not, write to the Free21 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA22 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.23 */24package org.modeshape.jcr.query.qom;
2526import org.modeshape.graph.query.model.DescendantNodeJoinCondition;
27import org.modeshape.graph.query.model.SelectorName;
2829/**30 * Implementation of the descendant-node join condition for the JCR Query Object Model and the Graph API.31 */32publicclassJcrDescendantNodeJoinConditionextendsDescendantNodeJoinCondition33 implements javax.jcr.query.qom.DescendantNodeJoinCondition, JcrJoinCondition {
3435privatestaticfinallong serialVersionUID = 1L;
3637/**38 * Create a join condition that determines whether the node identified by the descendant selector is indeed a descendant of39 * the node identified by the ancestor selector.40 * 41 * @param ancestorSelectorName the name of the ancestor selector42 * @param descendantSelectorName the name of the descendant selector43 */44publicJcrDescendantNodeJoinCondition( SelectorName ancestorSelectorName,
45SelectorName descendantSelectorName ) {
46super(ancestorSelectorName, descendantSelectorName);
47 }
4849/**50 * {@inheritDoc}51 * 52 * @see javax.jcr.query.qom.DescendantNodeJoinCondition#getAncestorSelectorName()53 */54 @Override
55public String getAncestorSelectorName() {
56return ancestorSelectorName().name();
57 }
5859/**60 * {@inheritDoc}61 * 62 * @see javax.jcr.query.qom.DescendantNodeJoinCondition#getDescendantSelectorName()63 */64 @Override
65public String getDescendantSelectorName() {
66return descendantSelectorName().name();
67 }
68 }