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


Java DatasetGraphTDB类代码示例

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


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

示例1: evaluateBlockFilterSub

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
/** Execute for one input binding */  
protected QueryIterator evaluateBlockFilterSub(DatasetGraphTDB dsgtdb, Node graphNode, BasicPattern bgp, ExprList exprs, Binding input1) {
    Explain2.explain(Quack.quackExec, "%s, BGP =\n%s", graphNode, bgp) ;  
    PhysicalPlan<NodeId> plan = new PhysicalPlan<>() ;
    bgp = Substitute.substitute(bgp, input1) ;
    
    if ( exprs != null ) {
        Op op ;
        if ( graphNode == null )
            op = TransformFilterPlacement.transform(exprs, bgp) ;
        else
            op = TransformFilterPlacement.transform(exprs, graphNode, bgp) ;
        accumulatePlan(plan, graphNode, op);
    } else {
        accumulatePlan(plan, graphNode, bgp) ;
    }
    
    return executePlan$(plan, input1) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:20,代码来源:OpExecutorQuackTDB.java

示例2: main

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
public static void main(String... args) {
    System.out.printf("%s\n", IndexRef.parse("DB[SPO]")) ;
    System.out.printf("%s\n", IndexRef.parse("[SPO]")) ;
    System.exit(0) ;
    
    
    Quack.init() ;
    QuackPredObj.init() ;
    Quack.setOpExecutorFactory(OpExecutorQuackTDB.factorySubstitute) ;
    
    
    DatasetGraphTDB dsgtdb = build(Location.mem()) ;
    AccessorTDB accessor = AccessorTDB.create(new StorageTDB(dsgtdb)) ; 
    Planner planner = new PlannerPredObjList(accessor) ;
    BasicPattern bgp = SSE.parseBGP("(bgp (?s :q ?v) (?s :p 123))") ;
    
    Node p = SSE.parseNode(":p") ;
    Node q = SSE.parseNode(":q") ;
    
    accessor.getNodeTable().getAllocateNodeId(p) ;
    accessor.getNodeTable().getAllocateNodeId(q) ;
    
    List<Tuple<Slot<NodeId>>> tuples = ELibTDB.convertTriples(bgp.getList(), accessor.getNodeTable()) ;
    PhysicalPlan<NodeId> plan = planner.generatePlan(tuples) ;
    RowList<NodeId> input = RowLib.identityRowList()  ;
    plan.execute(input) ;
    
    System.out.println(plan) ;
    System.exit(0) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:31,代码来源:MainQuack.java

示例3: chooseNodeTupleTable

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
public static NodeTupleTable chooseNodeTupleTable(DatasetGraphTDB dsgtdb, Node graphNode) {
    if ( OpExecLib.isDefaultGraph(graphNode) )
        return dsgtdb.getTripleTable().getNodeTupleTable() ;
    if ( OpExecLib.isUnionGraph(graphNode) )
        return dsgtdb.getQuadTable().getNodeTupleTable() ;
    return dsgtdb.getQuadTable().getNodeTupleTable() ;
}
 
开发者ID:afs,项目名称:quack,代码行数:8,代码来源:StorageTDB.java

示例4: create

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
@Override
public Plan create(Query query, DatasetGraph dataset, Binding input, Context context)
{
    // This is the usual route.
    DatasetGraphTDB dsgtdb = dsgToQuery(dataset) ;
    setup(dsgtdb, context) ;
    QueryEngineQuackTDB engine = new QueryEngineQuackTDB(query, dsgtdb, input, context) ;
    return engine.getPlan() ;
}
 
开发者ID:afs,项目名称:quack,代码行数:10,代码来源:QueryEngineFactoryQuackTDB.java

示例5: dsgToQuery

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
protected DatasetGraphTDB dsgToQuery(DatasetGraph dataset)
{
    if (dataset instanceof DatasetGraphTDB) return (DatasetGraphTDB)dataset ;
    if (dataset instanceof DatasetGraphTransaction) 
        return ((DatasetGraphTransaction)dataset).getDatasetGraphToQuery() ;
    throw new TDBException("Internal inconsistency: trying to execute query on unrecognized kind of DatasetGraph: "+Lib.className(dataset)) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:8,代码来源:QueryEngineFactoryQuackTDB.java

示例6: createDatasetGraph

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
public static DatasetGraph createDatasetGraph(Location location, OpExecutorFactory executorFactory) {
    LogCtl.setError(FileRef.class) ;
    StoreParams sParams = StoreParams.builder()
        // Test to see if POS exists but PSO does not.
        .tripleIndexes(new String[] { primaryIndexTriples, "POS", "PSO", "OSP" })
        //{ primaryIndexQuads, "GPOS", "GOSP", "POSG", "OSPG", "SPOG"} ;
        .quadIndexes(new String[] { primaryIndexQuads, "GPOS", "GPSO", "GOSP", 
        "POSG", "PSOG", "OSPG", "SPOG"})
        .build() ;
    DatasetGraphTDB dsg = DatasetBuilderStd.stdBuilder().build(location, sParams) ;
    QC.setFactory(dsg.getContext(), executorFactory) ;
    return dsg ;
}
 
开发者ID:afs,项目名称:quack,代码行数:14,代码来源:Quack.java

示例7: chooseNodeTupleTable

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
@Deprecated
public static NodeTupleTable chooseNodeTupleTable(DatasetGraphTDB dsgtdb, Node graphNode) {
    if ( OpExecLib.isDefaultGraph(graphNode) )
        return dsgtdb.getTripleTable().getNodeTupleTable() ;
    if ( OpExecLib.isUnionGraph(graphNode) )
        return dsgtdb.getQuadTable().getNodeTupleTable() ;
    return dsgtdb.getQuadTable().getNodeTupleTable() ;
}
 
开发者ID:afs,项目名称:quack,代码行数:9,代码来源:OpExecTDB.java

示例8: build

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
private static DatasetGraphTDB build(Location loc) {
    String[] indexes = { "SOP", "POS", "PSO", "OSP" } ;
    return build(loc, indexes) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:5,代码来源:MainQuack.java

示例9: StorageTDB

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
public StorageTDB(DatasetGraphTDB dsg) {
     this.dsg = dsg ;
     this.tripleTuples = dsg.getTripleTable().getNodeTupleTable().getTupleTable() ;
     this.quadTuples = dsg.getQuadTable().getNodeTupleTable().getTupleTable() ;
     this.nodeTable = dsg.getTripleTable().getNodeTupleTable().getNodeTable() ;
}
 
开发者ID:afs,项目名称:quack,代码行数:7,代码来源:StorageTDB.java

示例10: setup

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
private void setup(DatasetGraphTDB dataset, Context context) {
    OpExecutorFactory opExecfactory = Quack.getOpExecutorFactory(context) ;
    if ( opExecfactory != null )
        QC.setFactory(context, opExecfactory) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:6,代码来源:QueryEngineFactoryQuackTDB.java

示例11: isHandledByTDB

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
private static boolean isHandledByTDB(DatasetGraph dataset)
{
    if (dataset instanceof DatasetGraphTDB) return true ;
    if (dataset instanceof DatasetGraphTransaction ) return true ;
    return false ;
}
 
开发者ID:afs,项目名称:quack,代码行数:7,代码来源:QueryEngineFactoryQuackTDB.java

示例12: initAccessor

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
@Override
public AccessorTDB initAccessor(DatasetGraphTDB dsgtdb) {
    return AccessorTDB.create(new StorageTDB(dsgtdb)) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:5,代码来源:OpExecutorQuackTDB.java

示例13: initPlanner

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
@Override
public Planner initPlanner(DatasetGraphTDB dsgtdb, AccessorTDB accessor) {
    return new PlannerSubstitution(accessor) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:5,代码来源:OpExecutorQuackTDB.java

示例14: QueryEngineQuackTDB

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
protected QueryEngineQuackTDB(Op op, DatasetGraphTDB dataset, Binding input, Context context) {
    super(op, dataset, input, context) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:4,代码来源:QueryEngineQuackTDB.java

示例15: evaluateBlockFilter

import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
/** As for {@link OpExecutorBlockFilter#executeBlockFilter} but with the DatasetGraphTDB included. */
protected abstract QueryIterator evaluateBlockFilter(DatasetGraphTDB dsgtdb, 
                                                     Node graphNode, BasicPattern bgp, 
                                                     ExprList exprs, 
                                                     QueryIterator input) ;
 
开发者ID:afs,项目名称:quack,代码行数:6,代码来源:OpExecutorTDBBase.java


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