Package org.locationtech.geogig.api

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


        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();

        cli.setGeogig(geogig);
        cli.getPlatform().setWorkingDir(repoDir);
View Full Code Here


        checkParameter(refSpec.size() < 3, "Commit list is too long :" + refSpec);

        GeoGIG geogig = cli.getGeogig();

        CreateOSMChangesetOp op = geogig.command(CreateOSMChangesetOp.class);

        String oldVersion = resolveOldVersion();
        String newVersion = resolveNewVersion();

        op.setOldVersion(oldVersion).setNewVersion(newVersion).setId(id);
View Full Code Here

    @Nullable
    private GeoGIG loadRepository(Hints hints) {
        GeoGIG geogig = newGeoGIG(hints);

        if (geogig.command(ResolveGeogigDir.class).call().isPresent()) {
            geogig.getRepository();
            return geogig;
        }
        geogig.close();
View Full Code Here

            closeGeogig = true;
            geogig = newGeoGIG(Hints.readOnly());
        }
        try {
            Optional<String> unaliased = Optional.absent();
            if (geogig.command(ResolveGeogigDir.class).call().isPresent()) {
                unaliased = geogig.command(ConfigGet.class).setName(configParam).call();
            }
            if (!unaliased.isPresent()) {
                unaliased = geogig.command(ConfigGet.class).setGlobal(true).setName(configParam)
                        .call();
View Full Code Here

            geogig = newGeoGIG(Hints.readOnly());
        }
        try {
            Optional<String> unaliased = Optional.absent();
            if (geogig.command(ResolveGeogigDir.class).call().isPresent()) {
                unaliased = geogig.command(ConfigGet.class).setName(configParam).call();
            }
            if (!unaliased.isPresent()) {
                unaliased = geogig.command(ConfigGet.class).setGlobal(true).setName(configParam)
                        .call();
            }
View Full Code Here

            Optional<String> unaliased = Optional.absent();
            if (geogig.command(ResolveGeogigDir.class).call().isPresent()) {
                unaliased = geogig.command(ConfigGet.class).setName(configParam).call();
            }
            if (!unaliased.isPresent()) {
                unaliased = geogig.command(ConfigGet.class).setGlobal(true).setName(configParam)
                        .call();
            }
            if (!unaliased.isPresent()) {
                return args;
            }
View Full Code Here

        File userHomeDirectory = tmp.newFolder("home");
        TestPlatform platform = new TestPlatform(workingDirectory);
        platform.setUserHome(userHomeDirectory);
        Context injector = new CLITestContextBuilder(platform).build();
        GeoGIG geogig = new GeoGIG(injector);
        geogig.command(InitOp.class).call();
        geogig.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("user.name")
                .setValue("gabriel").call();
        geogig.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("user.email")
                .setValue("gabriel@roldan.example.com").call();
View Full Code Here

        TestPlatform platform = new TestPlatform(workingDirectory);
        platform.setUserHome(userHomeDirectory);
        Context injector = new CLITestContextBuilder(platform).build();
        GeoGIG geogig = new GeoGIG(injector);
        geogig.command(InitOp.class).call();
        geogig.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("user.name")
                .setValue("gabriel").call();
        geogig.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("user.email")
                .setValue("gabriel@roldan.example.com").call();

        store = new GeoGigDataStore(geogig);
View Full Code Here

        Context injector = new CLITestContextBuilder(platform).build();
        GeoGIG geogig = new GeoGIG(injector);
        geogig.command(InitOp.class).call();
        geogig.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("user.name")
                .setValue("gabriel").call();
        geogig.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("user.email")
                .setValue("gabriel@roldan.example.com").call();

        store = new GeoGigDataStore(geogig);

        store.createSchema(pointType);
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

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.