本文整理了Java中com.hp.hpl.jena.query.ResultSet.getRowNumber
方法的一些代码示例,展示了ResultSet.getRowNumber
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResultSet.getRowNumber
方法的具体详情如下:
包路径:com.hp.hpl.jena.query.ResultSet
类名称:ResultSet
方法名:getRowNumber
[英]Return the "row" number for the current iterator item
[中]返回当前迭代器项的“行”号
代码示例来源:origin: fr.inria.eventcloud/eventcloud-api
/**
* {@inheritDoc}
*/
@Override
public int getRowNumber() {
return super.object.getRowNumber();
}
代码示例来源:origin: spaziocodice/SolRDF
@Override
public int getRowNumber() {
return resultSet.getRowNumber();
}
代码示例来源:origin: spaziocodice/SolRDF
@Override
public int getRowNumber() {
return resultset.getRowNumber();
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
@Override
public int getRowNumber() {
// Calculate row number based on whether we have peeked
return this.hasPeeked() ? this.results.getRowNumber() - 1 : this.results.getRowNumber();
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
private boolean hasPeeked() {
int diff = this.results.getRowNumber() - this.rowNumber;
if (diff == 0) {
// If no difference we have not peeked
return false;
} else if (diff == 1 && this.peeked != null) {
// If difference is one then we have peeked
return true;
} else if (diff >= 1) {
// If difference between what we think the row number is and that of
// the underlying result set is > 1 then someone has moved positions
// in the underlying result set independently
// Sync up with current position and report false
if (warnOnSyncErrors)
LOGGER.warn("Underlying result set was moved forward " + (diff - 1)
+ " result(s), this result set was synced back up but some results have been missed");
this.rowNumber = this.results.getRowNumber();
this.peeked = null;
return false;
} else {
// If difference is negative then someone has reset the underlying
// result set so we are completely out of sync, syncing back up at
// this point would be illegal since we have gone backwards in the
// stream
throw new IllegalStateException(
"Underlying result set position has moved backwards, this result set is no longer usable");
}
}
代码示例来源:origin: spaziocodice/SolRDF
@Override
public boolean hasNext() {
return resultSet.getRowNumber() < (offset + size) && resultSet.hasNext();
}
代码示例来源:origin: spaziocodice/SolRDF
@Override
public QuerySolution next() {
if (resultSet.getRowNumber() >= offset && getRowNumber() < (offset + size)){
final QuerySolution solution = resultSet.nextSolution();
rows.add(solution);
return solution;
}
throw new IllegalStateException("Invalid iterable state on this ResultSet!");
}
代码示例来源:origin: spaziocodice/SolRDF
} else {
if (offset > 0) {
while (resultSet.hasNext() && resultSet.getRowNumber() < offset) {
resultSet.nextBinding();
内容来源于网络,如有侵权,请联系作者删除!