作者热门文章
- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中xdi2.core.io.XDIReaderRegistry.getAuto()
方法的一些代码示例,展示了XDIReaderRegistry.getAuto()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XDIReaderRegistry.getAuto()
方法的具体详情如下:
包路径:xdi2.core.io.XDIReaderRegistry
类名称:XDIReaderRegistry
方法名:getAuto
[英]Returns an XDIReader for auto-detecting the format.
[中]返回自动检测格式的XDIReader。
代码示例来源:origin: projectdanube/xdi2
/**
* Returns an XDIReader for the specified format, e.g.
* <ul>
* <li>XDI/JSON</li>
* <li>XDI DISPLAY</li>
* </ul>
* @return An XDIReader, or null if no appropriate implementation could be found.
*/
public static XDIReader forFormat(String format, Properties parameters) {
if (format == null) return XDIReaderRegistry.getDefault();
if (AutoReader.FORMAT_NAME.equalsIgnoreCase(format)) return getAuto();
Class<? extends XDIReader> readerClass = readerClassesByFormat.get(format);
if (readerClass == null) return null;
try {
Constructor<? extends XDIReader> constructor = readerClass.getConstructor(Properties.class);
return constructor.newInstance(parameters);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
代码示例来源:origin: projectdanube/xdi2
@Override
public Graph parseGraph(String string) throws IOException, Xdi2ParseException {
Graph graph = this.openGraph();
XDIReaderRegistry.getAuto().read(graph, new StringReader(string));
return graph;
}
代码示例来源:origin: projectdanube/xdi2
@Override
public Graph loadGraph(Reader reader) throws IOException, Xdi2ParseException {
Graph graph = this.openGraph();
XDIReaderRegistry.getAuto().read(graph, reader);
return graph;
}
代码示例来源:origin: projectdanube/xdi2
@Override
public Graph loadGraph(InputStream inputStream) throws IOException, Xdi2ParseException {
Graph graph = this.openGraph();
XDIReaderRegistry.getAuto().read(graph, inputStream);
return graph;
}
代码示例来源:origin: projectdanube/xdi2
reader = XDIReaderRegistry.getAuto();
reader = XDIReaderRegistry.getAuto();
代码示例来源:origin: projectdanube/xdi2
XDIReader reader = XDIReaderRegistry.getAuto();
代码示例来源:origin: projectdanube/xdi2
XDIReader xdiReader = XDIReaderRegistry.getAuto();
XDIReader xdiReader = XDIReaderRegistry.getAuto();
我是一名优秀的程序员,十分优秀!