本文整理汇总了Java中org.openrdf.rio.rdfxml.RDFXMLWriterFactory类的典型用法代码示例。如果您正苦于以下问题:Java RDFXMLWriterFactory类的具体用法?Java RDFXMLWriterFactory怎么用?Java RDFXMLWriterFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RDFXMLWriterFactory类属于org.openrdf.rio.rdfxml包,在下文中一共展示了RDFXMLWriterFactory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initRio
import org.openrdf.rio.rdfxml.RDFXMLWriterFactory; //导入依赖的package包/类
/**
* This is needed, because Rio is unable to find the Parser/Writer Factories
* automatically when the jar gets deployed as plugin inside the Neo4j
* Server.
*/
private synchronized void initRio() {
if (!rioInitialized) {
RDFParserRegistry parserRegistry = RDFParserRegistry.getInstance();
parserRegistry.add(new TurtleParserFactory());
parserRegistry.add(new YARSParserFactory());
parserRegistry.add(new RDFXMLParserFactory());
parserRegistry.add(new NTriplesParserFactory());
parserRegistry.add(new RDFJSONParserFactory());
RDFWriterRegistry writerRegistry = RDFWriterRegistry.getInstance();
writerRegistry.add(new TurtleWriterFactory());
writerRegistry.add(new YARSWriterFactory());
writerRegistry.add(new RDFXMLWriterFactory());
writerRegistry.add(new NTriplesWriterFactory());
writerRegistry.add(new RDFJSONWriterFactory());
rioInitialized = true;
}
}
示例2: initRio
import org.openrdf.rio.rdfxml.RDFXMLWriterFactory; //导入依赖的package包/类
/**
* This is needed, because Rio is unable to find the Parser/Writer Factories
* automatically when the jar gets deployed as plugin inside the Neo4j
* Server.
*/
private synchronized void initRio() {
if (!rioInitialized) {
RDFParserRegistry parserRegistry = RDFParserRegistry.getInstance();
parserRegistry.add(new TurtleParserFactory());
parserRegistry.add(new RDFXMLParserFactory());
parserRegistry.add(new NTriplesParserFactory());
parserRegistry.add(new RDFJSONParserFactory());
RDFWriterRegistry writerRegistry = RDFWriterRegistry.getInstance();
writerRegistry.add(new TurtleWriterFactory());
writerRegistry.add(new RDFXMLWriterFactory());
writerRegistry.add(new NTriplesWriterFactory());
writerRegistry.add(new RDFJSONWriterFactory());
rioInitialized = true;
}
}
示例3: writeXml
import org.openrdf.rio.rdfxml.RDFXMLWriterFactory; //导入依赖的package包/类
private void writeXml( Iterable<Statement> graph )
throws RDFHandlerException, IOException
{
RDFWriterFactory writerFactory = new RDFXMLWriterFactory();
RDFWriter writer = writerFactory.getWriter( System.out );
writeOutput( writer, graph );
}