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

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

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

Model.query介绍

[英]Create a new model containing the statements matching a query.

A statment is considered to match if the test method of s returns true when called on s.
[中]

代码示例

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

/**
 * {@inheritDoc}
 */
@Override
public Model query(Selector s) {
  return super.object.query(s);
}

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

public Model query(Selector s) {
  return model.query(s);
}

代码示例来源:origin: org.eagle-i/eagle-i-datatools-catalyst

private List<EIInstance> create(final Model model) {
  if ( model == null ) {
    return Collections.emptyList();
  }
  final List<EIInstance> instances = new ArrayList<EIInstance>();
  final Set<Resource> subjects = model.listSubjects().toSet();
  // create an EIInstance per subject
  for (final Resource r : subjects) {
    final Model subModel = model.query( new SimpleSelector( r, null, (RDFNode)null ) );
    final EIInstance ei = jenaIntanceFactory.create( EIURI.create( r.getURI() ), subModel );
    if ( ei != null && !EIInstance.NULL_INSTANCE.equals( ei ) ) {
      instances.add( ei );
    }
  }
  return instances;
}

相关文章

Model类方法