本文整理了Java中org.apache.tinkerpop.gremlin.util.config.YamlConfiguration.getRootNode()
方法的一些代码示例,展示了YamlConfiguration.getRootNode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlConfiguration.getRootNode()
方法的具体详情如下:
包路径:org.apache.tinkerpop.gremlin.util.config.YamlConfiguration
类名称:YamlConfiguration
方法名:getRootNode
暂无
代码示例来源:origin: apache/tinkerpop
@Override
public void load(final Reader in) throws ConfigurationException {
try {
this.loadHierarchy(this.getRootNode(), yaml.load(in));
} catch (Throwable e) {
throw new ConfigurationException("Failed to load configuration: " + e.getMessage(), e);
}
}
代码示例来源:origin: apache/tinkerpop
@Override
public void save(final Writer out) throws ConfigurationException {
try {
yaml.dump(this.saveHierarchy(this.getRootNode()), out);
} catch (Throwable e) {
throw new ConfigurationException("Failed to save configuration: " + e.getMessage(), e);
}
}
代码示例来源:origin: hugegraph/hugegraph
public static void main(String[] args)
throws ConfigurationException, InterruptedException {
E.checkArgument(args.length == 1,
"Init store only accept one config file.");
E.checkArgument(args[0].endsWith(".yaml"),
"Init store only accept yaml config file.");
String confFile = args[0];
RegisterUtil.registerBackends();
YamlConfiguration config = new YamlConfiguration();
config.load(confFile);
List<ConfigurationNode> nodes = config.getRootNode()
.getChildren(GRAPHS);
E.checkArgument(nodes.size() == 1,
"Must contain one '%s' in config file '%s'",
GRAPHS, confFile);
List<ConfigurationNode> graphNames = nodes.get(0).getChildren();
E.checkArgument(!graphNames.isEmpty(),
"Must contain at least one graph");
for (ConfigurationNode graphName : graphNames) {
String configPath = graphName.getValue().toString();
initGraph(configPath);
}
HugeGraph.shutdown(30L);
}
代码示例来源:origin: org.apache.tinkerpop/gremlin-core
@Override
public void save(final Writer out) throws ConfigurationException {
try {
yaml.dump(this.saveHierarchy(this.getRootNode()), out);
} catch (Throwable e) {
throw new ConfigurationException("Failed to save configuration: " + e.getMessage(), e);
}
}
代码示例来源:origin: org.apache.tinkerpop/gremlin-core
@Override
public void load(final Reader in) throws ConfigurationException {
try {
this.loadHierarchy(this.getRootNode(), yaml.load(in));
} catch (Throwable e) {
throw new ConfigurationException("Failed to load configuration: " + e.getMessage(), e);
}
}
内容来源于网络,如有侵权,请联系作者删除!