org.locationtech.geogig.repository.Hints.platform()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中org.locationtech.geogig.repository.Hints.platform()方法的一些代码示例,展示了Hints.platform()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hints.platform()方法的具体详情如下:
包路径:org.locationtech.geogig.repository.Hints
类名称:Hints
方法名:platform

Hints.platform介绍

[英]Sets a hint for the provided Platform
[中]为提供的平台设置提示

代码示例

代码示例来源:origin: org.locationtech.geogig/geogig-core

protected Context createInjector() {
  Platform platform = createPlatform();
  URI uri = repositoryDirectory.getAbsoluteFile().toURI();
  Hints hints = new Hints().uri(uri).platform(platform);
  return new TestContextBuilder().build(hints);
}

代码示例来源:origin: locationtech/geogig

protected Context createInjector() {
  Platform platform = createPlatform();
  URI uri = repositoryDirectory.getAbsoluteFile().toURI();
  Hints hints = new Hints().uri(uri).platform(platform);
  return new TestContextBuilder().build(hints);
}

代码示例来源:origin: locationtech/geogig

static Context createContext(File repositoryDirectory) {
  Platform platform = new TestPlatform(repositoryDirectory);
  URI uri = repositoryDirectory.getAbsoluteFile().toURI();
  Hints hints = new Hints().uri(uri).platform(platform);
  return Guice.createInjector(Modules.override(new GeogigModule())
      .with(new HintsModule(hints), new RocksStorageModule())).getInstance(Context.class);
}

代码示例来源:origin: org.locationtech.geogig/geogig-rocksdb

static Context createContext(File repositoryDirectory) {
  Platform platform = new TestPlatform(repositoryDirectory);
  URI uri = repositoryDirectory.getAbsoluteFile().toURI();
  Hints hints = new Hints().uri(uri).platform(platform);
  return Guice.createInjector(Modules.override(new GeogigModule())
      .with(new HintsModule(hints), new RocksStorageModule())).getInstance(Context.class);
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
protected Context createInjector() {
  Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
  return new JETestContextBuilder().build(hints);
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
  protected Context createInjector() {
    Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
    return new JETestContextBuilder().build(hints);
  }
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
  protected Context createInjector() {
    Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
    return new JETestContextBuilder().build(hints);
  }
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
  protected Context createInjector() {
    Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
    return new JETestContextBuilder().build(hints);
  }
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
  protected Context createInjector() {
    Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
    return new JETestContextBuilder().build(hints);
  }
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
protected Context createInjector() {
  Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
  return new JETestContextBuilder().build(hints);
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
  protected Context createInjector() {
    Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
    return new JETestContextBuilder().build(hints);
  }
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
  protected Context createInjector() {
    Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
    return new JETestContextBuilder().build(hints);
  }
}

代码示例来源:origin: org.locationtech.geogig/geogig-bdbje

@Override
  protected Context createInjector() {
    Hints hints = new Hints().uri(repositoryDirectory.toURI()).platform(createPlatform());
    return new JETestContextBuilder().build(hints);
  }
}

代码示例来源:origin: locationtech/geogig

@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 new RuntimeException(e);
  }
  return new RocksdbObjectStore(platform, hints);
}

代码示例来源:origin: locationtech/geogig

@Override
protected Context createInjector() {
  Platform platform = createPlatform();
  GlobalContextBuilder.builder(new TestContextBuilder(platform));
  URI uri = repositoryDirectory.getAbsoluteFile().toURI();
  Hints hints = new Hints().uri(uri).platform(platform);
  return GlobalContextBuilder.builder().build(hints);
}

代码示例来源:origin: org.locationtech.geogig/geogig-rocksdb

@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);
}

代码示例来源:origin: org.locationtech.geogig/geogig-datastore

@Override
protected Context createInjector() {
  Platform platform = createPlatform();
  GlobalContextBuilder.builder(new TestContextBuilder(platform));
  URI uri = repositoryDirectory.getAbsoluteFile().toURI();
  Hints hints = new Hints().uri(uri).platform(platform);
  return GlobalContextBuilder.builder().build(hints);
}

代码示例来源:origin: locationtech/geogig

public @Before void setUp() throws Exception {
  File workingDirectory = tempFolder.newFolder("mockWorkingDir");
  Platform testPlatform = new TestPlatform(workingDirectory);
  Context injector = Guice
      .createInjector(Modules.override(new GeogigModule()).with(new MemoryModule(),
          new HintsModule(new Hints().platform(testPlatform))))
      .getInstance(Context.class);
  GeoGIG geogig = new GeoGIG(injector);
  repo = geogig.getOrCreateRepository();
  command = repo.command(FindChangedTrees.class);
  ftproto = DataUtilities.createType("points", "sp:String,ip:Integer,pp:Point:srid=3857");
}

代码示例来源:origin: locationtech/geogig

private Repository initRepo(String repoName) throws IOException {
  File workingDirectory = tmp.newFolder(repoName);
  TestPlatform platform = new TestPlatform(workingDirectory, userHomeDirectry);
  GlobalContextBuilder.builder(new TestContextBuilder(platform));
  Context context = GlobalContextBuilder.builder().build(new Hints().platform(platform));
  GeoGIG geogig = new GeoGIG(context);
  geogig.command(InitOp.class).call();
  geogig.command(ConfigOp.class).setAction(ConfigOp.ConfigAction.CONFIG_SET).
      setName("user.name").setValue("geogig_test").call();
  geogig.command(ConfigOp.class).setAction(ConfigOp.ConfigAction.CONFIG_SET).
      setName("user.email").setValue("geogig_test@geogig.org").call();
  return geogig.getRepository();
}

代码示例来源:origin: org.locationtech.geogig/geogig-datastore

private Repository initRepo(String repoName) throws IOException {
  File workingDirectory = tmp.newFolder(repoName);
  TestPlatform platform = new TestPlatform(workingDirectory, userHomeDirectry);
  GlobalContextBuilder.builder(new TestContextBuilder(platform));
  Context context = GlobalContextBuilder.builder().build(new Hints().platform(platform));
  GeoGIG geogig = new GeoGIG(context);
  geogig.command(InitOp.class).call();
  geogig.command(ConfigOp.class).setAction(ConfigOp.ConfigAction.CONFIG_SET).
      setName("user.name").setValue("geogig_test").call();
  geogig.command(ConfigOp.class).setAction(ConfigOp.ConfigAction.CONFIG_SET).
      setName("user.email").setValue("geogig_test@geogig.org").call();
  return geogig.getRepository();
}

相关文章