Examples of DiffFeature


Examples of org.locationtech.geogig.api.plumbing.DiffFeature

        Iterator<RevCommit> log = command(LogOp.class).addPath(path).setUntil(commit).call();
        RevCommit commit = log.next();
        RevObjectParse revObjectParse = command(RevObjectParse.class);
        DiffOp diffOp = command(DiffOp.class);
        DiffFeature diffFeature = command(DiffFeature.class);

        while (!report.isComplete()) {
            if (!log.hasNext()) {
                String refSpec = commit.getId().toString() + ":" + path;
                RevFeature feature = revObjectParse.setRefSpec(refSpec).call(RevFeature.class)
                        .get();
                report.setFirstVersion(feature, commit);
                break;
            }
            RevCommit commitB = log.next();
            Iterator<DiffEntry> diffs = diffOp.setNewVersion(commit.getId())
                    .setOldVersion(commitB.getId()).setReportTrees(false).call();

            while (diffs.hasNext()) {
                DiffEntry diff = diffs.next();
                if (path.equals(diff.newPath())) {
                    if (diff.isAdd()) {
                        String refSpec = commit.getId().toString() + ":" + path;
                        RevFeature feature = revObjectParse.setRefSpec(refSpec)
                                .call(RevFeature.class).get();
                        report.setFirstVersion(feature, commit);
                        break;
                    }
                    FeatureDiff featureDiff = diffFeature
                            .setNewVersion(Suppliers.ofInstance(diff.getNewObject()))
                            .setOldVersion(Suppliers.ofInstance(diff.getOldObject())).call();
                    Map<PropertyDescriptor, AttributeDiff> attribDiffs = featureDiff.getDiffs();
                    Iterator<PropertyDescriptor> iter = attribDiffs.keySet().iterator();
                    while (iter.hasNext()) {
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.