本文整理汇总了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) ;
}
示例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) ;
}
示例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() ;
}
示例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() ;
}
示例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)) ;
}
示例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 ;
}
示例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() ;
}
示例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) ;
}
示例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() ;
}
示例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) ;
}
示例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 ;
}
示例12: initAccessor
import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
@Override
public AccessorTDB initAccessor(DatasetGraphTDB dsgtdb) {
return AccessorTDB.create(new StorageTDB(dsgtdb)) ;
}
示例13: initPlanner
import com.hp.hpl.jena.tdb.store.DatasetGraphTDB; //导入依赖的package包/类
@Override
public Planner initPlanner(DatasetGraphTDB dsgtdb, AccessorTDB accessor) {
return new PlannerSubstitution(accessor) ;
}
示例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) ;
}
示例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) ;