net.ontopia.topicmaps.query.core.QueryResultIF.getValues()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(103)

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

QueryResultIF.getValues介绍

[英]PUBLIC: Returns the current match as an array of values. Note that the returned array should not be modified as it may lead to undefined results. Requires next() to have been called first.
[中]PUBLIC:以值数组的形式返回当前匹配项。请注意,不应修改返回的数组,因为它可能会导致未定义的结果。需要先调用next()

代码示例

代码示例来源:origin: ontopia/ontopia

@Override
public Object[] getValues() {
 if (inBuffer)
  return bufferedRow;
 return queryResult.getValues();
}

代码示例来源:origin: ontopia/ontopia

@Override
public Object next() {
 if (!has_next)
  throw new NoSuchElementException();
 result.getValues(values);
 has_next = result.next();
 return rowmap;
}

代码示例来源:origin: ontopia/ontopia

@Override
public boolean next() {
 // Get all results from buffer (until the end).
 // Then get results from queryResult, adding them to the buffer.
 boolean retVal;
 
 if (bufferIt != null && bufferIt.hasNext()) {
  bufferedRow = (Object[])bufferIt.next();
  retVal = true;
 } else {
  bufferIt = null;
  retVal = queryResult.next();
  
  if (retVal)
   buffer.add(queryResult.getValues());
   
  inBuffer = false;
 }
 
 return retVal;
}

代码示例来源:origin: ontopia/ontopia

/** Moves one step forward in the result set of the query.
*/
public void next() {
 currentRow = nextRow;
 if (!lookAhead.isEmpty())
  nextRow = (Object[])lookAhead.remove(0);
 else
  nextRow = queryResult.next() ? queryResult.getValues() : null;
 computeDifferences();
}

代码示例来源:origin: ontopia/ontopia

@Override
public Map<String, Object> next() {
 if (!has_next)
  throw new NoSuchElementException();
 ArrayMap<String, Object> rowmap = new ArrayMap<String, Object>(keys, result.getValues());
 has_next = result.next();
 return rowmap;
}

代码示例来源:origin: ontopia/ontopia

private Object findNext() {
 Object next = null;
 //! while (next == null && (next_column < result.getWidth() || has_next)) { // old check
 while (next == null && has_next && next_column < result.getWidth()) {
  next = result.getValue(next_column++);
  Object previous = previous_row[next_column - 1];
  if (next != null && previous != null && next.equals(previous))
   next = null;
  
  if (next_column >= result.getWidth() && has_next) {
   next_column = 0;
   previous_row = result.getValues();
   has_next = result.next();
  }
 }
 return next;
}

代码示例来源:origin: ontopia/ontopia

protected boolean isOnlyChild(boolean[] parentGroupColumns, boolean[] childGroupColumns) {
 // look ahead to see if the current child is the only direct child of the parent
 // at last row
 if (nextRow == null) return true;
 // next row is different
 if (!equalGroup(parentGroupColumns, currentRow, nextRow)) return true;
 if (!equalGroup(childGroupColumns, currentRow, nextRow)) return false;
 
 // check existing look ahead
 int length = lookAhead.size();
 for (int i=0; i < length; i++) {
  Object[] futureRow = (Object[])lookAhead.get(i);
  if (!equalGroup(parentGroupColumns, currentRow, futureRow)) return true;
  if (!equalGroup(childGroupColumns, currentRow, futureRow)) return false;            
 }
 // peek further
 while (queryResult.next()) {      
  Object[] futureRow = queryResult.getValues();      
  lookAhead.add(futureRow);
  if (!equalGroup(parentGroupColumns, currentRow, futureRow)) return true;
  if (!equalGroup(childGroupColumns, currentRow, futureRow)) return false;      
 }    
 return true;
}

代码示例来源:origin: net.ontopia/ontopoly-editor

try {
 while (result.next()) {
  fields.add(result.getValues());

代码示例来源:origin: ontopia/ontopia

try {
 while (result.next()) {
  fields.add(result.getValues());

相关文章