org.eclipse.rdf4j.query.algebra.Min Java Examples
The following examples show how to use
org.eclipse.rdf4j.query.algebra.Min.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GroupIterator.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
private Aggregate create(AggregateOperator operator) throws ValueExprEvaluationException, QueryEvaluationException { if (operator instanceof Count) { return new CountAggregate((Count) operator); } else if (operator instanceof Min) { return new MinAggregate((Min) operator); } else if (operator instanceof Max) { return new MaxAggregate((Max) operator); } else if (operator instanceof Sum) { return new SumAggregate((Sum) operator); } else if (operator instanceof Avg) { return new AvgAggregate((Avg) operator); } else if (operator instanceof Sample) { return new SampleAggregate((Sample) operator); } else if (operator instanceof GroupConcat) { return new ConcatAggregate((GroupConcat) operator); } return null; }
Example #2
Source File: SpinRenderer.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void meet(Min node) throws RDFHandlerException { handler.handleStatement(valueFactory.createStatement(subject, RDF.TYPE, SP.MIN_CLASS)); if (node.isDistinct()) { handler.handleStatement( valueFactory.createStatement(subject, SP.DISTINCT_PROPERTY, BooleanLiteral.TRUE)); } Resource oldSubject = subject; super.meet(node); handler.handleStatement(valueFactory.createStatement(oldSubject, SP.EXPRESSION_PROPERTY, subject)); subject = oldSubject; }
Example #3
Source File: GroupIteratorTest.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Test public void testMinEmptySet() throws QueryEvaluationException { Group group = new Group(EMPTY_ASSIGNMENT); group.addGroupElement(new GroupElem("min", new Min(new Var("a")))); GroupIterator gi = new GroupIterator(evaluator, group, EmptyBindingSet.getInstance()); assertThat(gi.hasNext()).isTrue(); assertThat(gi.next().size()).isEqualTo(0); }
Example #4
Source File: SPARQLValueExprRenderer.java From semagrow with Apache License 2.0 | 5 votes |
/** * @inheritDoc */ @Override public void meet(Min theOp) throws Exception { unaryMeet("min", theOp); }
Example #5
Source File: GroupIterator.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 4 votes |
public MinAggregate(Min operator) { super(operator); }
Example #6
Source File: AbstractQueryModelVisitor.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void meet(Min node) throws X { meetUnaryValueOperator(node); }
Example #7
Source File: SparqlValueExprRenderer.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 4 votes |
/** * @inheritDoc */ @Override public void meet(Min theOp) throws Exception { unaryMeet("min", theOp); }
Example #8
Source File: SerqlValueExprRenderer.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 4 votes |
/** * @inheritDoc */ @Override public void meet(Min theOp) throws Exception { unaryMeet("min", theOp); }
Example #9
Source File: TupleExprBuilder.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public Object visit(ASTMin node, Object data) throws VisitorException { ValueExpr ve = castToValueExpr(node.jjtGetChild(0).jjtAccept(this, data)); return new Min(ve, node.isDistinct()); }
Example #10
Source File: TupleExprBuilder.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void meet(Min node) throws VisitorException { super.meet(node); meetAggregate(node); }
Example #11
Source File: TupleExprBuilder.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void meet(Min node) throws VisitorException { super.meet(node); meetAggregate(node); }