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.rdfxml.util;
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 RDF/XML writers.
17: *
18: * @author Arjohn Kampman
19: */
20: public class RDFXMLPrettyWriterFactory implements RDFWriterFactory {
21:
22: /**
23: * Returns {@link RDFFormat#RDFXML}.
24: */
25: public RDFFormat getRDFFormat() {
26: return RDFFormat.RDFXML;
27: }
28:
29: /**
30: * Returns a new instance of {@link RDFXMLPrettyWriter}.
31: */
32: public RDFWriter getWriter(OutputStream out) {
33: return new RDFXMLPrettyWriter(out);
34: }
35:
36: /**
37: * Returns a new instance of {@link RDFXMLPrettyWriter}.
38: */
39: public RDFWriter getWriter(Writer writer) {
40: return new RDFXMLPrettyWriter(writer);
41: }
42: }
|