Package org.locationtech.geogig.api

Examples of org.locationtech.geogig.api.NodeRef.path()


            path = oldObject.path();
        } else {
            if (oldObject.path().equals(newObject.path())) {
                path = oldObject.path();
            } else {
                path = oldObject.path() + " -> " + newObject.path();
            }
        }
        return path;
    }
}
View Full Code Here


            checkParameter(node.isPresent(), "pathspec '%s' did not match any feature or tree",
                    pathToRemove);
            NodeRef nodeRef = node.get();
            if (nodeRef.getType() == TYPE.TREE) {
                checkParameter(recursive, "Cannot remove tree %s if -r is not specified",
                        nodeRef.path());
                trees.add(pathToRemove);
            }
        }
        int featuresCount = pathsToRemove.size() - trees.size();
View Full Code Here

    private static String formatPath(DiffEntry entry) {
        String path;
        NodeRef oldObject = entry.getOldObject();
        NodeRef newObject = entry.getNewObject();
        if (oldObject == null) {
            path = newObject.path();
        } else if (newObject == null) {
            path = oldObject.path();
        } else {
            if (oldObject.path().equals(newObject.path())) {
                path = oldObject.path();
View Full Code Here

        if (oldObject == null) {
            path = newObject.path();
        } else if (newObject == null) {
            path = oldObject.path();
        } else {
            if (oldObject.path().equals(newObject.path())) {
                path = oldObject.path();
            } else {
                path = oldObject.path() + " -> " + newObject.path();
            }
        }
View Full Code Here

            path = oldObject.path();
        } else {
            if (oldObject.path().equals(newObject.path())) {
                path = oldObject.path();
            } else {
                path = oldObject.path() + " -> " + newObject.path();
            }
        }
        return path;
    }
View Full Code Here

            if (isDelete) {
                String oldName = diff.getOldObject().getNode().getName();
                parentTree.remove(oldName);
                if (TYPE.TREE.equals(type)) {
                    deletedTrees.add(ref.path());
                }
            } else {
                if (moveObjects && ref.getType().equals(TYPE.TREE)) {
                    RevTree tree = stagingDatabase().getTree(ref.objectId());
                    if (!ref.getMetadataId().isNull()) {
View Full Code Here

    private void handlePureMetadataChanges(TreeDifference treeDifference, Set<String> ignoreList) {
        Map<NodeRef, NodeRef> pureMetadataChanges = treeDifference.findPureMetadataChanges();
        for (Map.Entry<NodeRef, NodeRef> e : pureMetadataChanges.entrySet()) {
            NodeRef newValue = e.getValue();
            String treePath = newValue.path();
            if (ignoreList.contains(treePath)) {
                continue;
            }
            ignoreList.add(treePath);
            if (!filterMatchesOrIsParent(treePath)) {
View Full Code Here

        final SortedMap<NodeRef, NodeRef> renames = treeDifference.findRenames();

        for (Map.Entry<NodeRef, NodeRef> e : renames.entrySet()) {
            NodeRef oldValue = e.getKey();
            NodeRef newValue = e.getValue();
            String newPath = newValue.path();
            if (ignoreList.contains(newPath)) {
                continue;
            }
            ignoreList.add(newPath);
            if (!filterMatchesOrIsParent(newPath)) {
View Full Code Here

        for (Map.Entry<NodeRef, NodeRef> changedTreeRefs : filteredChangedTrees.entrySet()) {

            NodeRef leftTreeRef = changedTreeRefs.getKey();
            NodeRef rightTreeRef = changedTreeRefs.getValue();
            String newPath = rightTreeRef.path();
            if (ignoreList.contains(newPath)) {
                continue;
            }
            if (!filterApplies(newPath, treeDifference.getRightTree())) {
                continue;
View Full Code Here

    @Test
    public void testCreateTypeTree() throws Exception {
        NodeRef treeRef = workTree.createTypeTree("points2", pointsType);
        assertNotNull(treeRef);
        assertEquals("points2", treeRef.path());
        assertEquals("", treeRef.getParentPath());
        assertTrue(treeRef.getNode().getMetadataId().isPresent());
        assertSame(treeRef.getMetadataId(), treeRef.getNode().getMetadataId().get());

        RevFeatureType featureType = repo.stagingDatabase().getFeatureType(treeRef.getMetadataId());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.