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

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

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

Graph.clear介绍

[英]Remove all the statements from this graph.
[中]删除此图中的所有语句。

代码示例

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

@Override
public void clear()
{ graph.clear() ; }

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

@Override
public Model removeAll()
{ 
  getGraph().clear();
  return this; 
}

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

protected static void gsClear(GraphStore gStore, Target target, boolean isSilent)
{
  // No create - we tested earlier.
  Graph g = graph(gStore, target) ;
  g.clear() ;
}

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

private void clearGraph(Graph graph) {
  if ( !graph.isEmpty() )
    graph.clear() ;
}

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

@Override
public void clear()
{
  base.clear() ;
  getEventManager().notifyEvent(this, GraphEvents.removeAll ) ;   
}

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

@Override
@Deprecated
public void removeAll()
  {
  BaseInfGraph g = (BaseInfGraph) graph;
  g.getRawGraph().clear();
  g.discardState();
  g.rebind();
  g.getEventManager().notifyEvent( g, GraphEvents.removeAll );
  }
}

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

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

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

/** 
 * Create the graph used to hold the deductions. Can be overridden
 * by subclasses that need special purpose graph implementations here.
 * Assumes the graph underlying fdeductions and associated SafeGraph
 * wrapper can be reused if present thus enabling preservation of
 * listeners. 
 */
protected Graph createDeductionsGraph() {
  if (fdeductions != null) {
    Graph dg = fdeductions.getGraph();
    if (dg != null) {
      // Reuse the old graph in order to preserve any listeners
      safeDeductions.clear();
      return dg;
    }
  }
  Graph dg = Factory.createGraphMem( ); 
  safeDeductions = new SafeGraph( dg );
  return dg;
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.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 )
  {
    if ( g == null || graphStore.containsGraph(g) )
      graph(graphStore, g).clear() ;
  }
  else
    graphStore.removeGraph(g) ;
}

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

@Override
public void clear()
{
  getRawGraph().clear() ;
  discardState();
  rebind();
  getEventManager().notifyEvent( this, GraphEvents.removeAll );
}

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

oldDeductions.clear();
} else {
  fdeductions = new FGraph( createDeductionsGraph() );

相关文章