/** * Constructor to use the provided {@code GeoGIG} instance and never try to close it. */ public GeogigCLI(final GeoGIG geogig, final Console consoleReader) { this.consoleReader = consoleReader; this.platform = new DefaultPlatform(); this.providedGeogig = geogig; }
/** * Constructor to use the provided {@code GeoGIG} instance and never try to close it. */ public GeogigCLI(final GeoGIG geogig, final Console consoleReader) { this.consoleReader = consoleReader; this.platform = new DefaultPlatform(); this.providedGeogig = geogig; }
public CommitBuilder() { this(new DefaultPlatform()); }
@Override public Platform get() { if (resolved == null) { Hints hints = this.hints.get(); resolved = (Platform) hints.get(Hints.PLATFORM).or(new DefaultPlatform()); } return resolved; } }
@Override protected IndexDatabase createIndexDatabase(boolean readOnly) { Platform platform = new DefaultPlatform(); Hints hints = new Hints(); hints.set(Hints.OBJECTS_READ_ONLY, readOnly); HeapIndexDatabase heapIndexDatabase = new HeapIndexDatabase(platform, hints); return heapIndexDatabase; }
@Override protected ObjectStore createObjectStore() throws IOException { Platform platform = new DefaultPlatform(); platform.setWorkingDir(tmp.getRoot()); tmp.newFolder(".geogig"); Hints hints = Hints.readWrite().platform(platform); try { hints.set(Hints.REPOSITORY_URL, tmp.getRoot().toURI().toURL()); } catch (MalformedURLException e) { throw Throwables.propagate(e); } return new RocksdbObjectStore(platform, hints); }
@Override protected HeapObjectDatabase createOpen(boolean readOnly) { Platform platform = new DefaultPlatform(); Hints hints = new Hints(); hints.set(Hints.OBJECTS_READ_ONLY, readOnly); HeapObjectDatabase store = new HeapObjectDatabase(platform, hints); store.open(); return store; }