@Override public AstElement copyOf() { return new ColumnImpl(selectorName, propertyName, columnName); } }
static int getColumnIndex(ColumnImpl[] columns, String columnName) { for (int i = 0, size = columns.length; i < size; i++) { ColumnImpl c = columns[i]; String cn = c.getColumnName(); if (cn != null && cn.equals(columnName)) { return i; } } return -1; }
@Override public String[] getColumnSelectorNames() { ArrayList<String> list = new ArrayList<String>(); for (ColumnImpl c : query.getColumns()) { SelectorImpl selector = c.getSelector(); String name = selector == null ? null : selector.getSelectorName(); if (!list.contains(name)) { list.add(name); } } return list.toArray(new String[list.size()]); }
if (c.getSelector().equals(this)) { String columnName = c.getColumnName(); if (columnName.equals(QueryConstants.REP_EXCERPT) || columnName.equals(QueryConstants.OAK_SCORE_EXPLANATION)) { f.restrictProperty(columnName, Operator.NOT_EQUAL, null);
column.bindSelector(source); ColumnImpl c = columns[i]; boolean distinct = true; String propName = c.getPropertyName(); if (QueryConstants.JCR_SCORE.equals(propName) || propName.startsWith(QueryConstants.REP_FACET + "(")) { distinct = false;
@Override public boolean visit(ColumnImpl node) { node.setQuery(query); return true; }
ResultRowImpl currentRow() { int selectorCount = selectors.size(); Tree[] trees = new Tree[selectorCount]; for (int i = 0; i < selectorCount; i++) { SelectorImpl s = selectors.get(i); trees[i] = s.currentTree(); } int columnCount = columns.length; PropertyValue[] values = new PropertyValue[columnCount]; for (int i = 0; i < columnCount; i++) { ColumnImpl c = columns[i]; values[i] = c.currentProperty(); } PropertyValue[] orderValues; if (orderings == null) { orderValues = null; } else { int size = orderings.length; orderValues = new PropertyValue[size]; for (int i = 0; i < size; i++) { orderValues[i] = orderings[i].getOperand().currentProperty(); } } return new ResultRowImpl(this, trees, values, distinctColumns, orderValues); }
/** * Calls accept on the following contained QOM nodes: * <ul> * <li>Source</li> * <li>Constraints</li> * <li>Orderings</li> * <li>Columns</li> * </ul> * * @param query the query to visit */ public void visit(QueryImpl query) { query.getSource().accept(this); ConstraintImpl constraint = query.getConstraint(); if (constraint != null) { constraint.accept(this); } OrderingImpl[] orderings = query.getOrderings(); if (orderings != null) { for (OrderingImpl ordering : orderings) { ordering.accept(this); } } ColumnImpl[] columns = query.getColumns(); for (ColumnImpl column : columns) { column.accept(this); } }
if (c.getSelector().equals(this)) { String columnName = c.getColumnName(); if (columnName.equals(QueryConstants.OAK_SCORE_EXPLANATION)) { f.restrictProperty(columnName, Operator.NOT_EQUAL, null);
column.bindSelector(source); ColumnImpl c = columns[i]; boolean distinct = true; String propName = c.getPropertyName(); if (QueryConstants.JCR_SCORE.equals(propName) || propName.startsWith(QueryConstants.REP_FACET + "(")) { distinct = false;
@Override public boolean visit(ColumnImpl node) { node.setQuery(query); return true; }
ResultRowImpl currentRow() { int selectorCount = selectors.size(); Tree[] trees = new Tree[selectorCount]; for (int i = 0; i < selectorCount; i++) { SelectorImpl s = selectors.get(i); trees[i] = s.currentTree(); } int columnCount = columns.length; PropertyValue[] values = new PropertyValue[columnCount]; for (int i = 0; i < columnCount; i++) { ColumnImpl c = columns[i]; values[i] = c.currentProperty(); } PropertyValue[] orderValues; if (orderings == null) { orderValues = null; } else { int size = orderings.length; orderValues = new PropertyValue[size]; for (int i = 0; i < size; i++) { orderValues[i] = orderings[i].getOperand().currentProperty(); } } return new ResultRowImpl(this, trees, values, distinctColumns, orderValues); }
/** * Calls accept on the following contained QOM nodes: * <ul> * <li>Source</li> * <li>Constraints</li> * <li>Orderings</li> * <li>Columns</li> * </ul> * * @param query the query to visit */ public void visit(QueryImpl query) { query.getSource().accept(this); ConstraintImpl constraint = query.getConstraint(); if (constraint != null) { constraint.accept(this); } OrderingImpl[] orderings = query.getOrderings(); if (orderings != null) { for (OrderingImpl ordering : orderings) { ordering.accept(this); } } ColumnImpl[] columns = query.getColumns(); for (ColumnImpl column : columns) { column.accept(this); } }
@Override public AstElement copyOf() { return new ColumnImpl(selectorName, propertyName, columnName); } }
if (c.getSelector().equals(this)) { String columnName = c.getColumnName(); if (columnName.equals(QueryConstants.OAK_SCORE_EXPLANATION)) { f.restrictProperty(columnName, Operator.NOT_EQUAL, null);
column.bindSelector(source); ColumnImpl c = columns[i]; boolean distinct = true; if (QueryConstants.JCR_SCORE.equals(c.getPropertyName())) { distinct = false;
static int getColumnIndex(ColumnImpl[] columns, String columnName) { for (int i = 0, size = columns.length; i < size; i++) { ColumnImpl c = columns[i]; String cn = c.getColumnName(); if (cn != null && cn.equals(columnName)) { return i; } } return -1; }
@Override public boolean visit(ColumnImpl node) { node.setQuery(query); return true; }