public abstract class AbstractRDFHandlerWrapper extends AbstractRDFHandler
RDFHandler
+ AutoCloseable
wrapper.
This class wraps a RDFHandler
and delegates all the methods to that instance. If the
wrapped RDFHandler
is AutoCloseable
, then also calls to
AutoCloseable.close()
are delegated, with errors logged but ignored. Differently from
Sesame RDFHandlerWrapper
, this class wraps a unique RDFHandler
and thus does
not need array traversal (and its overhead) to notify a pool of RDFHandlers
.
Modifier and Type | Field and Description |
---|---|
protected org.openrdf.rio.RDFHandler |
handler
The wrapped
RDFHandler . |
Modifier | Constructor and Description |
---|---|
protected |
AbstractRDFHandlerWrapper(org.openrdf.rio.RDFHandler handler)
Creates a new instance wrapping the supplied
RDFHandler . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Delegates to the wrapped
RDFHandler , if it implements Closeable . |
void |
endRDF()
Delegates to the wrapped
RDFHandler . |
void |
handleComment(String comment)
Delegates to the wrapped
RDFHandler . |
void |
handleNamespace(String prefix,
String uri)
Delegates to the wrapped
RDFHandler . |
void |
handleStatement(org.openrdf.model.Statement statement)
Delegates to the wrapped
RDFHandler . |
void |
startRDF()
Delegates to the wrapped
RDFHandler . |
protected AbstractRDFHandlerWrapper(org.openrdf.rio.RDFHandler handler)
RDFHandler
.handler
- the RDFHandler
to wrap, not nullpublic void startRDF() throws org.openrdf.rio.RDFHandlerException
RDFHandler
.startRDF
in interface org.openrdf.rio.RDFHandler
startRDF
in class AbstractRDFHandler
org.openrdf.rio.RDFHandlerException
public void handleComment(String comment) throws org.openrdf.rio.RDFHandlerException
RDFHandler
.handleComment
in interface org.openrdf.rio.RDFHandler
handleComment
in class AbstractRDFHandler
org.openrdf.rio.RDFHandlerException
public void handleNamespace(String prefix, String uri) throws org.openrdf.rio.RDFHandlerException
RDFHandler
.handleNamespace
in interface org.openrdf.rio.RDFHandler
handleNamespace
in class AbstractRDFHandler
org.openrdf.rio.RDFHandlerException
public void handleStatement(org.openrdf.model.Statement statement) throws org.openrdf.rio.RDFHandlerException
RDFHandler
.handleStatement
in interface org.openrdf.rio.RDFHandler
handleStatement
in class AbstractRDFHandler
org.openrdf.rio.RDFHandlerException
public void endRDF() throws org.openrdf.rio.RDFHandlerException
RDFHandler
.endRDF
in interface org.openrdf.rio.RDFHandler
endRDF
in class AbstractRDFHandler
org.openrdf.rio.RDFHandlerException
public void close()
RDFHandler
, if it implements Closeable
.close
in interface AutoCloseable
close
in class AbstractRDFHandler
Copyright © 2015–2016 FBK-irst. All rights reserved.