public interface TripleHandler extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Will be called last and exactly once.
|
void |
closeContext(ExtractionContext context)
Informs the handler that no more triples will come from a
previously opened context.
|
void |
endDocument(org.eclipse.rdf4j.model.IRI documentIRI)
Informs the handler that the end of the document
has been reached.
|
void |
openContext(ExtractionContext context)
Informs the handler that a new context has been established.
|
void |
receiveNamespace(String prefix,
String uri,
ExtractionContext context)
Invoked with a currently open context, notifies the detection of a
namespace.
|
void |
receiveTriple(org.eclipse.rdf4j.model.Resource s,
org.eclipse.rdf4j.model.IRI p,
org.eclipse.rdf4j.model.Value o,
org.eclipse.rdf4j.model.IRI g,
ExtractionContext context)
Invoked with a currently open context,
notifies the detection of a triple.
|
void |
setContentLength(long contentLength)
Sets the length of the content to be processed.
|
void |
startDocument(org.eclipse.rdf4j.model.IRI documentIRI) |
void startDocument(org.eclipse.rdf4j.model.IRI documentIRI)
throws TripleHandlerException
TripleHandlerExceptionvoid openContext(ExtractionContext context) throws TripleHandlerException
context - an instantiated ExtractionContextTripleHandlerException - if there is an errr opening the
ExtractionContextvoid receiveTriple(org.eclipse.rdf4j.model.Resource s,
org.eclipse.rdf4j.model.IRI p,
org.eclipse.rdf4j.model.Value o,
org.eclipse.rdf4j.model.IRI g,
ExtractionContext context)
throws TripleHandlerException
s - triple subject, cannot be null.p - triple predicate, cannot be null.o - triple object, cannot be null.g - triple graph, can be null.context - extraction context.TripleHandlerException - if there is an error receiving the triple.void receiveNamespace(String prefix, String uri, ExtractionContext context) throws TripleHandlerException
prefix - namespace prefix.uri - namespace IRI.context - namespace context.TripleHandlerException - if there is an error receiving the namespace.void closeContext(ExtractionContext context) throws TripleHandlerException
context - the context to be closed.TripleHandlerException - if there is an error closing the
ExtractionContext.void endDocument(org.eclipse.rdf4j.model.IRI documentIRI)
throws TripleHandlerException
documentIRI - document IRI.TripleHandlerException - if there is an error ending the document.void setContentLength(long contentLength)
contentLength - length of the content being processed.void close()
throws TripleHandlerException
close in interface AutoCloseableTripleHandlerException - if there is an error closing the
TripleHandler implementation.Copyright © 2010–2019 The Apache Software Foundation. All rights reserved.