Package org.apache.jackrabbit.mk.model.tree

Examples of org.apache.jackrabbit.mk.model.tree.NodeState


            throw new IllegalStateException("this instance has already been disposed");
        }

        Id revId = revisionId == null ? getHeadRevisionId() : Id.fromString(revisionId);

        NodeState nodeState;
        try {
            nodeState = rep.getNodeState(revId, path);
        } catch (Exception e) {
            throw new MicroKernelException(e);
        }
        if (nodeState != null) {
            return nodeState.getChildNodeCount();
        } else {
            throw new MicroKernelException("Path " + path + " not found in revision " + revisionId);
        }
    }
View Full Code Here


            // both an offset > 0 and a filter on node names have been specified...
            throw new IllegalArgumentException("offset > 0 with child node filter");
        }

        try {
            NodeState nodeState = rep.getNodeState(revId, path);
            if (nodeState == null) {
                return null;
            }

            JsopBuilder buf = new JsopBuilder().object();
View Full Code Here

                    // 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;
View Full Code Here

                    // specified range spans a single commit:
                    // use diff stored in commit instead of building it dynamically
                    return toCommit.getChanges();
                }
            }
            NodeState before = rep.getNodeState(fromRevisionId, path);
            NodeState after = rep.getNodeState(toRevisionId, path);

            return new DiffBuilder(before, after, path, depth, rep.getRevisionStore(), path).build();
        } catch (Exception e) {
            throw new MicroKernelException(e);
        }
View Full Code Here

            throw new IllegalStateException("this instance has already been disposed");
        }

        Id revId = revisionId == null ? getHeadRevisionId() : Id.fromString(revisionId);

        NodeState nodeState;
        try {
            nodeState = rep.getNodeState(revId, path);
        } catch (Exception e) {
            throw new MicroKernelException(e);
        }
        if (nodeState != null) {
            return nodeState.getChildNodeCount();
        } else {
            throw new MicroKernelException("Path " + path + " not found in revision " + revisionId);
        }
    }
View Full Code Here

            // both an offset > 0 and a filter on node names have been specified...
            throw new IllegalArgumentException("offset > 0 with child node filter");
        }

        try {
            NodeState nodeState = rep.getNodeState(revId, path);
            if (nodeState == null) {
                return null;
            }

            JsopBuilder buf = new JsopBuilder().object();
View Full Code Here

                    // 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;
View Full Code Here

                // 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;
View Full Code Here

                // use diff stored in commit instead of building it dynamically
                return toCommit.getDiff();
            }
        }

        NodeState beforeState = MongoUtil.wrap(getNode(path, fromRevisionId));
        NodeState afterState = MongoUtil.wrap(getNode(path, toRevisionId));

        return new DiffBuilder(beforeState, afterState, path, depth,
                new SimpleMongoNodeStore(), path).build();
    }
View Full Code Here

        // child node entries

        //Map<String, Id> otherAddedChildNodes = other.getAddedChildNodes();
        Map<String, NodeState> otherAddedChildNodes = other.getAddedChildNodes();
        for (Map.Entry<String, NodeState> added : addedChildNodes.entrySet()) {
            NodeState otherValue = otherAddedChildNodes.get(added.getKey());
            if (otherValue != null && !added.getValue().equals(otherValue)) {
                // same child node entry added with different target id's
                conflicts.add(new Conflict(ConflictType.NODE_CONTENT_CONFLICT, added.getKey()));
            }
        }

        //Map<String, Id> otherChangedChildNodes = other.getChangedChildNodes();
        Map<String, NodeState> otherChangedChildNodes = other.getChangedChildNodes();
        Map<String, Id> otherRemovedChildNodes = other.getRemovedChildNodes();
        for (Map.Entry<String, NodeState> changed : changedChildNodes.entrySet()) {
            NodeState otherValue = otherChangedChildNodes.get(changed.getKey());
            if (otherValue != null && !changed.getValue().equals(otherValue)) {
                // same child node entry changed with different target id's
                conflicts.add(new Conflict(ConflictType.NODE_CONTENT_CONFLICT, changed.getKey()));
            }
            if (otherRemovedChildNodes.containsKey(changed.getKey())) {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.mk.model.tree.NodeState

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.