Package org.locationtech.geogig.api

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


            op.setTimeRange(new Range<Date>(Date.class, since, until));
        }

        if (this.since != null) {
            Optional<ObjectId> since;
            since = geogig.command(RevParse.class).setRefSpec(this.since).call();
            Preconditions.checkArgument(since.isPresent(), "Object not found '%s'", this.since);
            op.setSince(since.get());
        }
        if (this.until != null) {
            Optional<ObjectId> until;
View Full Code Here


            Preconditions.checkArgument(since.isPresent(), "Object not found '%s'", this.since);
            op.setSince(since.get());
        }
        if (this.until != null) {
            Optional<ObjectId> until;
            until = geogig.command(RevParse.class).setRefSpec(this.until).call();
            Preconditions.checkArgument(until.isPresent(), "Object not found '%s'", this.until);
            op.setUntil(until.get());
        }
        if (paths != null && !paths.isEmpty()) {
            for (String path : paths) {
View Full Code Here

                    int modified = 0;
                    int removed = 0;

                    // If it's a shallow clone, the commit may not exist
                    if (parent.equals(ObjectId.NULL) || geogig.stagingDatabase().exists(parent)) {
                        final Iterator<DiffEntry> diff = geogig.command(DiffOp.class)
                                .setOldVersion(parent).setNewVersion(input.getId())
                                .setFilter(pathFilter).call();

                        while (diff.hasNext()) {
                            DiffEntry entry = diff.next();
View Full Code Here

        if (path == null || path.trim().isEmpty()) {
            throw new CommandSpecException("No path for feature name specifed");
        }

        final Context geogig = this.getCommandLocator(context);
        ObjectId newId = geogig.command(ResolveTreeish.class).setTreeish(newTreeish).call().get();

        ObjectId oldId = geogig.command(ResolveTreeish.class).setTreeish(oldTreeish).call().get();

        RevFeature newFeature = null;
        RevFeatureType newFeatureType = null;
View Full Code Here

        }

        final Context geogig = this.getCommandLocator(context);
        ObjectId newId = geogig.command(ResolveTreeish.class).setTreeish(newTreeish).call().get();

        ObjectId oldId = geogig.command(ResolveTreeish.class).setTreeish(oldTreeish).call().get();

        RevFeature newFeature = null;
        RevFeatureType newFeatureType = null;

        RevFeature oldFeature = null;
View Full Code Here

        // myself until the FeatureDiff supports null values
        boolean removed = false;
        boolean added = false;

        if (ref.isPresent()) {
            object = geogig.command(RevObjectParse.class).setObjectId(ref.get().getMetadataId())
                    .call();
            if (object.isPresent() && object.get() instanceof RevFeatureType) {
                newFeatureType = (RevFeatureType) object.get();
            } else {
                throw new CommandSpecException("Couldn't resolve newCommit's featureType");
View Full Code Here

            if (object.isPresent() && object.get() instanceof RevFeatureType) {
                newFeatureType = (RevFeatureType) object.get();
            } else {
                throw new CommandSpecException("Couldn't resolve newCommit's featureType");
            }
            object = geogig.command(RevObjectParse.class).setObjectId(ref.get().objectId()).call();
            if (object.isPresent() && object.get() instanceof RevFeature) {
                newFeature = (RevFeature) object.get();
            } else {
                throw new CommandSpecException("Couldn't resolve newCommit's feature");
            }
View Full Code Here

        if (!oldId.equals(ObjectId.NULL)) {
            ref = parseID(oldId, geogig);

            if (ref.isPresent()) {
                object = geogig.command(RevObjectParse.class)
                        .setObjectId(ref.get().getMetadataId()).call();
                if (object.isPresent() && object.get() instanceof RevFeatureType) {
                    oldFeatureType = (RevFeatureType) object.get();
                } else {
                    throw new CommandSpecException("Couldn't resolve oldCommit's featureType");
View Full Code Here

                if (object.isPresent() && object.get() instanceof RevFeatureType) {
                    oldFeatureType = (RevFeatureType) object.get();
                } else {
                    throw new CommandSpecException("Couldn't resolve oldCommit's featureType");
                }
                object = geogig.command(RevObjectParse.class).setObjectId(ref.get().objectId())
                        .call();
                if (object.isPresent() && object.get() instanceof RevFeature) {
                    oldFeature = (RevFeature) object.get();
                } else {
                    throw new CommandSpecException("Couldn't resolve oldCommit's feature");
View Full Code Here

     */
    @Override
    public void run(CommandContext context) {
        final Context geogig = this.getCommandLocator(context);

        PushOp command = geogig.command(PushOp.class);

        if (refSpec != null) {
            command.addRefSpec(refSpec);
        }

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.