Package org.apache.jackrabbit.mk.util

Examples of org.apache.jackrabbit.mk.util.NameFilter


                // :childNodeCount is by default always included
                // unless it is explicitly excluded in the filter
                builder.key(":childNodeCount").value(childCount);
            }
            if (filter != null) {
                NameFilter nf = filter.getPropertyFilter();
                if (nf != null) {
                    // check whether :id has been explicitly included
                    if (nf.getInclusionPatterns().contains(":hash")
                            && !nf.getExclusionPatterns().contains(":hash")) {
                        builder.key(":hash").value(node.getId().toString());
                    }
                    // check whether :id has been explicitly included
                    if (nf.getInclusionPatterns().contains(":id")
                            && !nf.getExclusionPatterns().contains(":id")) {
                        builder.key(":id").value(node.getId().toString());
                    }
                }
            }
        }
        if (childCount > 0 && depth >= 0) {
            if (filter != null) {
                NameFilter childFilter = filter.getChildNodeFilter();
                if (childFilter != null && !childFilter.containsWildcard()) {
                    // optimization for large child node lists:
                    // no need to iterate over the entire child node list if the filter
                    // does not include wildcards
                    int count = maxChildNodes == -1 ? Integer.MAX_VALUE : maxChildNodes;
                    for (String name : childFilter.getInclusionPatterns()) {
                        ChildNodeEntry cne = node.getChildNodeEntry(name);
                        if (cne != null) {
                            boolean incl = true;
                            for (String exclName : childFilter.getExclusionPatterns()) {
                                if (name.equals(exclName)) {
                                    incl = false;
                                    break;
                                }
                            }
View Full Code Here


                // :childNodeCount is by default always included
                // unless it is explicitly excluded in the filter
                builder.key(":childNodeCount").value(childCount);
            }
            if (filter != null) {
                NameFilter nf = filter.getPropertyFilter();
                if (nf != null) {
                    // check whether :id has been explicitly included
                    if (nf.getInclusionPatterns().contains(":hash")
                            && !nf.getExclusionPatterns().contains(":hash")) {
                        builder.key(":hash").value(node.getId().toString());
                    }
                    // check whether :id has been explicitly included
                    if (nf.getInclusionPatterns().contains(":id")
                            && !nf.getExclusionPatterns().contains(":id")) {
                        builder.key(":id").value(node.getId().toString());
                    }
                }
            }
        }
        if (childCount > 0 && depth >= 0) {
            if (filter != null) {
                NameFilter childFilter = filter.getChildNodeFilter();
                if (childFilter != null && !childFilter.containsWildcard()) {
                    // optimization for large child node lists:
                    // no need to iterate over the entire child node list if the filter
                    // does not include wildcards
                    int count = maxChildNodes == -1 ? Integer.MAX_VALUE : maxChildNodes;
                    for (String name : childFilter.getInclusionPatterns()) {
                        ChildNodeEntry cne = node.getChildNodeEntry(name);
                        if (cne != null) {
                            boolean incl = true;
                            for (String exclName : childFilter.getExclusionPatterns()) {
                                if (name.equals(exclName)) {
                                    incl = false;
                                    break;
                                }
                            }
View Full Code Here

        if (childCount <= 0 || depth < 0) {
            return;
        }

        if (filter != null) {
            NameFilter childFilter = filter.getChildNodeFilter();
            if (childFilter != null && !childFilter.containsWildcard()) {
                // Optimization for large child node lists:
                // no need to iterate over the entire child node list if the filter
                // does not include wildcards
                int count = maxChildNodes == -1 ? Integer.MAX_VALUE : maxChildNodes;
                for (String name : childFilter.getInclusionPatterns()) {
                    NodeState child = node.getChildNode(name);
                    if (child != null) {
                        boolean incl = true;
                        for (String exclName : childFilter.getExclusionPatterns()) {
                            if (name.equals(exclName)) {
                                incl = false;
                                break;
                            }
                        }
View Full Code Here

                // :childNodeCount is by default always included
                // unless it is explicitly excluded in the filter
                builder.key(":childNodeCount").value(childCount);
            }
            if (filter != null) {
                NameFilter nf = filter.getPropertyFilter();
                if (nf != null) {
                    // check whether :id has been explicitly included
                    if (nf.getInclusionPatterns().contains(":hash")
                            && !nf.getExclusionPatterns().contains(":hash")) {
                        builder.key(":hash").value(rep.getRevisionStore().getId(node).toString());
                    }
                    // check whether :id has been explicitly included
                    if (nf.getInclusionPatterns().contains(":id")
                            && !nf.getExclusionPatterns().contains(":id")) {
                        builder.key(":id").value(rep.getRevisionStore().getId(node).toString());
                    }
                }
            }
        }
        if (childCount > 0 && depth >= 0) {
            if (filter != null) {
                NameFilter childFilter = filter.getChildNodeFilter();
                if (childFilter != null && !childFilter.containsWildcard()) {
                    // optimization for large child node lists:
                    // no need to iterate over the entire child node list if the filter
                    // does not include wildcards
                    int count = maxChildNodes == -1 ? Integer.MAX_VALUE : maxChildNodes;
                    for (String name : childFilter.getInclusionPatterns()) {
                        NodeState child = node.getChildNode(name);
                        if (child != null) {
                            boolean incl = true;
                            for (String exclName : childFilter.getExclusionPatterns()) {
                                if (name.equals(exclName)) {
                                    incl = false;
                                    break;
                                }
                            }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.mk.util.NameFilter

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.