Package org.locationtech.geogig.api

Examples of org.locationtech.geogig.api.GeoGIG.command()


                ObjectId parent = ObjectId.NULL;
                if (commit.getParentIds().size() > 0) {
                    parent = commit.getParentIds().get(0);
                }

                Iterator<DiffEntry> changes = ggit.command(DiffOp.class)
                        .setNewVersion(commit.getId()).setOldVersion(parent).setReportTrees(true)
                        .call();
                FilteredDiffIterator filteredChanges = new FilteredDiffIterator(changes,
                        repository, filter) {
                    @Override
View Full Code Here


        checkParameter(!refspec.endsWith(":"), "No path specified.");

        final GeoGIG geogig = cli.getGeogig();

        Optional<ObjectId> rootTreeId = geogig.command(ResolveTreeish.class)
                .setTreeish(refspec.split(":")[0]).call();

        checkParameter(rootTreeId.isPresent(), "Couldn't resolve '" + refspec
                + "' to a treeish object");
View Full Code Here

        checkParameter(rootTreeId.isPresent(), "Couldn't resolve '" + refspec
                + "' to a treeish object");

        RevTree rootTree = geogig.getRepository().getTree(rootTreeId.get());
        Optional<NodeRef> featureTypeTree = geogig.command(FindTreeChild.class)
                .setChildPath(refspec.split(":")[1]).setParent(rootTree).setIndex(true).call();

        checkParameter(featureTypeTree.isPresent(), "pathspec '" + refspec.split(":")[1]
                + "' did not match any valid path");
View Full Code Here

        checkParameter(!refspec.endsWith(":"), "No path specified.");

        final GeoGIG geogig = cli.getGeogig();

        Optional<ObjectId> rootTreeId = geogig.command(ResolveTreeish.class)
                .setTreeish(refspec.split(":")[0]).call();

        checkParameter(rootTreeId.isPresent(), "Couldn't resolve '" + refspec
                + "' to a treeish object");
View Full Code Here

        checkParameter(rootTreeId.isPresent(), "Couldn't resolve '" + refspec
                + "' to a treeish object");

        RevTree rootTree = geogig.getRepository().getTree(rootTreeId.get());
        Optional<NodeRef> featureTypeTree = geogig.command(FindTreeChild.class)
                .setChildPath(refspec.split(":")[1]).setParent(rootTree).setIndex(true).call();

        checkParameter(featureTypeTree.isPresent(), "pathspec '" + refspec.split(":")[1]
                + "' did not match any valid path");
View Full Code Here

                console.println("\nConflicting entries:\n");
                console.println(toReject.toString());
            }
        } else {
            try {
                Patch rejected = geogig.command(ApplyPatchOp.class).setPatch(patch)
                        .setApplyPartial(reject).call();
                if (reject) {
                    if (rejected.isEmpty()) {
                        console.println("Patch applied succesfully");
                    } else {
View Full Code Here

        try {
            final ConsoleReader console = cli.getConsole();
            String branchOrCommit = (branchOrStartPoint.size() > 0 ? branchOrStartPoint.get(0)
                    : null);

            CheckoutResult result = geogig.command(CheckoutOp.class).setForce(force)
                    .setSource(branchOrCommit).addPaths(paths).setOurs(ours).setTheirs(theirs)
                    .call();

            switch (result.getResult()) {
            case CHECKOUT_LOCAL_BRANCH:
View Full Code Here

        checkParameter(!refspec.endsWith(":"), "No path specified.");

        final GeoGIG geogig = cli.getGeogig();

        Optional<ObjectId> rootTreeId = geogig.command(ResolveTreeish.class)
                .setTreeish(refspec.split(":")[0]).call();

        checkParameter(rootTreeId.isPresent(), "Couldn't resolve '" + refspec
                + "' to a treeish object");
View Full Code Here

        checkParameter(rootTreeId.isPresent(), "Couldn't resolve '" + refspec
                + "' to a treeish object");

        RevTree rootTree = geogig.getRepository().getTree(rootTreeId.get());
        Optional<NodeRef> featureTypeTree = geogig.command(FindTreeChild.class)
                .setChildPath(refspec.split(":")[1]).setParent(rootTree).setIndex(true).call();

        checkParameter(featureTypeTree.isPresent(), "pathspec '" + refspec.split(":")[1]
                + "' did not match any valid path");
View Full Code Here

            }
        }

        GeoGIG geogig = new GeoGIG(cli.getGeogigInjector(), repoDir);

        checkParameter(!geogig.command(ResolveGeogigDir.class).call().isPresent(),
                "Destination path already exists and is not an empty directory.");

        geogig.command(InitOp.class).setConfig(Init.splitConfig(config)).setFilterFile(filterFile)
                .call();
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.