Examples of objectDatabase()


Examples of org.locationtech.geogig.api.Context.objectDatabase()

    private RevTreeBuilder addTree(RevTreeBuilder root, final String treePath,
            String... singleNodeNames) {

        Context mockInjector = mock(Context.class);
        when(mockInjector.objectDatabase()).thenReturn(odb);
        CreateTree op = new CreateTree().setIndex(false);
        op.setContext(mockInjector);
        RevTreeBuilder subTreeBuilder =op.call();
       
        if (singleNodeNames != null) {
View Full Code Here

Examples of org.locationtech.geogig.api.Context.objectDatabase()

        };

        Context injector = Guice.createInjector(Modules.override(new CachingModule()).with(module))
                .getInstance(org.locationtech.geogig.api.Context.class);

        odb = injector.objectDatabase();
        index = injector.stagingDatabase();
        odb.open();
        index.open();

        odb.put(o1);
View Full Code Here

Examples of org.locationtech.geogig.api.Context.objectDatabase()

    @Before
    public void setUp() {
        Context injector = Guice.createInjector(Modules.override(new GeogigModule()).with(
                new MemoryModule(null))).getInstance(Context.class);

        odb = injector.objectDatabase();
        indexDb = injector.stagingDatabase();
        odb.open();
        indexDb.open();

        writeBack = injector.command(WriteBack.class);
View Full Code Here

Examples of org.locationtech.geogig.api.Context.objectDatabase()

        if (parentNode.isPresent()) {
            metadataId = parentNode.get().getMetadataId();
            Optional<RevTree> parsed = geogig.command(RevObjectParse.class)
                    .setObjectId(parentNode.get().getNode().getObjectId()).call(RevTree.class);
            checkState(parsed.isPresent(), "Parent tree couldn't be found in the repository.");
            treeBuilder = new RevTreeBuilder(geogig.objectDatabase(), parsed.get());
            treeBuilder.remove(node.getNode().getName());
        } else {
            treeBuilder = new RevTreeBuilder(geogig.stagingDatabase());
        }
        treeBuilder.put(node.getNode());
View Full Code Here

Examples of org.locationtech.geogig.repository.Repository.objectDatabase()

                builder.setTreeId(newTreeId);
                builder.setCommitterTimestamp(timestamp);
                builder.setCommitterTimeZoneOffset(platform.timeZoneOffset(timestamp));

                RevCommit newCommit = builder.build();
                repository.objectDatabase().put(newCommit);

                rebaseHead = newCommit.getId();

                command(UpdateRef.class).setName(currentBranch).setNewValue(rebaseHead).call();
                command(UpdateSymRef.class).setName(Ref.HEAD).setNewValue(currentBranch).call();
View Full Code Here

Examples of org.locationtech.geogig.repository.Repository.objectDatabase()

            builder.setTreeId(newTreeId);
            builder.setCommitterTimestamp(timestamp);
            builder.setCommitterTimeZoneOffset(platform.timeZoneOffset(timestamp));

            RevCommit newCommit = builder.build();
            repository.objectDatabase().put(newCommit);

            rebaseHead = newCommit.getId();

            command(UpdateRef.class).setName(currentBranch).setNewValue(rebaseHead).call();
            command(UpdateSymRef.class).setName(Ref.HEAD).setNewValue(currentBranch).call();
View Full Code Here

Examples of org.locationtech.geogig.repository.Repository.objectDatabase()

            CommitBuilder builder = new CommitBuilder(commit);
            builder.setParentIds(newParents);
            builder.setTreeId(newTreeId);

            RevCommit mapped = builder.build();
            to.objectDatabase().put(mapped);

            from.graphDatabase().map(commit.getId(), mapped.getId());
            from.graphDatabase().map(mapped.getId(), commit.getId());

        }
View Full Code Here

Examples of org.locationtech.geogig.repository.Repository.objectDatabase()

                repository = repository();
            }
            try {
                repository.open();
                // make sure the repo has the empty tree
                ObjectDatabase objectDatabase = repository.objectDatabase();
                objectDatabase.put(RevTree.EMPTY);
            } catch (RepositoryConnectionException e) {
                throw new IllegalStateException("Error opening repository databases: "
                        + e.getMessage(), e);
            }
View Full Code Here

Examples of org.locationtech.geogig.repository.Repository.objectDatabase()

                        // We add it and consider it unconflicted
                        report.addUnconflicted(diff);
                        break;
                    }
                    RevFeature feature = (RevFeature) obj.get();
                    DepthSearch depthSearch = new DepthSearch(repository.objectDatabase());
                    Optional<NodeRef> noderef = depthSearch
                            .find(this.workingTree().getTree(), path);
                    RevFeatureType featureType = command(RevObjectParse.class)
                            .setObjectId(noderef.get().getMetadataId()).call(RevFeatureType.class)
                            .get();
View Full Code Here

Examples of org.locationtech.geogig.repository.Repository.objectDatabase()

                builder.setParentIds(newParents);
                builder.setTreeId(newTreeId);

                RevCommit mapped = builder.build();
                repository.objectDatabase().put(mapped);
                newCommitId = mapped.getId();

            } catch (IOException e) {
                throw new RuntimeException(e);
            }
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.