当前位置: 首页>>代码示例>>Java>>正文


Java XMLFragment类代码示例

本文整理汇总了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;
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:18,代码来源:BuildIndex.java

示例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());
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:23,代码来源:JobTest.java

示例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;
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:16,代码来源:BuildIndex.java

示例4: process

import org.galagosearch.tupleflow.types.XMLFragment; //导入依赖的package包/类
public void process(XMLFragment object) throws IOException {
    result.add(object.nodePath, object.innerText);
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:4,代码来源:ManifestWriter.java

示例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();
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:7,代码来源:CollectionLengthCounter.java

示例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);
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:7,代码来源:XMLMinimum.java

示例7: close

import org.galagosearch.tupleflow.types.XMLFragment; //导入依赖的package包/类
public void close() throws IOException {
    processor.process(new XMLFragment(key, Double.toString(minimum)));
    super.close();
}
 
开发者ID:jjfiv,项目名称:galagosearch,代码行数:5,代码来源:XMLMinimum.java


注:本文中的org.galagosearch.tupleflow.types.XMLFragment类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。