Package org.openrdf.query.algebra

Examples of org.openrdf.query.algebra.Count


  private static Value processAggregate(EvaluationStrategy strategy, Set<BindingSet> bindingSets,
      AggregateOperator operator)
    throws StoreException
  {
    if (operator instanceof Count) {
      Count countOp = (Count)operator;

      ValueExpr arg = countOp.getArg();

      if (arg != null) {
        Set<Value> values = makeValueSet(strategy, arg, bindingSets);
        return new LiteralImpl(Integer.toString(values.size()), XMLSchema.INTEGER);
      }
View Full Code Here


              SailRepositoryConnection connection = (SailRepositoryConnection)
                  database.getRepository().getConnection();
             
              try {
                  Group2 group = new Group2(_builder.makeFilterTupleExpr());
                  group.addGroupElement(new GroupElem(_countVar.getName(), new Count(_itemVar)));
                  group.addGroupBindingName(_valueVar.getName());
                 
                  ProjectionElemList projectionElements = new ProjectionElemList();
                  projectionElements.addElement(new ProjectionElem(_valueVar.getName()));
                  projectionElements.addElement(new ProjectionElem(_countVar.getName()));
View Full Code Here

  private Value processAggregate(Set<BindingSet> bindingSets, AggregateOperator operator)
    throws QueryEvaluationException
  {
    if (operator instanceof Count) {
      Count countOp = (Count)operator;

      ValueExpr arg = countOp.getArg();

      if (arg != null) {
        Set<Value> values = makeValueSet(arg, bindingSets);
        return new LiteralImpl(Integer.toString(values.size()), XMLSchema.INTEGER);
      }
View Full Code Here

TOP

Related Classes of org.openrdf.query.algebra.Count

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.