Package com.tagtraum.core.rdf
Class TurtleWriter
- java.lang.Object
-
- com.tagtraum.core.rdf.NTripleWriter
-
- com.tagtraum.core.rdf.TurtleWriter
-
- All Implemented Interfaces:
StatementWriter
,Closeable
,AutoCloseable
public class TurtleWriter extends NTripleWriter
Writer for Turtle documents. This implementation is rather limited and incomplete, but succeeds in writing documents that can be read byTurtleReader
.- Author:
- Hendrik Schreiber
- See Also:
TurtleReader
-
-
Field Summary
-
Fields inherited from class com.tagtraum.core.rdf.NTripleWriter
writer
-
-
Constructor Summary
Constructors Constructor Description TurtleWriter(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.protected void
writeEndOfStatement()
void
writePrefix(String prefix, String iri)
-
Methods inherited from class com.tagtraum.core.rdf.NTripleWriter
write
-
-
-
-
Constructor Detail
-
TurtleWriter
public TurtleWriter(Writer writer)
-
-
Method Detail
-
writePrefix
public void writePrefix(String prefix, String iri) throws IOException
- Throws:
IOException
-
writeEndOfStatement
protected void writeEndOfStatement()
- Overrides:
writeEndOfStatement
in classNTripleWriter
-
process
protected String process(Value value)
Description copied from class:NTripleWriter
Convert plain vanilla IRI to another (potentially compressed) representation.- Overrides:
process
in classNTripleWriter
- Parameters:
value
- value- Returns:
- IRI representation
-
processSubject
protected String processSubject(Value subject)
Description copied from class:NTripleWriter
Convert plain vanilla IRIs to another (potentially compressed) representation.- Overrides:
processSubject
in classNTripleWriter
- Parameters:
subject
- value- Returns:
- IRI representation
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classNTripleWriter
- Throws:
IOException
-
-