org.apache.jena.graph.Factory.createDefaultGraph()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(155)

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

Factory.createDefaultGraph介绍

[英]Answer a memory-based Graph.
[中]回答一个基于内存的图表。

代码示例

代码示例来源:origin: apache/jena

/** Create a graph - always the Jena default graph type */
public static Graph createJenaDefaultGraph()
{
  return Factory.createDefaultGraph() ;
}

代码示例来源:origin: ch.epfl.bluebrain.nexus.org.topbraid/shacl

/**
 * A memory graph with no reification.
 */
public Graph createDefaultGraph() {
  return Factory.createDefaultGraph();
}

代码示例来源:origin: apache/jena

public void testFactory()
  {
  Factory.createDefaultGraph();
  }        
}

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

public void testFactory()
  {
  Factory.createDefaultGraph();
  }        
}

代码示例来源:origin: apache/jena

@Override
public void setUp()
  {
  gBase = Factory.createDefaultGraph();
  g1 = Factory.createDefaultGraph();
  g2 = Factory.createDefaultGraph();
  poly = new MultiUnion( new Graph[] {gBase, g1, g2} );
  poly.setBaseGraph( gBase );
  }

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

@Override
public void setUp()
  {
  gBase = Factory.createDefaultGraph();
  g1 = Factory.createDefaultGraph();
  g2 = Factory.createDefaultGraph();
  poly = new MultiUnion( new Graph[] {gBase, g1, g2} );
  poly.setBaseGraph( gBase );
  }

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

@Override
protected PrefixMapping getMapping()
  {
  Graph gBase = Factory.createDefaultGraph();
  Graph g1 = Factory.createDefaultGraph();
  Graph g2 = Factory.createDefaultGraph();
  Polyadic poly = new MultiUnion( new Graph[] {gBase, g1, g2} );
  return new PolyadicPrefixMappingImpl( poly ); 
  }

代码示例来源:origin: apache/jena

@Override
protected PrefixMapping getMapping()
  {
  Graph gBase = Factory.createDefaultGraph();
  Graph g1 = Factory.createDefaultGraph();
  Graph g2 = Factory.createDefaultGraph();
  Polyadic poly = new MultiUnion( new Graph[] {gBase, g1, g2} );
  return new PolyadicPrefixMappingImpl( poly ); 
  }

代码示例来源:origin: apache/jena

private static Graph data(Triple... triples)
  {
    Graph graph = Factory.createDefaultGraph();
    for ( Triple t : triples )
      graph.add(t);
    return graph;
  }
}

代码示例来源:origin: apache/jena

/**
  pending on use-cases.
*/
public void testTheyreThere()
  {
  Graph g = Factory.createDefaultGraph();
  g.getCapabilities();
  }

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

protected Graph copy( Graph g )
{
  Graph result = Factory.createDefaultGraph();
  GraphUtil.addInto(result, g) ;
  return result;
}

代码示例来源:origin: apache/jena

protected Graph copy( Graph g )
{
  Graph result = Factory.createDefaultGraph();
  GraphUtil.addInto(result, g) ;
  return result;
}

代码示例来源:origin: apache/jena

private Graph loadSchema( Resource root, Assembler a )
  {
  Graph result = Factory.createDefaultGraph();
  for (StmtIterator models = root.listProperties( JA.ja_schema ); models.hasNext();)
    loadSchema( result, a, getResource( models.nextStatement() ) );
  return result;
  }

代码示例来源:origin: apache/jena

@Override
public Graph getGraph()
{
  return org.apache.jena.permissions.Factory.getInstance(eval, getName(),
      Factory.createDefaultGraph());
}

代码示例来源:origin: apache/jena

public void testGraphPrefixMapping()
  { 
  Graph g = Factory.createDefaultGraph();
  AbstractTestPrefixMapping.testUseEasyPrefix
    ( "from Graph", g.getPrefixMapping() ); 
  testSameMapping( g );
  }

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

public void testGraphPrefixMapping()
  { 
  Graph g = Factory.createDefaultGraph();
  AbstractTestPrefixMapping.testUseEasyPrefix
    ( "from Graph", g.getPrefixMapping() ); 
  testSameMapping( g );
  }

代码示例来源:origin: apache/jena

@Override
  public Graph getGraph()
  {
    final Graph graph = org.apache.jena.permissions.Factory.getInstance(eval,
        getName(), Factory.createDefaultGraph());
    graph.getEventManager().register(new CheckChanges("simple tracking", graph));
    return graph;
  }
}

代码示例来源:origin: apache/jena

/**
  Test that the Standard reifier will expose implicit quads arising from reifyAs().
 */
public void testStandardExplode()
{
  Graph g = getGraph( );
  ReifierStd.reifyAs( g, node( "a" ), triple( "p Q r" ) );
  Graph r = Factory.createDefaultGraph( );
  graphAdd( r, "a rdf:type rdf:Statement; a rdf:subject p; a rdf:predicate Q; a rdf:object r" );
  assertEquals( 4, g.size() );
  assertIsomorphic( r, g );
}

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

/**
  Test that the Standard reifier will expose implicit quads arising from reifyAs().
 */
public void testStandardExplode()
{
  Graph g = getGraph( );
  ReifierStd.reifyAs( g, node( "a" ), triple( "p Q r" ) );
  Graph r = Factory.createDefaultGraph( );
  graphAdd( r, "a rdf:type rdf:Statement; a rdf:subject p; a rdf:predicate Q; a rdf:object r" );
  assertEquals( 4, g.size() );
  assertIsomorphic( r, g );
}

代码示例来源:origin: apache/jena

@Test public void testInsert3()
{
  DatasetGraph gStore = getEmptyDatasetGraph() ;
  gStore.addGraph(graphIRI, Factory.createDefaultGraph()) ;
  UpdateModify insert = new UpdateModify() ;
  insert.getInsertAcc().addQuad(new Quad(graphIRI, triple1)) ;
  UpdateAction.execute(insert, gStore) ;
  assertTrue(graphContains(gStore.getGraph(graphIRI), triple1)) ;
}

相关文章