Package org.locationtech.geogig.api

Examples of org.locationtech.geogig.api.ObjectId


    private Iterator<RevObject> streamToObjects(final InputStream in) {
        return new AbstractIterator<RevObject>() {
            @Override
            protected RevObject computeNext() {
                try {
                    ObjectId id = readObjectId(in);
                    RevObject revObj = objectReader.read(id, in);
                    return revObj;
                } catch (EOFException eof) {
                    return endOfData();
                } catch (IOException e) {
View Full Code Here


    SimpleFeatureType getNativeType() {

        final NodeRef typeRef = getTypeRef();
        final String treePath = typeRef.path();
        final ObjectId metadataId = typeRef.getMetadataId();

        Context commandLocator = getCommandLocator();
        Optional<RevFeatureType> revType = commandLocator.command(RevObjectParse.class)
                .setObjectId(metadataId).call(RevFeatureType.class);
View Full Code Here

                throw new EOFException("Came to end of input");
            offset += amount;
            if (offset == len)
                break;
        }
        ObjectId id = ObjectId.createNoClone(rawBytes);
        return id;
    }
View Full Code Here

        // Commit several features to the remote
        List<Feature> features = Arrays.asList(points1, lines1, points2, lines2, points3, lines3);
        LinkedList<RevCommit> expected = new LinkedList<RevCommit>();

        for (Feature f : features) {
            ObjectId oId = insertAndAdd(remoteGeogig.geogig, f);
            final RevCommit commit = remoteGeogig.geogig.command(CommitOp.class).call();
            expected.addFirst(commit);
            Optional<RevObject> childObject = remoteGeogig.geogig.command(RevObjectParse.class)
                    .setObjectId(oId).call();
            assertTrue(childObject.isPresent());
View Full Code Here

        List<Feature> features = Arrays.asList(points1, lines1, points2, lines2, points3, lines3);
        LinkedList<RevCommit> expected = new LinkedList<RevCommit>();
        List<RevTag> tags = Lists.newArrayList();

        for (Feature f : features) {
            ObjectId oId = insertAndAdd(remoteGeogig.geogig, f);
            final RevCommit commit = remoteGeogig.geogig.command(CommitOp.class).call();
            expected.addFirst(commit);
            Optional<RevObject> childObject = remoteGeogig.geogig.command(RevObjectParse.class)
                    .setObjectId(oId).call();
            assertTrue(childObject.isPresent());
View Full Code Here

        // Commit several features to the remote
        List<Feature> features = Arrays.asList(points1, lines1, points2, lines2, points3, lines3);
        LinkedList<RevCommit> expected = new LinkedList<RevCommit>();

        for (Feature f : features) {
            ObjectId oId = insertAndAdd(remoteGeogig.geogig, f);
            final RevCommit commit = remoteGeogig.geogig.command(CommitOp.class).call();
            expected.addFirst(commit);
            Optional<RevObject> childObject = remoteGeogig.geogig.command(RevObjectParse.class)
                    .setObjectId(oId).call();
            assertTrue(childObject.isPresent());
View Full Code Here

                .setValue("groldan@boundlessgeo.com").call();
    }

    @Test
    public void testRevert() throws Exception {
        ObjectId oId1 = insertAndAdd(points1);
        RevCommit c1 = geogig.command(CommitOp.class).setMessage("commit for " + idP1).call();

        insertAndAdd(points2);
        RevCommit c2 = geogig.command(CommitOp.class).setMessage("commit for " + idP2).call();

        insertAndAdd(points1_modified);
        RevCommit c3 = geogig.command(CommitOp.class).setMessage("commit for modified " + idP1)
                .call();

        ObjectId oId3 = insertAndAdd(points3);
        RevCommit c4 = geogig.command(CommitOp.class).setMessage("commit for " + idP3).call();

        deleteAndAdd(points3);
        RevCommit c5 = geogig.command(CommitOp.class).setMessage("commit for deleted " + idP3)
                .call();
View Full Code Here

        assertEquals(c1.getId(), log.next().getId());
    }

    @Test
    public void testRevertWithoutCommit() throws Exception {
        ObjectId oId1 = insertAndAdd(points1);
        RevCommit c1 = geogig.command(CommitOp.class).setMessage("commit for " + idP1).call();

        insertAndAdd(points2);
        RevCommit c2 = geogig.command(CommitOp.class).setMessage("commit for " + idP2).call();

        insertAndAdd(points1_modified);
        RevCommit c3 = geogig.command(CommitOp.class).setMessage("commit for modified " + idP1)
                .call();

        ObjectId oId3 = insertAndAdd(points3);
        RevCommit c4 = geogig.command(CommitOp.class).setMessage("commit for " + idP3).call();

        deleteAndAdd(points3);
        RevCommit c5 = geogig.command(CommitOp.class).setMessage("commit for deleted " + idP3)
                .call();
View Full Code Here

        @SuppressWarnings("unused")
        RevCommit c1 = geogig.command(CommitOp.class).setMessage("commit for " + idP1).call();
        deleteAndAdd(points1);
        RevCommit c2 = geogig.command(CommitOp.class).setMessage("commit for removing " + idP1)
                .call();
        @SuppressWarnings("unused")
        ObjectId oId1 = insertAndAdd(points1);
        @SuppressWarnings("unused")
        RevCommit c3 = geogig.command(CommitOp.class).setMessage("commit for " + idP1 + " again")
                .call();
        try {
View Full Code Here

    }

    @Test
    public void testRevertToSameFeatureIsNotConflict() throws Exception {
        @SuppressWarnings("unused")
        ObjectId oId1 = insertAndAdd(points1);
        @SuppressWarnings("unused")
        RevCommit c1 = geogig.command(CommitOp.class).setMessage("commit for " + idP1).call();
        insertAndAdd(points1_modified);
        RevCommit c2 = geogig.command(CommitOp.class).setMessage("commit for modified " + idP1)
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.api.ObjectId

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.