Package com.complexible.common.rdf.rio
Class DelegatingRDFStream
java.lang.Object
com.complexible.common.rdf.rio.DelegatingRDFStream
- All Implemented Interfaces:
RDFStream,Closeable,AutoCloseable
- Since:
- 7.1
- Author:
- Pavel Klinov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongSupposed to return the number currently parsed.voidclose()longEstimated size of statements.Returns the default context associated with this stream ornullif there is no default context.getName()Returns the name of this stream.booleanReturnstrueeither if this stream has a non-nullcontextor the statements generated by this stream has contexts.longlength()voidparse(RDFHandler theHandler) Parses the stream and passes the statements to the given handler.
-
Constructor Details
-
DelegatingRDFStream
-
-
Method Details
-
parse
Description copied from interface:RDFStreamParses the stream and passes the statements to the given handler.- Specified by:
parsein interfaceRDFStream- Throws:
IOExceptionInvalidRDFRDFHandlerException
-
getContext
Description copied from interface:RDFStreamReturns the default context associated with this stream ornullif there is no default context. Note that, the statements that will be sent to the handler may not be using this context and the user of this stream should make sure the context information is used correctly.- Specified by:
getContextin interfaceRDFStream
-
hasContext
public boolean hasContext()Description copied from interface:RDFStreamReturnstrueeither if this stream has a non-nullcontextor the statements generated by this stream has contexts.- Specified by:
hasContextin interfaceRDFStream
-
getName
Description copied from interface:RDFStreamReturns the name of this stream. If the stream is backed by a file this will return the file's name. Otherwise it might be an auto-generated name or some other (not necessarily unique) name. -
bytesRead
public long bytesRead()Description copied from interface:RDFStreamSupposed to return the number currently parsed. Can be used for progress reporting from RDFHandler -
length
public long length() -
estimatedCount
public long estimatedCount()Description copied from interface:RDFStreamEstimated size of statements. Might be accurate or calculate only from the data size. Given N bytes in an RDFStream, the estimated number of statements depends on the RDF format. RDF stream may or may not be compressed, which also impacts the bytes-to-statements ratio.- Specified by:
estimatedCountin interfaceRDFStream- Returns:
- estimated size of statements.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-