本文整理了Java中org.apache.jena.rdf.model.ResIterator.filterKeep
方法的一些代码示例,展示了ResIterator.filterKeep
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResIterator.filterKeep
方法的具体详情如下:
包路径:org.apache.jena.rdf.model.ResIterator
类名称:ResIterator
方法名:filterKeep
暂无
代码示例来源:origin: google/data-transfer-project
/** Gets a given resource (including the #this reference) from a model. **/
public static Resource getResource(String url, Model model) {
List<Resource> matchingSubjects = model.listSubjects()
.filterKeep(s -> s.getURI() != null)
.filterKeep(s -> s.getURI().equalsIgnoreCase(url)
|| s.getURI().equalsIgnoreCase(url + "#this")).toList();
if (matchingSubjects.isEmpty()) {
return null;
}
checkState(matchingSubjects.size() == 1,
"Model %s didn't contain %s",
model,
url);
return matchingSubjects.get(0);
}
代码示例来源:origin: org.apache.jena/jena-core
.filterKeep( o -> !objectTable.containsKey(o) && !wantReification(o));
代码示例来源:origin: apache/jena
.filterKeep( o -> !objectTable.containsKey(o) && !wantReification(o));
内容来源于网络,如有侵权,请联系作者删除!