public abstract class AbstractNIFWriter extends Object implements NIFWriter
| Modifier and Type | Field and Description |
|---|---|
private String |
httpContentType |
private String |
language |
private DocumentListWriter |
writer |
| Constructor and Description |
|---|
AbstractNIFWriter(String httpContentType,
String language) |
| Modifier and Type | Method and Description |
|---|---|
protected com.hp.hpl.jena.rdf.model.Model |
createNIFModel(List<Document> document) |
String |
getHttpContentType()
This method should return the HTTP content type string for the data that
is created by this writer.
|
String |
writeNIF(List<Document> document)
Writes the given lost of
Document instances as NIF data to a
String. |
void |
writeNIF(List<Document> document,
OutputStream os)
Writes the given lost of
Document instances as NIF data to the
given OutputStream. |
void |
writeNIF(List<Document> document,
Writer writer)
|
private String httpContentType
private String language
private DocumentListWriter writer
public String getHttpContentType()
NIFWritergetHttpContentType in interface NIFWriterpublic String writeNIF(List<Document> document)
NIFWriterDocument instances as NIF data to a
String.public void writeNIF(List<Document> document, OutputStream os)
NIFWriterDocument instances as NIF data to the
given OutputStream.writeNIF in interface NIFWriterdocument - the list of Document instances that should be written
as NIF dataos - the OutputStream to which the NIF data should be
writtenpublic void writeNIF(List<Document> document, Writer writer)
NIFWriterDocument instances as NIF data to the
given Writer.
Note that following the recommendations of the Jena framework we
highly recommend to use NIFWriter.writeNIF(List, OutputStream) instead of
using a Writer since the OutputStream is not relying on a
specific encoding.
Copyright © 2016. All rights reserved.