/** * Get the current absolute Oak path (normalized). * * @return the path */ public String currentPath() { return cursor == null ? null : currentRow.getPath(); }
@Override public PropertyValue getValue(String columnName) { return currentRow.getValue(columnName); }
public boolean isVirtualRow() { return currentRow != null && currentRow.isVirtualRow(); }
private void fetchNext() { if (aggregates != null && aggregates.hasNext()) { currentPath = aggregates.next(); init = true; return; } aggregates = null; if (cursor.hasNext()) { currentRow = cursor.next(); if (!currentRow.isVirtualRow()) { String path = currentRow.getPath(); aggregates = Iterators.filter(Iterators.concat( Iterators.singletonIterator(path), aggregator.getParents(rootState, path)), Predicates .not(Predicates.in(seenPaths))); } fetchNext(); return; } closed = true; }
private PropertyValue currentOakProperty(Tree t, String oakPropertyName, Integer propertyType) { PropertyValue result; if ((t == null || !t.exists()) && (currentRow == null || !currentRow.isVirtualRow())) { return null; result = currentRow.getValue(QueryConstants.JCR_SCORE); } else if (oakPropertyName.equals(QueryConstants.REP_EXCERPT) || oakPropertyName.startsWith(QueryConstants.REP_EXCERPT + "(")) { result = currentRow.getValue(oakPropertyName); } else if (oakPropertyName.equals(QueryConstants.OAK_SCORE_EXPLANATION)) { result = currentRow.getValue(QueryConstants.OAK_SCORE_EXPLANATION); } else if (oakPropertyName.equals(QueryConstants.REP_SPELLCHECK)) { result = currentRow.getValue(QueryConstants.REP_SPELLCHECK); } else if (oakPropertyName.equals(QueryConstants.REP_SUGGEST)) { result = currentRow.getValue(QueryConstants.REP_SUGGEST); } else if (oakPropertyName.startsWith(QueryConstants.REP_FACET + "(")) { result = currentRow.getValue(oakPropertyName); } else { result = PropertyValues.create(t.getProperty(oakPropertyName));
private void fetchNext() { if (aggregates != null && aggregates.hasNext()) { currentPath = aggregates.next(); init = true; return; } aggregates = null; if (cursor.hasNext()) { currentRow = cursor.next(); if (!currentRow.isVirtualRow()) { String path = currentRow.getPath(); aggregates = Iterators.filter(Iterators.concat( Iterators.singletonIterator(path), aggregator.getParents(rootState, path)), Predicates .not(Predicates.in(seenPaths))); } fetchNext(); return; } closed = true; }
private PropertyValue currentOakProperty(Tree t, String oakPropertyName, Integer propertyType) { PropertyValue result; if ((t == null || !t.exists()) && (currentRow == null || !currentRow.isVirtualRow())) { return null; result = currentRow.getValue(QueryConstants.JCR_SCORE); } else if (oakPropertyName.equals(QueryConstants.REP_EXCERPT)) { result = currentRow.getValue(QueryConstants.REP_EXCERPT); } else if (oakPropertyName.equals(QueryConstants.OAK_SCORE_EXPLANATION)) { result = currentRow.getValue(QueryConstants.OAK_SCORE_EXPLANATION); } else if (oakPropertyName.equals(QueryConstants.REP_SPELLCHECK)) { result = currentRow.getValue(QueryConstants.REP_SPELLCHECK); } else if (oakPropertyName.equals(QueryConstants.REP_SUGGEST)) { result = currentRow.getValue(QueryConstants.REP_SUGGEST); } else if (oakPropertyName.startsWith(QueryConstants.REP_FACET + "(")) { result = currentRow.getValue(oakPropertyName); } else { result = PropertyValues.create(t.getProperty(oakPropertyName));
@Override public String getPath() { return pathRow.getPath(); }
private void fetchNext() { if (aggregates != null && aggregates.hasNext()) { currentPath = aggregates.next(); init = true; return; } aggregates = null; if (cursor.hasNext()) { currentRow = cursor.next(); if (!currentRow.isVirtualRow()) { String path = currentRow.getPath(); aggregates = Iterators.filter(Iterators.concat( Iterators.singletonIterator(path), aggregator.getParents(rootState, path)), Predicates .not(Predicates.in(seenPaths))); } fetchNext(); return; } closed = true; }
private PropertyValue currentOakProperty(Tree t, String oakPropertyName, Integer propertyType) { PropertyValue result; if ((t == null || !t.exists()) && (currentRow == null || !currentRow.isVirtualRow())) { return null; result = currentRow.getValue(QueryConstants.JCR_SCORE); } else if (oakPropertyName.equals(QueryConstants.REP_EXCERPT) || oakPropertyName.startsWith(QueryConstants.REP_EXCERPT + "(")) { result = currentRow.getValue(oakPropertyName); } else if (oakPropertyName.equals(QueryConstants.OAK_SCORE_EXPLANATION)) { result = currentRow.getValue(QueryConstants.OAK_SCORE_EXPLANATION); } else if (oakPropertyName.equals(QueryConstants.REP_SPELLCHECK)) { result = currentRow.getValue(QueryConstants.REP_SPELLCHECK); } else if (oakPropertyName.equals(QueryConstants.REP_SUGGEST)) { result = currentRow.getValue(QueryConstants.REP_SUGGEST); } else if (oakPropertyName.startsWith(QueryConstants.REP_FACET + "(")) { result = currentRow.getValue(oakPropertyName); } else { result = PropertyValues.create(t.getProperty(oakPropertyName));
@Override public PropertyValue getValue(String columnName) { return currentRow.getValue(columnName); }
public boolean isVirtualRow() { return currentRow != null && currentRow.isVirtualRow(); }
/** * Get the current absolute Oak path (normalized). * * @return the path */ public String currentPath() { return cursor == null ? null : currentRow.getPath(); }
} else if (currentRow.isVirtualRow()) { Tree tree = getTree(currentRow.getPath()); if (tree == null || !tree.exists()) { continue;
@Override public PropertyValue getValue(String columnName) { return currentRow.getValue(columnName); }
public boolean isVirtualRow() { return currentRow != null && currentRow.isVirtualRow(); }
/** * Get the current absolute Oak path (normalized). * * @return the path */ public String currentPath() { return cursor == null ? null : currentRow.getPath(); }
} else if (currentRow.isVirtualRow()) { Tree tree = getTree(currentRow.getPath()); if (tree == null || !tree.exists()) { continue;
@Override public PropertyValue getValue(String columnName) { // overlay the score if (QueryConstants.JCR_SCORE.equals(columnName)) { return PropertyValues.newDouble(currentRow.score); } if (QueryConstants.REP_SPELLCHECK.equals(columnName) || QueryConstants.REP_SUGGEST.equals(columnName)) { return PropertyValues.newString(Iterables.toString(currentRow.suggestWords)); } if (QueryConstants.REP_EXCERPT.equals(columnName)) { return PropertyValues.newString(currentRow.excerpt); } return pathRow.getValue(columnName); }
private boolean evaluateCurrentRow() { if (currentRow.isVirtualRow()) { //null path implies that all checks are already done -- we just need to pass it through return true; } if (!matchesAllTypes && !evaluateTypeMatch()) { return false; } for (ConstraintImpl constraint : selectorConstraints) { if (!constraint.evaluate()) { if (constraint.evaluateStop()) { // stop processing from now on cursor = null; } return false; } } if (joinCondition != null && !joinCondition.evaluate()) { return false; } return true; }