本文整理汇总了Java中org.galagosearch.tupleflow.types.XMLFragment类的典型用法代码示例。如果您正苦于以下问题:Java XMLFragment类的具体用法?Java XMLFragment怎么用?Java XMLFragment使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XMLFragment类属于org.galagosearch.tupleflow.types包,在下文中一共展示了XMLFragment类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCollectionLengthStage
import org.galagosearch.tupleflow.types.XMLFragment; //导入依赖的package包/类
public Stage getCollectionLengthStage() {
Stage stage = new Stage("collectionLength");
stage.add(new StageConnectionPoint(
ConnectionPointType.Input, "documentData",
new DocumentData.IdentifierOrder()));
stage.add(new StageConnectionPoint(
ConnectionPointType.Output, "collectionLength",
new XMLFragment.NodePathOrder()));
stage.add(new InputStep("documentData"));
stage.add(new Step(CollectionLengthCounter.class));
stage.add(Utility.getSorter(new XMLFragment.NodePathOrder()));
stage.add(new OutputStep("collectionLength"));
return stage;
}
示例2: testToDotString
import org.galagosearch.tupleflow.types.XMLFragment; //导入依赖的package包/类
public void testToDotString() {
Job job = new Job();
Stage a = new Stage("a");
a.add(new StageConnectionPoint(ConnectionPointType.Output,
"c", new XMLFragment.NodePathOrder()));
job.add(a);
Stage b = new Stage("b");
b.add(new StageConnectionPoint(ConnectionPointType.Input,
"c", new XMLFragment.NodePathOrder()));
job.add(b);
job.connect("a", "b", ConnectionAssignmentType.Combined);
String expected =
"digraph {\n" +
" a -> b [label=\"a-c\"];\n" +
" a;\n" +
" b;\n" +
"}\n";
assertEquals(expected, job.toDotString());
}
示例3: getWriteManifestStage
import org.galagosearch.tupleflow.types.XMLFragment; //导入依赖的package包/类
/**
* Write out document count and collection length information.
*/
public Stage getWriteManifestStage() {
Stage stage = new Stage("writeManifest");
stage.add(new StageConnectionPoint(ConnectionPointType.Input,
"collectionLength",
new XMLFragment.NodePathOrder()));
stage.add(new InputStep("collectionLength"));
Parameters p = new Parameters();
p.add("filename", indexPath + File.separator + "manifest");
stage.add(new Step(ManifestWriter.class, p));
return stage;
}
示例4: process
import org.galagosearch.tupleflow.types.XMLFragment; //导入依赖的package包/类
public void process(XMLFragment object) throws IOException {
result.add(object.nodePath, object.innerText);
}
示例5: close
import org.galagosearch.tupleflow.types.XMLFragment; //导入依赖的package包/类
@Override
public void close() throws IOException {
processor.process(new XMLFragment("collectionLength", Long.toString(collectionLength)));
processor.process(new XMLFragment("documentCount", Long.toString(documentCount)));
super.close();
}
示例6: process
import org.galagosearch.tupleflow.types.XMLFragment; //导入依赖的package包/类
public void process(XMLFragment fragment) {
if(key == null)
key = fragment.nodePath;
minimum = Math.min(minimum, Double.parseDouble(fragment.innerText));
System.err.println("XMLMinimum: " + minimum);
}
示例7: close
import org.galagosearch.tupleflow.types.XMLFragment; //导入依赖的package包/类
public void close() throws IOException {
processor.process(new XMLFragment(key, Double.toString(minimum)));
super.close();
}