Package org.apache.jackrabbit.spi.commons.query.qom

Examples of org.apache.jackrabbit.spi.commons.query.qom.DefaultTraversingQOMTreeVisitor


     * Extracts all {@link BindVariableValueImpl} from the {@link #qomTree}
     * and adds it to the set of known variable names.
     */
    private void extractBindVariableNames() {
        try {
            qomTree.accept(new DefaultTraversingQOMTreeVisitor() {
                public Object visit(BindVariableValueImpl node, Object data) {
                    addVariableName(node.getBindVariableQName());
                    return data;
                }
            }, null);
View Full Code Here


    public static Ordering fromQOM(final OrderingImpl ordering,
                                    final SharedFieldComparatorSource scs,
                                    final NamespaceMappings nsMappings)
            throws RepositoryException {
        final Name[] selectorName = new Name[1];
        QOMTreeVisitor visitor = new DefaultTraversingQOMTreeVisitor() {

            public Object visit(LengthImpl node, Object data) throws Exception {
                PropertyValueImpl propValue = (PropertyValueImpl) node.getPropertyValue();
                selectorName[0] = propValue.getSelectorQName();
                return new SortField(propValue.getPropertyQName().toString(),
View Full Code Here

     * Extracts all {@link BindVariableValueImpl} from the {@link #qomTree}
     * and adds it to the set of known variable names.
     */
    private void extractBindVariableNames() {
        try {
            qomTree.accept(new DefaultTraversingQOMTreeVisitor() {
                public Object visit(BindVariableValueImpl node, Object data) {
                    addVariableName(node.getBindVariableQName());
                    return data;
                }
            }, null);
View Full Code Here

     * @throws InvalidQueryException if one of the selector node types is
     *                               unknown.
     */
    private void checkNodeTypes() throws InvalidQueryException {
        try {
            qomTree.accept(new DefaultTraversingQOMTreeVisitor() {
                public Object visit(SelectorImpl node, Object data) throws Exception {
                    String ntName = node.getNodeTypeName();
                    if (!session.getNodeTypeManager().hasNodeType(ntName)) {
                        throw new Exception(ntName + " is not a known node type");
                    }
View Full Code Here

        this.qomTree = qomTree;
        this.node = node;
        this.statement = QueryObjectModelBuilderRegistry.getQueryObjectModelBuilder(language).toString(this);

        try {
            qomTree.accept(new DefaultTraversingQOMTreeVisitor() {
                @Override
                public Object visit(BindVariableValueImpl node, Object data) {
                    variables.put(node.getBindVariableName(), null);
                    return data;
                }
View Full Code Here

    public static Ordering fromQOM(final OrderingImpl ordering,
                                    final SortComparatorSource scs,
                                    final NamespaceMappings nsMappings)
            throws RepositoryException {
        final Name[] selectorName = new Name[1];
        QOMTreeVisitor visitor = new DefaultTraversingQOMTreeVisitor() {

            public Object visit(LengthImpl node, Object data) throws Exception {
                PropertyValueImpl propValue = (PropertyValueImpl) node.getPropertyValue();
                selectorName[0] = propValue.getSelectorQName();
                return new SortField(propValue.getPropertyQName().toString(),
View Full Code Here

     * Extracts all {@link BindVariableValueImpl} from the {@link #qomTree}
     * and adds it to the set of known variable names.
     */
    private void extractBindVariableNames() {
        try {
            qomTree.accept(new DefaultTraversingQOMTreeVisitor() {
                public Object visit(BindVariableValueImpl node, Object data) {
                    addVariableName(node.getBindVariableQName());
                    return data;
                }
            }, null);
View Full Code Here

     * @throws InvalidQueryException if one of the selector node types is
     *                               unknown.
     */
    private void checkNodeTypes() throws InvalidQueryException {
        try {
            qomTree.accept(new DefaultTraversingQOMTreeVisitor() {
                public Object visit(SelectorImpl node, Object data) throws Exception {
                    String ntName = node.getNodeTypeName();
                    if (!session.getNodeTypeManager().hasNodeType(ntName)) {
                        throw new Exception(ntName + " is not a known node type");
                    }
View Full Code Here

        this.qomTree = qomTree;
        this.node = node;
        this.statement = QueryObjectModelBuilderRegistry.getQueryObjectModelBuilder(language).toString(this);

        try {
            qomTree.accept(new DefaultTraversingQOMTreeVisitor() {
                @Override
                public Object visit(BindVariableValueImpl node, Object data) {
                    variables.put(node.getBindVariableName(), null);
                    return data;
                }
View Full Code Here

     * Extracts all {@link BindVariableValueImpl} from the {@link #qomTree}
     * and adds it to the set of known variable names.
     */
    private void extractBindVariableNames() {
        try {
            qomTree.accept(new DefaultTraversingQOMTreeVisitor() {
                public Object visit(BindVariableValueImpl node, Object data) {
                    addVariableName(node.getBindVariableQName());
                    return data;
                }
            }, null);
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.commons.query.qom.DefaultTraversingQOMTreeVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.