本文整理了Java中org.apache.jena.query.ResultSet.getResourceModel
方法的一些代码示例,展示了ResultSet.getResourceModel
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResultSet.getResourceModel
方法的具体详情如下:
包路径:org.apache.jena.query.ResultSet
类名称:ResultSet
方法名:getResourceModel
[英]Get the model that resources are created against - may be null
[中]获取创建资源所依据的模型-可能为空
代码示例来源:origin: SmartDataAnalytics/jena-sparql-api
@Override
public Model getResourceModel() {
return decoratee.getResourceModel();
}
}
代码示例来源:origin: vivo-project/Vitro
@Override
public Model getResourceModel() {
return originalResultSet.getResourceModel();
}
代码示例来源:origin: apache/jena
/**
* Creates a peeking wrapper around another result set
*
* @param results
* Inner results
*/
public ResultSetPeeking(ResultSet results) {
if (results == null)
throw new IllegalArgumentException("Inner result set cannot be null");
this.results = results;
this.model = results.getResourceModel();
}
代码示例来源:origin: apache/jena
@Override
public Model getResourceModel() {
check() ;
return other.getResourceModel() ;
}
代码示例来源:origin: apache/jena
@Override
public Model getResourceModel() {
return get().getResourceModel() ;
}
代码示例来源:origin: apache/jena
/** Establish a prologue for formatting output. Return "null" for none found. */
private static Prologue choosePrologue(ResultSet resultSet, Context context) {
try {
if ( context != null && context.get(ARQConstants.symPrologue) != null )
return context.get(ARQConstants.symPrologue);
Model m = resultSet.getResourceModel();
if ( m != null )
return new Prologue(m);
} catch (Exception ex) {
Log.warn(ARQ.getExecLogger(), "Failed to establish a 'Prologue' for text output: "+ex.getMessage());
}
return null;
}
代码示例来源:origin: apache/jena
/**
* Create an in-memory result set from any ResultSet object. If the
* ResultSet is an in-memory one already, then no copying is done - the
* necessary internal datastructures are shared. This operation destroys
* (uses up) a ResultSet object that is not an in-memory one.
*/
public ResultSetMem(ResultSet qr) {
model = qr.getResourceModel();
if ( qr instanceof ResultSetMem ) {
ResultSetMem qrm = (ResultSetMem)qr;
this.rows = qrm.rows;
this.varNames = qrm.varNames;
} else {
varNames = qr.getResultVars();
List<Var> vars = Var.varList(varNames);
while (qr.hasNext()) {
Binding rb = BindingFactory.copy(qr.nextBinding());
rows.add(rb);
}
}
reset();
}
代码示例来源:origin: franzinc/agraph-java-client
try {
ResultSet results = qe.execSelect();
assertEquals(results.getResourceModel(), model);
assertEquals(results.getResultVars().size(), 3);
while (results.hasNext()) {
try {
ResultSet results = qe.execSelect();
assertEquals(results.getResourceModel(), model);
assertEquals(results.getResultVars().size(), 4);
int count;
内容来源于网络,如有侵权,请联系作者删除!