本文整理汇总了Java中org.galagosearch.tupleflow.Source类的典型用法代码示例。如果您正苦于以下问题:Java Source类的具体用法?Java Source怎么用?Java Source使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Source类属于org.galagosearch.tupleflow包,在下文中一共展示了Source类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: instantiate
import org.galagosearch.tupleflow.Source; //导入依赖的package包/类
public org.galagosearch.tupleflow.Step instantiate(
StageInstanceDescription instance,
ArrayList<Step> steps)
throws IncompatibleProcessorException, IOException {
org.galagosearch.tupleflow.Step previous = null;
org.galagosearch.tupleflow.Step first = null;
for (Step step : steps) {
org.galagosearch.tupleflow.Step current;
if (step instanceof MultiStep) {
current = instantiateMulti(instance, step);
} else if (step instanceof InputStep) {
current = instantiateInput(instance, (InputStep) step);
} else if (step instanceof OutputStep) {
current = instantiateOutput(instance, (OutputStep) step);
} else {
current = instantiateStep(instance, step);
}
if (first == null) {
first = current;
}
if (previous != null) {
((Source) previous).setProcessor(current);
}
previous = current;
}
return first;
}
示例2: add
import org.galagosearch.tupleflow.Source; //导入依赖的package包/类
public void add(Step stage) throws IncompatibleProcessorException {
if (items.size() > 0) {
// is this a ShreddedProcessor?
Object previousSource = items.get(items.size() - 1);
((Source) previousSource).setProcessor(stage);
}
items.add(stage);
}