blob: f0fb7c956aa2db0da5f57d87aed79e80483df560 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
package tools.refinery.data.query.internal;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.Callable;
import org.eclipse.viatra.query.runtime.api.scope.IBaseIndex;
import org.eclipse.viatra.query.runtime.api.scope.IIndexingErrorListener;
import org.eclipse.viatra.query.runtime.api.scope.IInstanceObserver;
import org.eclipse.viatra.query.runtime.api.scope.ViatraBaseIndexChangeListener;
/**
* copied from org.eclipse.viatra.query.runtime.tabular.TabularEngineContext;
*/
public class DummyBaseIndexer implements IBaseIndex{
@Override
public <V> V coalesceTraversals(Callable<V> callable) throws InvocationTargetException {
try {
return callable.call();
} catch (Exception e) {
throw new InvocationTargetException(e);
}
}
@Override
public void addBaseIndexChangeListener(ViatraBaseIndexChangeListener listener) {
// no notification support
}
@Override
public void removeBaseIndexChangeListener(ViatraBaseIndexChangeListener listener) {
// no notification support
}
@Override
public void resampleDerivedFeatures() {
throw new UnsupportedOperationException();
}
@Override
public boolean addIndexingErrorListener(IIndexingErrorListener listener) {
return true;
}
@Override
public boolean removeIndexingErrorListener(IIndexingErrorListener listener) {
return true;
}
@Override
public boolean addInstanceObserver(IInstanceObserver observer, Object observedObject) {
return true;
}
@Override
public boolean removeInstanceObserver(IInstanceObserver observer, Object observedObject) {
return true;
}
}
|