public class ExtractionContextBlocker extends Object implements TripleHandler
TripleHandler
that can block and unblock
calls to the handler, either for the entire document, or for
individual ExtractionContext
s. A document is initially
blocked and must be explicitly unblocked. Contexts are initially
unblocked and must be explicitly blocked. Unblocking a document
unblocks all contexts as well.
This class it thread-safe.Constructor and Description |
---|
ExtractionContextBlocker(TripleHandler wrapped) |
Modifier and Type | Method and Description |
---|---|
void |
blockContext(ExtractionContext context) |
void |
close() |
void |
closeContext(ExtractionContext context) |
void |
endDocument(org.openrdf.model.URI documentURI) |
boolean |
isDocBlocked() |
void |
openContext(ExtractionContext context) |
void |
receiveNamespace(String prefix,
String uri,
ExtractionContext context) |
void |
receiveTriple(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.URI g,
ExtractionContext context) |
void |
setContentLength(long contentLength) |
void |
startDocument(org.openrdf.model.URI documentURI) |
void |
unblockContext(ExtractionContext context) |
void |
unblockDocument() |
public ExtractionContextBlocker(TripleHandler wrapped)
public boolean isDocBlocked()
public void blockContext(ExtractionContext context)
public void unblockContext(ExtractionContext context)
public void startDocument(org.openrdf.model.URI documentURI) throws TripleHandlerException
startDocument
in interface TripleHandler
TripleHandlerException
public void openContext(ExtractionContext context) throws TripleHandlerException
openContext
in interface TripleHandler
TripleHandlerException
public void closeContext(ExtractionContext context)
closeContext
in interface TripleHandler
public void unblockDocument()
public void receiveTriple(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, org.openrdf.model.URI g, ExtractionContext context) throws TripleHandlerException
receiveTriple
in interface TripleHandler
TripleHandlerException
public void receiveNamespace(String prefix, String uri, ExtractionContext context) throws TripleHandlerException
receiveNamespace
in interface TripleHandler
TripleHandlerException
public void close() throws TripleHandlerException
close
in interface TripleHandler
TripleHandlerException
public void endDocument(org.openrdf.model.URI documentURI) throws TripleHandlerException
endDocument
in interface TripleHandler
TripleHandlerException
public void setContentLength(long contentLength)
setContentLength
in interface TripleHandler
Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.