com.hp.hpl.jena.graph.Graph.getBulkUpdateHandler()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(158)

本文整理了Java中com.hp.hpl.jena.graph.Graph.getBulkUpdateHandler()方法的一些代码示例,展示了Graph.getBulkUpdateHandler()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getBulkUpdateHandler()方法的具体详情如下:
包路径:com.hp.hpl.jena.graph.Graph
类名称:Graph
方法名:getBulkUpdateHandler

Graph.getBulkUpdateHandler介绍

[英]returns this Graph's bulk-update handler
[中]返回此图的批量更新处理程序

代码示例

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Deprecated
@Override
public BulkUpdateHandler getBulkUpdateHandler()
{
  return graph.getBulkUpdateHandler() ;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core

@Override
@Deprecated
public BulkUpdateHandler getBulkUpdateHandler()
{
  if (bud == null)  bud = new WrappedBulkUpdateHandler( this, base.getBulkUpdateHandler() );
  return bud;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core

@Override
@Deprecated
public BulkUpdateHandler getBulkUpdateHandler() {
  if (bulkHandler == null)
    bulkHandler = new WrappedBulkUpdateHandler( this, getRequiredBaseGraph().getBulkUpdateHandler() );
  return bulkHandler;
}

代码示例来源:origin: com.hp.hpl.jena/arq

protected void execDropClear(UpdateDropClear update, Node g, boolean isClear)
{
  if ( ! alwaysSilent )
  {
    if ( g != null && ! graphStore.containsGraph(g) && ! update.isSilent())
      error("No such graph: "+g) ;
  }
  
  if ( isClear )
    graph(graphStore, g).getBulkUpdateHandler().removeAll() ;
  else
    graphStore.removeGraph(g) ;
}

代码示例来源:origin: com.hp.hpl.jena/arq

@Override
public void addGraph(Node graphName, Graph graph)
{
  removeGraph(graphName) ;
  getGraph(graphName).getBulkUpdateHandler().add(graph) ;
}

代码示例来源:origin: com.hp.hpl.jena/arq

protected void execDelete(List<Quad> quads, Node dftGraph, List<Binding> bindings)
{
  MultiMap<Node, Triple> acc = template(quads, dftGraph, bindings) ;
  if ( acc == null ) return ; 
  
  for ( Node gn : acc.keys() )
  {
    Collection<Triple> triples = acc.get(gn) ;
    graph(graphStore, gn).getBulkUpdateHandler().delete(triples.iterator()) ;
  }
}

代码示例来源:origin: com.hp.hpl.jena/arq

protected void execInsert(List<Quad> quads, Node dftGraph, List<Binding> bindings)
{
  MultiMap<Node, Triple> acc = template(quads, dftGraph, bindings) ;
  if ( acc == null ) return ; 
  
  for ( Node gn : acc.keys() )
  {
    Collection<Triple> triples = acc.get(gn) ;
    graph(graphStore, gn).getBulkUpdateHandler().add(triples.iterator()) ;
  }
}

代码示例来源:origin: com.hp.hpl.jena/arq

protected static void gsDrop(GraphStore gStore, Target target, boolean isSilent)
{
  if ( target.isDefault() )
    gStore.getDefaultGraph().getBulkUpdateHandler().removeAll() ;
  else
    gStore.removeGraph(target.getGraph()) ;
}

代码示例来源:origin: com.hp.hpl.jena/arq

protected static void gsCopyTriples(GraphStore gStore, Target src, Target dest)
{
  Graph gSrc = graph(gStore, src) ;
  Graph gDest = graph(gStore, dest) ;
  // Ugly! but avoids concurrency problems.
  // TODO Revisit graph->graph triple copy.
  List<Triple> list = Iter.toList(gSrc.find(null, null, null)) ;
  gDest.getBulkUpdateHandler().add(list) ;
}

代码示例来源:origin: com.hp.hpl.jena/tdb

@Before public void before()
{ 
  graph.getBulkUpdateHandler().removeAll() ;
}

代码示例来源:origin: com.hp.hpl.jena/arq

protected static void gsClear(GraphStore gStore, Target target, boolean isSilent)
{
  // No create.
  Graph g = graph(gStore, target) ;
  if ( target.isOneNamedGraph() )
  {
    if ( !gStore.containsGraph(target.getGraph()) )
    {
      if ( ! isSilent )
        error("No such graph: "+g) ;
      return ;
    }
  }
  
  g.getBulkUpdateHandler().removeAll() ;
}

代码示例来源:origin: net.sourceforge.owlapi/pellet-jena-ignazio1977

model.getGraph().getBulkUpdateHandler().add( triples );

代码示例来源:origin: com.hp.hpl.jena/arq

g.getBulkUpdateHandler().add(g2) ;

代码示例来源:origin: com.hp.hpl.jena/tdb

@Test public void update2()
{
  Graph g = create() ;
  g.getBulkUpdateHandler().add(new Triple[]{t1}) ;
  assertTrue(g.contains(t1)) ;
  g.getBulkUpdateHandler().removeAll() ;
  assertFalse(g.contains(t1)) ;
}

代码示例来源:origin: com.hp.hpl.jena/tdb

@Test public void update1()
{
  Graph g = create() ;
  g.getBulkUpdateHandler().add(new Triple[]{t1}) ;
  assertTrue(g.contains(t1)) ;
  g.getBulkUpdateHandler().delete(new Triple[]{t1}) ;
  assertFalse(g.contains(t1)) ;
}

代码示例来源:origin: net.sourceforge.owlapi/pellet-jena-ignazio1977

model.getGraph().getBulkUpdateHandler().add( triples );

代码示例来源:origin: com.hp.hpl.jena/tdb

private static Dataset create()
{
  Graph g = buildGraph() ;
  Dataset ds = TDBFactory.createDataset() ;
  ds.getDefaultModel().getGraph().getBulkUpdateHandler().add(g) ;
  return ds ;
}

代码示例来源:origin: com.hp.hpl.jena/tdb

@Test public void dataset3()
{
  Dataset ds = graphLocation.getDataset() ;
  Graph g1 = ds.getDefaultModel().getGraph() ;
  // Sometimes, under windows, deleting the files by 
  // graphLocation.clearDirectory does not work.  
  // Needed for safe tests on windows.
  g1.getBulkUpdateHandler().removeAll() ;
  
  Graph g2 = ds.getNamedModel("http://example/").getGraph() ;
  g2.add(new Triple(n0,n1,n2) ) ;
  assertTrue(g2.contains(n0,n1,n2) ) ;
  assertFalse(g1.contains(n0,n1,n2) ) ;
}

代码示例来源:origin: com.hp.hpl.jena/tdb

@Test
public void mrswGraph5()
{
  Dataset d = TDBFactory.createDataset() ;
  Model m = d.getNamedModel("http://example") ;
  m.getGraph().getBulkUpdateHandler().add(buildGraph()) ;
  Resource r = m.createResource("x") ;
  ExtendedIterator<Statement> iter1 = m.listStatements(r, null, (RDFNode)null) ;
  while(iter1.hasNext()) 
    iter1.next();
  Triple t = SSE.parseTriple("(<y> <p> 99)") ;
  m.getGraph().delete(t) ;
  iter1.hasNext() ;
}

代码示例来源:origin: com.hp.hpl.jena/tdb

@Test(expected=ConcurrentModificationException.class)
public void mrswGraph6()
{
  Dataset d = TDBFactory.createDataset() ;
  Model m = d.getNamedModel("http://example") ;
  m.getGraph().getBulkUpdateHandler().add(buildGraph()) ;
  Resource r = m.createResource("x") ;
  ExtendedIterator<Statement> iter1 = m.listStatements(r, null, (RDFNode)null) ;
  assertNotNull(iter1.next()) ;
  
  Triple t = SSE.parseTriple("(<y> <p> 99)") ;
  m.getGraph().delete(t) ;
  iter1.next() ;
}

相关文章