本文整理匯總了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 );
}