Package com.complexible.common.rdf.rio
Class DelegatingRDFStream
- java.lang.Object
-
- com.complexible.common.rdf.rio.DelegatingRDFStream
-
-
Constructor Summary
Constructors Constructor Description DelegatingRDFStream(RDFStream theStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
bytesRead()
void
close()
long
estimatedCount()
Resource
getContext()
Returns the default context associated with this stream ornull
if there is no default context.java.lang.String
getName()
Returns the name of this stream.boolean
hasContext()
Returnstrue
either if this stream has a non-nullcontext
or the statements generated by this stream has contexts.long
length()
void
parse(RDFHandler theHandler)
Parses the stream and passes the statements to the given handler.
-
-
-
Constructor Detail
-
DelegatingRDFStream
public DelegatingRDFStream(RDFStream theStream)
-
-
Method Detail
-
parse
public void parse(RDFHandler theHandler) throws java.io.IOException, InvalidRDF, RDFHandlerException
Description copied from interface:RDFStream
Parses the stream and passes the statements to the given handler.- Specified by:
parse
in interfaceRDFStream
- Throws:
java.io.IOException
InvalidRDF
RDFHandlerException
-
getContext
public Resource getContext()
Description copied from interface:RDFStream
Returns the default context associated with this stream ornull
if 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:
getContext
in interfaceRDFStream
-
hasContext
public boolean hasContext()
Description copied from interface:RDFStream
Returnstrue
either if this stream has a non-nullcontext
or the statements generated by this stream has contexts.- Specified by:
hasContext
in interfaceRDFStream
-
getName
public java.lang.String getName()
Description copied from interface:RDFStream
Returns 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.
-
estimatedCount
public long estimatedCount()
- Specified by:
estimatedCount
in interfaceRDFStream
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-