Examples of newObjectId()


Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newObjectId()

        diffs = toList(diffOp.call());
        assertEquals(1, diffs.size());
        diff = diffs.get(0);
        assertEquals(ChangeType.MODIFIED, diff.changeType());
        assertEquals(initialOid, diff.oldObjectId());
        assertEquals(modifiedOid, diff.newObjectId());

        assertTrue(deleteAndAdd(points1));
        final RevCommit commit4 = geogig.command(CommitOp.class).setAll(true).call();
        diffOp.setOldVersion(commit2.getId()).setNewVersion(commit4.getId());
        diffOp.setFilter(NodeRef.appendChild(pointsName, points1.getIdentifier().getID()));
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newObjectId()

        diffs = toList(diffOp.call());
        assertEquals(1, diffs.size());
        diff = diffs.get(0);
        assertEquals(ChangeType.REMOVED, diff.changeType());
        assertEquals(initialOid, diff.oldObjectId());
        assertEquals(ObjectId.NULL, diff.newObjectId());

        // invert the order of old and new commit
        diffOp.setOldVersion(commit4.getId()).setNewVersion(commit1.getId());
        diffOp.setFilter(NodeRef.appendChild(pointsName, points1.getIdentifier().getID()));
        diffs = toList(diffOp.call());
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newObjectId()

        diffs = toList(diffOp.call());
        assertEquals(1, diffs.size());
        diff = diffs.get(0);
        assertEquals(ChangeType.ADDED, diff.changeType());
        assertEquals(ObjectId.NULL, diff.oldObjectId());
        assertEquals(initialOid, diff.newObjectId());

        // different commit range
        diffOp.setOldVersion(commit4.getId()).setNewVersion(commit3.getId());
        diffOp.setFilter(NodeRef.appendChild(pointsName, points1.getIdentifier().getID()));
        diffs = toList(diffOp.call());
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newObjectId()

        diffs = toList(diffOp.call());
        assertEquals(1, diffs.size());
        diff = diffs.get(0);
        assertEquals(ChangeType.ADDED, diff.changeType());
        assertEquals(ObjectId.NULL, diff.oldObjectId());
        assertEquals(modifiedOid, diff.newObjectId());
    }

    // @Test
    // public void testFilterAddressesNamespaceTree() throws Exception {
    //
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newObjectId()

            DiffEntry diffEntry = diffs.next();
            final NodeRef newObject = diffEntry.getNewObject();
            final NodeRef oldObject = diffEntry.getOldObject();
            if (diffEntry.changeType() == ChangeType.MODIFIED) {
                RevObject revObject = command(RevObjectParse.class)
                        .setObjectId(diffEntry.newObjectId()).call().get();
                if (revObject instanceof RevFeature) {
                    FeatureDiff diff = command(DiffFeature.class)
                            .setNewVersion(Suppliers.ofInstance(diffEntry.getNewObject()))
                            .setOldVersion(Suppliers.ofInstance(diffEntry.getOldObject())).call();
                    patch.addModifiedFeature(diff);
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newObjectId()

                    patch.addAlteredTree(diffEntry);
                }

            } else if (diffEntry.changeType() == ChangeType.ADDED) {
                RevObject revObject = command(RevObjectParse.class)
                        .setObjectId(diffEntry.newObjectId()).call().get();
                if (revObject instanceof RevFeature) {
                    RevFeatureType featureType;
                    if (featureTypes.containsKey(newObject.getMetadataId())) {
                        featureType = featureTypes.get(newObject.getMetadataId());
                    } else {
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newObjectId()

                                .get();
                        featureTypes.put(newObject.getMetadataId(), featureType);
                    }

                    FeatureBuilder featureBuilder = new FeatureBuilder(featureType);
                    Feature feature = featureBuilder.build(diffEntry.newObjectId().toString(),
                            (RevFeature) revObject);
                    String name = diffEntry.newPath();
                    patch.addAddedFeature(name, feature, featureType);
                } else if (revObject instanceof RevTree) {
                    ObjectId metadataId = diffEntry.getNewObject().getMetadataId();
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newObjectId()

        List<Feature> list = Lists.newArrayList();
        while (diffs.hasNext()) {
            DiffEntry diff = diffs.next();
            if (!diff.changeType().equals(ChangeType.REMOVED) || !noDeletions) {
                RevFeature revFeature = repository.command(RevObjectParse.class)
                        .setObjectId(diff.newObjectId()).call(RevFeature.class).get();
                RevFeatureType revFeatureType = repository.command(RevObjectParse.class)
                        .setObjectId(diff.getNewObject().getMetadataId())
                        .call(RevFeatureType.class).get();
                FeatureBuilder builder = new FeatureBuilder(revFeatureType);
                list.add(builder.build(diff.getNewObject().name(), revFeature));
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newObjectId()

        List<Feature> list = Lists.newArrayList();
        while (diffs.hasNext()) {
            DiffEntry diff = diffs.next();
            if (!diff.changeType().equals(ChangeType.REMOVED) || !noDeletions) {
                RevFeature revFeature = repository.command(RevObjectParse.class)
                        .setObjectId(diff.newObjectId()).call(RevFeature.class).get();
                RevFeatureType revFeatureType = repository.command(RevObjectParse.class)
                        .setObjectId(diff.getNewObject().getMetadataId())
                        .call(RevFeatureType.class).get();
                FeatureBuilder builder = new FeatureBuilder(revFeatureType);
                list.add(builder.build(diff.getNewObject().name(), revFeature));
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.DiffEntry.newObjectId()

            if (removedTrees.contains(parentPath)) {
                continue;
            }
            if (null == parentPath) {
                // it is the root tree that's been changed, update head and ignore anything else
                ObjectId newRoot = diff.newObjectId();
                updateStageHead(newRoot);
                progress.setProgress(100f);
                progress.complete();
                return;
            }
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.