Package org.locationtech.geogig.repository

Examples of org.locationtech.geogig.repository.WorkingTree$BlobInsertTask


        assertEquals(1, patch.getAddedFeatures().size());
    }

    @Test
    public void testCreatePatchAddNewEmptyFeatureTypeToEmptyRepo() throws Exception {
        WorkingTree workingTree = geogig.getRepository().workingTree();
        workingTree.createTypeTree(linesName, linesType);
        DiffOp op = geogig.command(DiffOp.class).setReportTrees(true);
        Iterator<DiffEntry> diffs = op.call();
        Patch patch = geogig.command(CreatePatchOp.class).setDiffs(diffs).call();
        assertEquals(1, patch.getAlteredTrees().size());
        assertEquals(ObjectId.NULL, patch.getAlteredTrees().get(0).getOldFeatureType());
View Full Code Here


        assertEquals(1, patch.getFeatureTypes().size());
    }

    @Test
    public void testCreatePatchRemoveEmptyFeatureType() throws Exception {
        WorkingTree workingTree = geogig.getRepository().workingTree();
        workingTree.createTypeTree(linesName, linesType);
        geogig.command(AddOp.class).setUpdateOnly(false).call();
        workingTree.delete(linesName);
        DiffOp op = geogig.command(DiffOp.class).setReportTrees(true);
        Iterator<DiffEntry> diffs = op.call();
        Patch patch = geogig.command(CreatePatchOp.class).setDiffs(diffs).call();
        assertEquals(1, patch.getAlteredTrees().size());
        assertEquals(RevFeatureTypeImpl.build(linesType).getId(), patch.getAlteredTrees().get(0)
View Full Code Here

        assertEquals(featureType.getId(), typeTreeId.get().getMetadataId().get());
    }

    @Test
    public void testRemoveEmptyFeatureTypePatch() throws Exception {
        WorkingTree workingTree = geogig.getRepository().workingTree();
        workingTree.createTypeTree(pointsName, pointsType);
        geogig.command(AddOp.class).setUpdateOnly(false).call();
        Patch patch = new Patch();
        RevFeatureType featureType = RevFeatureTypeImpl.build(pointsType);
        patch.addFeatureType(featureType);
        patch.addAlteredTree(new FeatureTypeDiff(pointsName, featureType.getId(), null));
View Full Code Here

        AddOp op = geogig.command(AddOp.class);
        if (patterns.size() == 1) {
            op.addPattern(patterns.get(0));
        }

        WorkingTree workTree = op.setUpdateOnly(updateOnly)
                .setProgressListener(cli.getProgressListener()).call();

        DiffObjectCount staged = geogig.getRepository().index().countStaged(null);
        unstaged = workTree.countUnstaged(null);

        console.println(staged.featureCount() + " features and " + staged.treeCount()
                + " trees staged for commit");
        console.println(unstaged.featureCount() + " features and " + unstaged.treeCount()
                + " trees not staged for commit");
View Full Code Here

    @Test
    public void testReprojectToTargetBucketTree() throws Exception {
        final int leftCount = RevTree.NORMALIZED_SIZE_LIMIT * 2;
        final int rightCount = RevTree.NORMALIZED_SIZE_LIMIT * 3;

        WorkingTree workingTree = geogig.getRepository().workingTree();
        final String typeName = "newpoints";

        final DefaultProgressListener listener = new DefaultProgressListener();
        workingTree.insert(typeName, new TestFeatureIterator(typeName, leftCount), listener, null,
                null);
        geogig.command(AddOp.class).call();

        workingTree.insert(typeName, new TestFeatureIterator(typeName, rightCount), listener, null,
                null);

        {// sanity check
            long diffFeatures = geogig.command(DiffCount.class).setOldVersion("STAGE_HEAD")
                    .setNewVersion("WORK_HEAD").call().featureCount();
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.repository.WorkingTree$BlobInsertTask

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.