Package org.locationtech.geogig.api

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


        };

        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

    @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

        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

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.