Package org.locationtech.geogig.api

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


                        ansi.a(value.or("[NULL]").toString()).newline();
                        i++;
                    }
                    console.println(ansi.toString());
                } else {
                    CharSequence s = geogig.command(CatObject.class)
                            .setObject(Suppliers.ofInstance(revObject)).call();
                    console.println(s);
                }
            } else {
                CharSequence s = geogig.command(CatObject.class)
View Full Code Here


                    CharSequence s = geogig.command(CatObject.class)
                            .setObject(Suppliers.ofInstance(revObject)).call();
                    console.println(s);
                }
            } else {
                CharSequence s = geogig.command(CatObject.class)
                        .setObject(Suppliers.ofInstance(revObject)).call();
                console.println(s);
            }
        }
    }
View Full Code Here

    public void printFormatted(GeogigCLI cli) throws IOException {
        ConsoleReader console = cli.getConsole();
        GeoGIG geogig = cli.getGeogig();
        for (String ref : refs) {
            Optional<RevObject> obj = geogig.command(RevObjectParse.class).setRefSpec(ref).call();
            if (!obj.isPresent()) {
                ref = getFullRef(ref);
                obj = geogig.command(RevObjectParse.class).setRefSpec(ref).call();
            }
            checkParameter(obj.isPresent(), "refspec did not resolve to any object.");
View Full Code Here

        GeoGIG geogig = cli.getGeogig();
        for (String ref : refs) {
            Optional<RevObject> obj = geogig.command(RevObjectParse.class).setRefSpec(ref).call();
            if (!obj.isPresent()) {
                ref = getFullRef(ref);
                obj = geogig.command(RevObjectParse.class).setRefSpec(ref).call();
            }
            checkParameter(obj.isPresent(), "refspec did not resolve to any object.");
            RevObject revObject = obj.get();
            if (revObject instanceof RevFeature) {
                Optional<RevFeatureType> opt = geogig.command(ResolveFeatureType.class)
View Full Code Here

                obj = geogig.command(RevObjectParse.class).setRefSpec(ref).call();
            }
            checkParameter(obj.isPresent(), "refspec did not resolve to any object.");
            RevObject revObject = obj.get();
            if (revObject instanceof RevFeature) {
                Optional<RevFeatureType> opt = geogig.command(ResolveFeatureType.class)
                        .setRefSpec(ref).call();
                if (opt.isPresent()) {
                    RevFeatureType ft = opt.get();
                    ImmutableList<PropertyDescriptor> attribs = ft.sortedDescriptors();
                    RevFeature feature = (RevFeature) revObject;
View Full Code Here

                        ansi.a(value.or("[NULL]").toString()).newline();
                        i++;
                    }
                    console.println(ansi.toString());
                } else {
                    CharSequence s = geogig.command(CatObject.class)
                            .setObject(Suppliers.ofInstance(revObject)).call();
                    console.println(s);
                }

            } else if (revObject instanceof RevTree) {
View Full Code Here

                    console.println(s);
                }

            } else if (revObject instanceof RevTree) {
                RevTree tree = (RevTree) revObject;
                Optional<RevFeatureType> opt = geogig.command(ResolveFeatureType.class)
                        .setRefSpec(ref).call();
                checkParameter(opt.isPresent(),
                        "Refspec must resolve to a commit, tree, feature or feature type");
                RevFeatureType ft = opt.get();
                Ansi ansi = super.newAnsi(console.getTerminal());
View Full Code Here

        GeoGIG geogig = cli.getGeogig();
        if (geogig == null) {
            geogig = new GeoGIG();
        }
        this.console = cli.getConsole();
        VersionInfo info = geogig.command(VersionOp.class).call();

        try {
            printVersionProperty("Project Version", info.getProjectVersion());
            printVersionProperty("Build Time", info.getBuildTime());
            printVersionProperty("Build User Name", info.getBuildUserName());
View Full Code Here

        GeoGIG geogig = cli.getGeogig();

        String path = paths.get(0);

        try {
            BlameReport report = geogig.command(BlameOp.class).setPath(path).call();

            Map<String, ValueAndCommit> changes = report.getChanges();
            Iterator<String> iter = changes.keySet().iterator();
            while (iter.hasNext()) {
                String attrib = iter.next();
View Full Code Here

        if (delete) {
            checkParameter(!branchName.isEmpty(), "no name specified for deletion");

            for (String br : branchName) {
                Optional<? extends Ref> deletedBranch;
                deletedBranch = geogig.command(BranchDeleteOp.class).setName(br).call();

                checkParameter(deletedBranch.isPresent(), "No branch called '%s'.", br);

                console.println(String.format("Deleted branch '%s'.", br));
            }
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.