Package com.tagtraum.core.rdf
Class NTripleReader
- java.lang.Object
-
- com.tagtraum.core.rdf.NTripleReader
-
- All Implemented Interfaces:
StatementReader
,Closeable
,AutoCloseable
public class NTripleReader extends Object implements StatementReader
NTripleReader.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description NTripleReader(Reader reader)
NTripleReader(Reader reader, boolean valueCaching)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
isValueCaching()
Indicates whether this reader attempt to cache values (subject, predicate, or object) in order to reduce memory usage.protected String
preProcess(String trimmedLine)
Statement
readStatement()
Read one statement at a time.void
setValueCaching(boolean valueCaching)
Turn caching ofValue
s on or off.static String
unescape(String s)
-
-
-
Method Detail
-
isValueCaching
public boolean isValueCaching()
Description copied from interface:StatementReader
Indicates whether this reader attempt to cache values (subject, predicate, or object) in order to reduce memory usage.- Specified by:
isValueCaching
in interfaceStatementReader
- Returns:
- true or false
-
setValueCaching
public void setValueCaching(boolean valueCaching)
Description copied from interface:StatementReader
Turn caching ofValue
s on or off.- Specified by:
setValueCaching
in interfaceStatementReader
- Parameters:
valueCaching
-true
orfalse
-
readStatement
public Statement readStatement() throws IOException
Description copied from interface:StatementReader
Read one statement at a time.- Specified by:
readStatement
in interfaceStatementReader
- Returns:
- statement
- Throws:
IOException
- if something goes wrong
-
preProcess
protected String preProcess(String trimmedLine) throws IOException
- Parameters:
trimmedLine
- line that has already been trimmed- Returns:
- transformed line.
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-