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

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

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

Model.listObjects介绍

[英]List all objects in a model.
[中]列出模型中的所有对象。

代码示例

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

/**
 * {@inheritDoc}
 */
@Override
public NodeIterator listObjects() {
  return super.object.listObjects();
}

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

public NodeIterator listObjects() {
  return model.listObjects();
}

代码示例来源:origin: net.sf.taverna.t2.activities/sadi-activity

public void setContents(String contentsAsString) {
  if (contentsAsString.startsWith("<rdf:RDF")) {
    Model model = ModelFactory.createDefaultModel();
    model.read(new StringReader(contentsAsString), null);
    Set<Resource> subjects = model.listSubjects().toSet();
    Set<RDFNode> objects = model.listObjects().toSet();
    subjects.removeAll(objects);
    node = subjects.iterator().next();
  } else {
    node = RdfUtils.createTypedLiteral(contentsAsString);
  }
}

代码示例来源:origin: epimorphics/elda

for (RDFNode n: s.m.listObjects().toList()) 
  if (n.isURIResource())
    sb.append( "\n        " ).append("<").append( n.asNode().getURI() ).append(">");

代码示例来源:origin: net.sf.taverna.t2.activities/sadi-activity

public static RDFNode convert(InputStream stream) {
  Model model = ModelFactory.createDefaultModel().read(stream, null);
  Set<Resource> subjects = model.listSubjects().toSet();
  Set<RDFNode> objects = model.listObjects().toSet();
  subjects.removeAll(objects);
  return subjects.iterator().next();
}

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

protected void prepareOneRefBNodes(Model model) 
{
  NodeIterator objIter = model.listObjects() ;
  for ( ; objIter.hasNext() ; )
  {
    RDFNode n = objIter.nextNode() ;
    
    if ( testOneRefBNode(n) )
      oneRefObjects.add(n) ; 
    objIter.close() ;
    // N3JenaWriter.DEBUG
    if ( N3JenaWriter.DEBUG )
    {
      out.println("# RDF Lists      = "+rdfLists.size()) ;
      out.println("# RDF ListsAll   = "+rdfListsAll.size()) ;
      out.println("# oneRefObjects  = "+oneRefObjects.size()) ;
    }
  }
}

代码示例来源:origin: org.cogchar/org.cogchar.lib.render.goody

NodeIterator objects = rdfModel.listObjects();
while (objects.hasNext()) {
  RDFNode node = objects.next();

相关文章

Model类方法