Package com.tagtraum.core.rdf
Class NTripleWriter
- java.lang.Object
-
- com.tagtraum.core.rdf.NTripleWriter
-
- All Implemented Interfaces:
StatementWriter
,Closeable
,AutoCloseable
- Direct Known Subclasses:
TurtleWriter
public class NTripleWriter extends Object implements StatementWriter
NTripleWriter.- Author:
- Hendrik Schreiber
-
-
Field Summary
Fields Modifier and Type Field Description protected BufferedWriter
writer
-
Constructor Summary
Constructors Constructor Description NTripleWriter(Writer writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected String
process(Value value)
Convert plain vanilla IRI to another (potentially compressed) representation.protected String
processSubject(Value subject)
Convert plain vanilla IRIs to another (potentially compressed) representation.void
write(Statement statement)
protected void
writeEndOfStatement()
-
-
-
Field Detail
-
writer
protected final BufferedWriter writer
-
-
Constructor Detail
-
NTripleWriter
public NTripleWriter(Writer writer)
-
-
Method Detail
-
write
public void write(Statement statement) throws IOException
- Specified by:
write
in interfaceStatementWriter
- Throws:
IOException
-
writeEndOfStatement
protected void writeEndOfStatement() throws IOException
- Throws:
IOException
-
process
protected String process(Value value)
Convert plain vanilla IRI to another (potentially compressed) representation.- Parameters:
value
- value- Returns:
- IRI representation
-
processSubject
protected String processSubject(Value subject)
Convert plain vanilla IRIs to another (potentially compressed) representation.- Parameters:
subject
- value- Returns:
- IRI representation
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-