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


Java DS类代码示例

本文整理汇总了Java中org.apache.jena.atlas.lib.DS的典型用法代码示例。如果您正苦于以下问题:Java DS类的具体用法?Java DS怎么用?Java DS使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DS类属于org.apache.jena.atlas.lib包,在下文中一共展示了DS类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import org.apache.jena.atlas.lib.DS; //导入依赖的package包/类
@Override
public RowList<NodeId> execute(RowList<NodeId> input) {
    // Ignore input.
    JoinKey joinKey = JoinKey.create(mergeStep.getVar()) ;
    Set<Var> vars = DS.setOfOne(mergeStep.getVar()) ;
    
    RowList<NodeId> left = find(mergeStep.getIndex1(), mergeStep.getPattern1(), vars) ;
    RowList<NodeId> right = find(mergeStep.getIndex2(), mergeStep.getPattern2(), vars) ;
    RowBuilder<NodeId> builder = new RowBuilderBase<NodeId>() ;
    return Join.mergeJoin(joinKey, left, right, comparator, builder) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:12,代码来源:StepMergeJoin.java

示例2: convertTriples

import org.apache.jena.atlas.lib.DS; //导入依赖的package包/类
public static List<Tuple<Slot<NodeId>>> convertTriples(List<Triple> triples, NodeTable nodeTable, boolean allocate) {
    List<Tuple<Slot<NodeId>>> x = DS.list() ;
    for ( Triple t : triples ) {
        Tuple<Slot<NodeId>> ts = convert(t, nodeTable, allocate) ;
        if ( ts == null ) 
            return null ;
        x.add(ts) ;
    }
    return x ;
}
 
开发者ID:afs,项目名称:quack,代码行数:11,代码来源:ELibTDB.java

示例3: convertQuads

import org.apache.jena.atlas.lib.DS; //导入依赖的package包/类
public static List<Tuple<Slot<NodeId>>> convertQuads(List<Quad> quads, NodeTable nodeTable, boolean allocate) {
    List<Tuple<Slot<NodeId>>> x = DS.list() ;
    for ( Quad q : quads ) {
        Tuple<Slot<NodeId>> ts = convert(q, nodeTable, allocate) ;
        if ( ts == null ) 
            return null ;
        x.add(ts) ;
    }
    return x ;
}
 
开发者ID:afs,项目名称:quack,代码行数:11,代码来源:ELibTDB.java

示例4: create

import org.apache.jena.atlas.lib.DS; //导入依赖的package包/类
/** Make a JoinKey from the intersection of two sets **/  

public static JoinKey create(Collection<Var> vars1, Collection<Var> vars2) {
    //JoinKeys are generally small so short loops are best.
    // vars2 may be smallest e.g. from triple and running accumulator (vars1) 
    List<Var> intersection = DS.list() ;
    for ( Var v : vars1 ) {
        if ( vars2.contains(v) )
            intersection.add(v) ;
    }
    return new JoinKey(intersection) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:13,代码来源:JoinKey.java

示例5: vars

import org.apache.jena.atlas.lib.DS; //导入依赖的package包/类
/** Vars from a tuple */ 
public static <X> Set<Var> vars(Tuple<Slot<X>> tuple) {
    Set<Var> x = DS.set() ;
    for ( Slot<X> s : tuple ) {
        if ( s.isVar() && ! x.contains(s.var) )
            x.add(s.var) ; 
    }        
    return x ;
}
 
开发者ID:afs,项目名称:quack,代码行数:10,代码来源:EngLib.java

示例6: substitutionJoin

import org.apache.jena.atlas.lib.DS; //导入依赖的package包/类
public static <X> RowList<X> substitutionJoin(RowList<X> left, Tuple<Slot<X>> pattern, AccessRows<X> accessor, RowBuilder<X> builder) {
    Iterator<Row<X>> iter = new SubstituteApply<X>(accessor, pattern, left.iterator(), builder) ;
    Set<Var> vars = null ;
    if ( left.vars() != null ) {
        vars = DS.set() ;
        vars.addAll(left.vars()) ;
        EngLib.accVars(vars, pattern) ;
    }
    return RowLib.createRowList(vars, iter) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:11,代码来源:SubstitutionJoin.java

示例7: innerLoopJoinBasic

import org.apache.jena.atlas.lib.DS; //导入依赖的package包/类
/** Simple, materializing version - useful for debugging */ 
public static <X> RowList<X> innerLoopJoinBasic(RowList<X> leftTable, RowList<X> rightTable, RowBuilder<X> builder) {
    Set<Var> vars = SetUtils.union(leftTable.vars(), rightTable.vars()) ;
    Iterable<Row<X>> leftRows = leftTable.toList() ;
    List<Row<X>> output = DS.list() ;
    for ( Row<X> row2 : rightTable ) {
        for ( Row<X> row1 : leftRows ) {
            if ( Join.compatible(row1, row2) ) {
                builder.reset() ;       
                output.add(Join.merge(row1, row2, builder)) ;
            }
        }
    }
    return RowLib.createRowList(vars, output.iterator()) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:16,代码来源:InnerLoopJoin.java

示例8: build

import org.apache.jena.atlas.lib.DS; //导入依赖的package包/类
public JoinKey build() {
    JoinKey joinKey = new JoinKey(DS.list(keys)) ; 
    return joinKey ;
}
 
开发者ID:afs,项目名称:quack,代码行数:5,代码来源:JoinKey.java

示例9: JoinKey

import org.apache.jena.atlas.lib.DS; //导入依赖的package包/类
private JoinKey(Var var)     { keys = DS.listOfOne(var) ; } 
开发者ID:afs,项目名称:quack,代码行数:2,代码来源:JoinKey.java


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