01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 2007.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.rio.trig;
07:
08: import java.io.OutputStream;
09: import java.io.Writer;
10:
11: import org.openrdf.rio.RDFFormat;
12: import org.openrdf.rio.RDFWriter;
13: import org.openrdf.rio.RDFWriterFactory;
14:
15: /**
16: * An {@link RDFWriterFactory} for TriG parsers.
17: *
18: * @author Arjohn Kampman
19: */
20: public class TriGWriterFactory implements RDFWriterFactory {
21:
22: /**
23: * Returns {@link RDFFormat#TRIG}.
24: */
25: public RDFFormat getRDFFormat() {
26: return RDFFormat.TRIG;
27: }
28:
29: /**
30: * Returns a new instance of {@link TriGWriter}.
31: */
32: public RDFWriter getWriter(OutputStream out) {
33: return new TriGWriter(out);
34: }
35:
36: /**
37: * Returns a new instance of {@link TriGWriter}.
38: */
39: public RDFWriter getWriter(Writer writer) {
40: return new TriGWriter(writer);
41: }
42: }
|