com.github.jsonldjava.impl.SesameJSONLDWriterFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsonld-java-sesame Show documentation
Show all versions of jsonld-java-sesame Show documentation
JSON-LD Java integration module for Sesame
/**
*
*/
package com.github.jsonldjava.impl;
import java.io.OutputStream;
import java.io.Writer;
import org.openrdf.rio.RDFFormat;
import org.openrdf.rio.RDFWriter;
import org.openrdf.rio.RDFWriterFactory;
/**
* An {@link RDFWriterFactory} that creates instances of
* {@link SesameJSONLDWriter}.
*
* @author Peter Ansell [email protected]
*/
public class SesameJSONLDWriterFactory implements RDFWriterFactory {
@Override
public RDFFormat getRDFFormat() {
return RDFFormat.JSONLD;
}
@Override
public RDFWriter getWriter(OutputStream out) {
return new SesameJSONLDWriter(out);
}
@Override
public RDFWriter getWriter(Writer writer) {
return new SesameJSONLDWriter(writer);
}
}