Package org.locationtech.geogig.api.plumbing

Examples of org.locationtech.geogig.api.plumbing.DiffTree$DiffEntryProducer


                .setParent(rootTree).setChildPath(typeTreePath).call();
        checkArgument(typeTreeRef.isPresent(), "Feature type tree not found: %s", typeTreeRefSpec);

        final Filter filter = reprojectFilter(origFilter);

        DiffTree diffOp = context.command(DiffTree.class);
        diffOp.setOldVersion(effectiveOldHead);
        diffOp.setNewVersion(effectiveHead);

        final List<String> pathFilters = resolvePathFilters(typeTreePath, filter);
        diffOp.setPathFilter(pathFilters);

        if (screenMap != null) {
            LOGGER.trace("Created GeogigFeatureReader with screenMap, assuming it's renderer query");
            this.screenMapFilter = new ScreenMapFilter(screenMap);
            diffOp.setCustomFilter(screenMapFilter);
        } else {
            this.screenMapFilter = null;
            LOGGER.trace("Created GeogigFeatureReader without screenMapFilter");
        }

        ReferencedEnvelope queryBounds = getQueryBounds(filter, typeTreeRef.get());
        if (!queryBounds.isEmpty()) {
            diffOp.setBoundsFilter(queryBounds);
        }
        diffOp.setChangeTypeFilter(changeType(changeType));

        Iterator<DiffEntry> diffs = diffOp.call();

        Iterator<NodeRef> featureRefs = toFeatureRefs(diffs, changeType);

        final boolean filterSupportedByRefs = Filter.INCLUDE.equals(filter)
                || filter instanceof BBOX || filter instanceof Id;
View Full Code Here


        Repository repository = repository();
        RevCommit oldCommit = repository.getCommit(commit.get());

        if (patterns.size() > 0) {
            for (String pattern : patterns) {
                DiffTree diffOp = command(DiffTree.class)
                        .setOldTree(repository.index().getTree().getId())
                        .setNewTree(oldCommit.getTreeId()).setPathFilter(pattern);

                Iterator<DiffEntry> diff = diffOp.call();

                final long numChanges = Iterators.size(diffOp.call());
                if (numChanges == 0) {
                    // We are reseting to the current version, so there is nothing to do. However,
                    // if we are in a conflict state, the conflict should be removed and calling
                    // stage() will not do it, so we do it here
                    repository.stagingDatabase().removeConflict(null, pattern);
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.api.plumbing.DiffTree$DiffEntryProducer

Copyright © 2018 www.massapicom. 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.