|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.fuberlin.wiwiss.wiqa.ExplainableExtension
Abstract base class for ARQ extensions that can generate explanations.
In fact, any class implementing Extension can
return explanations. This class merely provides a convenience
method returnExplanation(de.fuberlin.wiwiss.wiqa.ExplanationPart) to simplify the process.
Extensions transform iterators over Bindings. This
is extremely flexible. Extension instances are not recycled;
they are discarded after processing one iterator. An extension
can generate only one explanation.
For each input binding, exec(com.hp.hpl.jena.query.engine.QueryIterator, java.util.List, java.lang.String, com.hp.hpl.jena.query.engine1.ExecutionContext) is called. Finally,
finish(java.util.List) is called. Each call returns a QueryIterator
with some of the output bindings. The implementation is free
to chunk the output bindings in any way -- it can return some
for each exec call, or all on the finish call.
The ARQ classes QueryIterPlainWrapper, QueryIterSingleton
and QueryIterNullIterator might be useful as return values
of exec and finish.
| Field Summary | |
static Node |
EQUAL
|
static Node |
GREATER_THAN
|
static Node |
GREATER_THAN_OR_EQUAL
|
static Node |
LESS_THAN
|
static Node |
LESS_THAN_OR_EQUAL
|
static Node |
NOT_EQUAL
|
| Constructor Summary | |
ExplainableExtension()
|
|
| Method Summary | |
abstract QueryIterator |
exec(List args,
Binding binding)
Called for each binding in the input binding stream. |
QueryIterator |
exec(QueryIterator input,
List args,
String uri,
ExecutionContext execCxt)
|
abstract QueryIterator |
finish(List args)
Called after all bindings in the input binding stream have passed through. |
ExecutionContext |
getContext()
Provides the extension with access to the ExecutionContext. |
DatasetGraph |
getDataset()
Provides the extension with access to the unfiltered dataset. |
void |
returnExplanation(ExplanationPart explanation)
Returns an explanation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.hp.hpl.jena.query.extension.Extension |
build |
| Field Detail |
public static final Node GREATER_THAN
public static final Node GREATER_THAN_OR_EQUAL
public static final Node EQUAL
public static final Node LESS_THAN_OR_EQUAL
public static final Node LESS_THAN
public static final Node NOT_EQUAL
| Constructor Detail |
public ExplainableExtension()
| Method Detail |
public QueryIterator exec(QueryIterator input,
List args,
String uri,
ExecutionContext execCxt)
exec in interface Extension
public abstract QueryIterator exec(List args,
Binding binding)
args - A list of NodeValue representing the arguments passed to the
extension, evaluated for the current bindingbinding - The current binding
public abstract QueryIterator finish(List args)
args - A list of NodeValue representing the arguments passed to the
extension
public ExecutionContext getContext()
public DatasetGraph getDataset()
public void returnExplanation(ExplanationPart explanation)
explanation -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||