com.hp.hpl.jena.rdf.model.Model.listReifiedStatements()方法的使用及代码示例

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

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

Model.listReifiedStatements介绍

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

代码示例

代码示例来源:origin: fr.inria.eventcloud/eventcloud-api

/**
 * {@inheritDoc}
 */
@Override
public RSIterator listReifiedStatements() {
  return super.object.listReifiedStatements();
}

代码示例来源:origin: fr.inria.eventcloud/eventcloud-api

/**
 * {@inheritDoc}
 */
@Override
public RSIterator listReifiedStatements(Statement st) {
  return super.object.listReifiedStatements(st);
}

代码示例来源:origin: bio2rdf/bio2rdf-scripts

public RSIterator listReifiedStatements() {
  return model.listReifiedStatements();
}

代码示例来源:origin: bio2rdf/bio2rdf-scripts

public RSIterator listReifiedStatements(Statement st) {
  return model.listReifiedStatements(st);
}

代码示例来源:origin: org.ow2.weblab.core.helpers/rdf-helper-jena

/**
 * @param type
 *            The type of reified statements to retrieve, i.e. anonymous or named ones.
 * @return Every reified statements of the model, having a type as <code>type</code>.
 */
private List<ReifiedStatement> listReifStats(final ResourceTypes type) {
  final RSIterator rsi = this.model.listReifiedStatements();
  final List<ReifiedStatement> rss = new ArrayList<ReifiedStatement>();
  if (type.equals(ResourceTypes.ANON)) {
    while (rsi.hasNext()) {
      final ReifiedStatement rs = rsi.nextRS();
      if (rs.isAnon()) {
        rss.add(rs);
      }
    }
  } else if (type.equals(ResourceTypes.NAMED)) {
    while (rsi.hasNext()) {
      final ReifiedStatement rs = rsi.nextRS();
      if (rs.isURIResource()) {
        rss.add(rs);
      }
    }
  } else {
    LogFactory.getLog(this.getClass()).warn("Error in listReifiedStatement " + "ResourceType was neither an " + "anon nor a named resource...");
  }
  rsi.close();
  return rss;
}

代码示例来源:origin: org.ow2.weblab.core.helpers/rdf-helper-jena

/**
 * @return A list containing every statements including the one that are subject of reifications but not the reification implementation ones (subject,
 *         object...).
 */
protected List<Statement> listStatements() {
  final List<Statement> stats = new ArrayList<Statement>();
  final StmtIterator sit = this.model.listStatements();
  while (sit.hasNext()) {
    final Statement stat = sit.nextStatement();
    // Filtering reified statement
    if (!stat.getPredicate().equals(RDF.subject) && !stat.getPredicate().equals(RDF.predicate) && !stat.getPredicate().equals(RDF.object)) {
      if (stat.getPredicate().equals(RDF.type) && stat.getObject().isResource()) {
        if (!((Resource) stat.getObject()).equals(RDF.Statement)) {
          stats.add(stat);
        }
      } else {
        stats.add(stat);
      }
    }
  }
  sit.close();
  final RSIterator rsit = this.model.listReifiedStatements();
  while (rsit.hasNext()) {
    stats.add(rsit.nextRS().getStatement());
  }
  rsit.close();
  return stats;
}

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-relations-jena-plugin

@Override
public void clear() {
  Model graph = null;
  GraphConnection graphConnection = null;
  try {
    graphConnection = openGraph();
    graph = graphConnection.getGraph();
    graph.enterCriticalSection(Lock.READ);
    graph.removeAll();
    // XXX AT: remove reification quadlets explicitly
    RSIterator it = graph.listReifiedStatements();
    List<ReifiedStatement> rss = new ArrayList<ReifiedStatement>();
    while (it.hasNext()) {
      rss.add(it.nextRS());
    }
    for (ReifiedStatement rs : rss) {
      graph.removeReification(rs);
    }
  } finally {
    if (graph != null) {
      graph.leaveCriticalSection();
    }
    if (graphConnection != null) {
      graphConnection.close();
    }
  }
}

代码示例来源:origin: nkons/r2rml-parser

RSIterator rsIter = resultModel.listReifiedStatements();
if (!rsIter.hasNext()) {
  executeAllMappings = true;
  resultModel.listReifiedStatements();
  RSIterator rsExistingIter = resultModel.listReifiedStatements();
  while (rsExistingIter.hasNext()) {
    ReifiedStatement rstmt = rsExistingIter.next();
  RSIterator rsIter = resultModel.listReifiedStatements();
  long addedStatements = 0;
  while (rsIter.hasNext()) {

代码示例来源:origin: org.ow2.weblab.core.helpers/rdf-helper-jena

&& ((obj == null) || s.getObject().equals(obj))) {
if (s.isReified()) {
  final RSIterator rsit = this.model.listReifiedStatements(s);
  while (rsit.hasNext()) {
    final ReifiedStatement rs = rsit.nextRS();

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-relations-jena-plugin

graph.remove(jenaStmt);
RSIterator it = graph.listReifiedStatements(jenaStmt);
while (it.hasNext()) {
  ReifiedStatement rs = it.nextRS();

相关文章

Model类方法