public final class DeidentifiedQueryResultsHandler extends AbstractQueryResultsHandler
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Requests cancellation of whatever this object is currently doing.
|
void |
close()
Called by Protempa after
#handleFinish() to clean up any
resources used by the handler. |
void |
finish()
Called by Protempa as soon as all query results have been retrieved from
the data source.
|
String |
getId()
Gets the query result handler's identifier string for logging and
internal purposes.
|
void |
handleQueryResult(String keyId,
List<Proposition> propositions,
Map<Proposition,List<Proposition>> forwardDerivations,
Map<Proposition,List<Proposition>> backwardDerivations,
Map<UniqueId,Proposition> references)
Handles a single query result, which is the list of propositions
associated with the given key.
|
void |
start(Collection<PropositionDefinition> cache)
Called by Protempa prior to the first invocation of
QueryResultsHandler.handleQueryResult(java.lang.String, java.util.List, java.util.Map, java.util.Map, java.util.Map). |
void |
validate()
Validates this query results handler's specification.
|
getDisplayNamepublic String getId()
QueryResultsHandlergetId in interface QueryResultsHandlergetId in class AbstractQueryResultsHandlerpublic void validate()
throws QueryResultsHandlerValidationFailedException
QueryResultsHandlervalidate in interface QueryResultsHandlervalidate in class AbstractQueryResultsHandlerQueryResultsHandlerValidationFailedException - if validation
failed.public void start(Collection<PropositionDefinition> cache) throws QueryResultsHandlerProcessingException
QueryResultsHandlerQueryResultsHandler.handleQueryResult(java.lang.String, java.util.List, java.util.Map, java.util.Map, java.util.Map).
Implementers of this method may perform arbitrary processing related to
the output of the handler, such as printing out headers of a file or
extracting metadata for the handler's output.start in interface QueryResultsHandlerstart in class AbstractQueryResultsHandlercache - a cache of all of the proposition definitions that were
queried.QueryResultsHandlerProcessingException - if any exceptions occur at
a lower level.public void handleQueryResult(String keyId, List<Proposition> propositions, Map<Proposition,List<Proposition>> forwardDerivations, Map<Proposition,List<Proposition>> backwardDerivations, Map<UniqueId,Proposition> references) throws QueryResultsHandlerProcessingException
QueryResultsHandlerkeyId - the identifying key id for the resultpropositions - the proposition results for the given key as a newly
created List.QueryResultsHandlerProcessingExceptionpublic void finish()
throws QueryResultsHandlerProcessingException
QueryResultsHandlerfinish in interface QueryResultsHandlerfinish in class AbstractQueryResultsHandlerQueryResultsHandlerProcessingException - if any exceptions occur at
a lower levelpublic void close()
throws QueryResultsHandlerCloseException
QueryResultsHandler#handleFinish() to clean up any
resources used by the handler. It is called always, even if a previous
step failed.close in interface AutoCloseableclose in interface QueryResultsHandlerclose in class AbstractQueryResultsHandlerQueryResultsHandlerCloseException - if any exceptions occur at a
lower levelpublic void cancel()
QueryResultsHandlerQueryResultsHandler.finish() has not been called yet, it will be skipped. If
QueryResultsHandler.close() has not been called yet, it will be called, and it
must finish cleaning up all resources associated with this query
results handler.cancel in interface QueryResultsHandlercancel in class AbstractQueryResultsHandlerCopyright © 2012–2016 Emory University. All rights reserved.