當前位置: 首頁>>代碼示例>>Java>>正文


Java RDFXMLWriterFactory類代碼示例

本文整理匯總了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;
	}
}
 
開發者ID:lszeremeta,項目名稱:neo4j-sparql-extension-yars,代碼行數:23,代碼來源:RepositoryRegistry.java

示例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;
	}
}
 
開發者ID:niclashoyer,項目名稱:neo4j-sparql-extension,代碼行數:21,代碼來源:RepositoryRegistry.java

示例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 );
}
 
開發者ID:apache,項目名稱:polygene-java,代碼行數:8,代碼來源:ApplicationXmlTest.java


注:本文中的org.openrdf.rio.rdfxml.RDFXMLWriterFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。