Package org.locationtech.geogig.api.plumbing.diff.DiffEntry

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.ChangeType


        while (changeIterator.hasNext() && (elementsPerPage == 0 || counter < elementsPerPage)) {
            GeometryChange next = changeIterator.next();
            if (next != null) {
                GeogigSimpleFeature feature = next.getFeature();
                ChangeType change = next.getChangeType();
                out.writeStartElement("Feature");
                writeElement("change", change.toString());
                writeElement("id", next.getPath());
                List<Object> attributes = feature.getAttributes();
                for (Object attribute : attributes) {
                    if (attribute instanceof Geometry) {
                        writeElement("geometry", ((Geometry) attribute).toText());
View Full Code Here


        StringBuilder sb = new StringBuilder();

        Ansi ansi = newAnsi(console.getTerminal(), sb);

        DiffEntry entry;
        ChangeType type;
        String path;
        int cnt = 0;
        if (limit > 0) {
            Iterator<DiffEntry> changesIterator = changes;
            while (changesIterator.hasNext() && cnt < limit) {
                ++cnt;

                entry = changesIterator.next();
                type = entry.changeType();
                path = formatPath(entry);

                sb.setLength(0);
                ansi.a("#      ").fg(color).a(type.toString().toLowerCase()).a("  ").a(path)
                        .reset();
                console.println(ansi.toString());
            }
        }
        sb.setLength(0);
View Full Code Here

                Iterator<DiffEntry> unstaged = geogig.command(DiffWorkTree.class).setFilter(null)
                        .call();
                cli.getConsole().println("Unstaged changes after reset:");
                while (unstaged.hasNext()) {
                    DiffEntry entry = unstaged.next();
                    ChangeType type = entry.changeType();
                    switch (type) {
                    case ADDED:
                        cli.getConsole().println("A\t" + entry.newPath());
                        break;
                    case MODIFIED:
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.api.plumbing.diff.DiffEntry.ChangeType

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.