org.openrdf.query.resultio.sparqljson.SPARQLResultsJSONWriterFactory Java Examples

The following examples show how to use org.openrdf.query.resultio.sparqljson.SPARQLResultsJSONWriterFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SPARQLQuery.java    From neo4j-sparql-extension with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Returns a {@link TupleQueryResultWriterFactory} that returns a writer
 * that writes SPARQL query results in the format of a given MIME-Type.
 *
 * @param mimetype the mimetype
 * @return the corresponding query result writer factory
 */
private TupleQueryResultWriterFactory getTupleWriterFactory(String mimetype) {
	switch (mimetype) {
		default:
		case RDFMediaType.SPARQL_RESULTS_JSON:
			return new SPARQLResultsJSONWriterFactory();
		case RDFMediaType.SPARQL_RESULTS_XML:
			return new SPARQLResultsXMLWriterFactory();
		case RDFMediaType.SPARQL_RESULTS_CSV:
			return new SPARQLResultsCSVWriterFactory();
		case RDFMediaType.SPARQL_RESULTS_TSV:
			return new SPARQLResultsTSVWriterFactory();
	}
}