All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.jsonldjava.sesame.SesameJSONLDWriterFactory Maven / Gradle / Ivy

The newest version!
/**
 * 
 */
package com.github.jsonldjava.sesame;

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);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy