org.apache.jena.rdf.model.Model.listReifiedStatements()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(106)

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

Model.listReifiedStatements介绍

[英]answer an iterator delivering all the reified statements "in" this model
[中]回答一个迭代器,该迭代器在这个模型中提供所有具体化的语句

代码示例

代码示例来源:origin: vivo-project/Vitro

@Override
public RSIterator listReifiedStatements(Statement st) {
  return inner.listReifiedStatements(st);
}

代码示例来源:origin: vivo-project/Vitro

@Override
public RSIterator listReifiedStatements() {
  return inner.listReifiedStatements();
}

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

/**
 * utility method: get a set of all the elements delivered by
 * _m.listReifiedStatements_.
 */
public Set<ReifiedStatement> getSetRS( final Model m )
{
  return m.listReifiedStatements().toSet();
}

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

/**
 * utility method: get a set of all the elements delivered by
 * _m.listReifiedStatements_.
 */
public Set<ReifiedStatement> getSetRS( final Model m )
{
  return m.listReifiedStatements().toSet();
}

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

/**
 * utility method: get a set of all the elements delivered by
 * _m.listReifiedStatements_.
 */
public Set<ReifiedStatement> getSetRS( final Model m )
{
  return m.listReifiedStatements().toSet();
}

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

/**
 * utility method: get a set of all the elements delivered by
 * _m.listReifiedStatements_.
 */
public Set<ReifiedStatement> getSetRS( final Model m )
{
  return m.listReifiedStatements().toSet();
}

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

public Set<ReifiedStatement> getSetRS( final Model m, final Statement st )
{
  return m.listReifiedStatements(st).toSet();
}

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

public Set<ReifiedStatement> getSetRS( final Model m, final Statement st )
{
  return m.listReifiedStatements(st).toSet();
}

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

public Set<ReifiedStatement> getSetRS( final Model m, final Statement st )
{
  return m.listReifiedStatements(st).toSet();
}

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

public Set<ReifiedStatement> getSetRS( final Model m, final Statement st )
{
  return m.listReifiedStatements(st).toSet();
}

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

@Override
public SecuredRSIterator listReifiedStatements() throws ReadDeniedException, AuthenticationRequiredException {
  checkRead();
  return new SecuredRSIterator(holder.getSecuredItem(), holder.getBaseItem().listReifiedStatements());
}

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

/**
 * Case 1: Rules construct a reified statement, is that
 * visible as reified statement in the InfGraph?
 */
public void testSimpleReification() {
  String rules =  
    "[r1: (?x eh:p ?o) -> (?o rdf:type rdf:Statement) (?o rdf:subject ?x)" +
    "                         (?o rdf:predicate eh:q) (?o rdf:object 42)]";
  Model m = makeInfModel( rules, "r1 p r" );
  TestUtil.assertIteratorLength( m.listReifiedStatements(), 1 );
}

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

@Override
public SecuredRSIterator listReifiedStatements(final Statement st)
    throws ReadDeniedException, AuthenticationRequiredException {
  checkRead();
  checkRead(st);
  return new SecuredRSIterator(holder.getSecuredItem(), holder.getBaseItem().listReifiedStatements(st));
}

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

/**
 * Case 1: Rules construct a reified statement, is that
 * visible as reified statement in the InfGraph?
 */
public void testSimpleReification() {
  String rules =  
    "[r1: (?x eh:p ?o) -> (?o rdf:type rdf:Statement) (?o rdf:subject ?x)" +
    "                         (?o rdf:predicate eh:q) (?o rdf:object 42)]";
  Model m = makeInfModel( rules, "r1 p r" );
  TestUtil.assertIteratorLength( m.listReifiedStatements(), 1 );
}

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

/**
 * this test appeared when TestStatementResources crashed using reified
 * statements as a step-0 implementation for asSubject()/asObject(). Looks
 * like there was a problem in modelReifier().getRS(), which we're fixing
 * ...
 */
public void testListDoesntCrash()
{
  model.createReifiedStatement(SPO);
  model.createReifiedStatement(SPO2);
  Assert.assertTrue("should be non-empty", model.listReifiedStatements()
      .hasNext());
}

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

/**
 * this test appeared when TestStatementResources crashed using reified
 * statements as a step-0 implementation for asSubject()/asObject(). Looks
 * like there was a problem in modelReifier().getRS(), which we're fixing
 * ...
 */
public void testListDoesntCrash()
{
  model.createReifiedStatement(SPO);
  model.createReifiedStatement(SPO2);
  Assert.assertTrue("should be non-empty", model.listReifiedStatements()
      .hasNext());
}

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

/**
 * this test appeared when TestStatementResources crashed using reified
 * statements as a step-0 implementation for asSubject()/asObject(). Looks
 * like there was a problem in modelReifier().getRS(), which we're fixing
 * ...
 */
public void testListDoesntCrash()
{
  model.createReifiedStatement(SPO);
  model.createReifiedStatement(SPO2);
  Assert.assertTrue("should be non-empty", model.listReifiedStatements()
      .hasNext());
}

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

/**
 * this test appeared when TestStatementResources crashed using reified
 * statements as a step-0 implementation for asSubject()/asObject(). Looks
 * like there was a problem in modelReifier().getRS(), which we're fixing
 * ...
 */
public void testListDoesntCrash()
{
  model.createReifiedStatement(SPO);
  model.createReifiedStatement(SPO2);
  Assert.assertTrue("should be non-empty", model.listReifiedStatements()
      .hasNext());
}

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

/**
 * Case 1: Rules complete an exisiting partially reified statement.
 */
public void SUPPRESStestReificationCompletion() {
  String rules =  
    "[r1: (?x rdf:subject ?s) (?x rdf:predicate ?p) -> (?x rdf:object eh:bar)]";
  Model m = makeInfModel(rules, "r1 rdf:type rdf:Statement; r1 rdf:subject foo; r1 rdf:predicate p" );
  RSIterator i = m.listReifiedStatements();
  assertTrue(i.hasNext());
  assertEquals( triple("foo p bar"), i.nextRS().getStatement().asTriple());
  assertFalse(i.hasNext());
}

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

/**
 * Case 1: Rules complete an exisiting partially reified statement.
 */
public void SUPPRESStestReificationCompletion() {
  String rules =  
    "[r1: (?x rdf:subject ?s) (?x rdf:predicate ?p) -> (?x rdf:object eh:bar)]";
  Model m = makeInfModel(rules, "r1 rdf:type rdf:Statement; r1 rdf:subject foo; r1 rdf:predicate p" );
  RSIterator i = m.listReifiedStatements();
  assertTrue(i.hasNext());
  assertEquals( triple("foo p bar"), i.nextRS().getStatement().asTriple());
  assertFalse(i.hasNext());
}

相关文章

Model类方法