本文整理了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
[英]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;
}
内容来源于网络,如有侵权,请联系作者删除!