org.topbraid.sparql.functions
Class Count

java.lang.Object
  extended by com.hp.hpl.jena.sparql.pfunction.PropertyFunctionBase
      extended by org.topbraid.sparql.functions.Count
All Implemented Interfaces:
com.hp.hpl.jena.sparql.pfunction.PropertyFunction

public class Count
extends com.hp.hpl.jena.sparql.pfunction.PropertyFunctionBase

Name of the property function: spam:count

The query has two modes:

?count spam:count ([subject] [predicate] [object]) : Calculates the count of the ([subject] [predicate] [object]) statement from the current ontology and assigns the result to the ?count variable on the left.

?count spam:count "SELECT ... WHERE {...}" : Calculates the count of the result set from the nested SELECT query. If the variables inside the nested query are mentioned in the surrounding execution context, then they are pre-binded before the nested query is executed. It assigns the result to the ?count variable on the left.

(It is recommended that FILTERs are used only with the second mode)


Constructor Summary
Count()
           
 
Method Summary
 com.hp.hpl.jena.sparql.engine.QueryIterator exec(com.hp.hpl.jena.sparql.engine.binding.Binding binding, com.hp.hpl.jena.sparql.pfunction.PropFuncArg argSubject, com.hp.hpl.jena.graph.Node predicate, com.hp.hpl.jena.sparql.pfunction.PropFuncArg argObject, com.hp.hpl.jena.sparql.engine.ExecutionContext execCxt)
           
 
Methods inherited from class com.hp.hpl.jena.sparql.pfunction.PropertyFunctionBase
build, exec
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Count

public Count()
Method Detail

exec

public com.hp.hpl.jena.sparql.engine.QueryIterator exec(com.hp.hpl.jena.sparql.engine.binding.Binding binding,
                                                        com.hp.hpl.jena.sparql.pfunction.PropFuncArg argSubject,
                                                        com.hp.hpl.jena.graph.Node predicate,
                                                        com.hp.hpl.jena.sparql.pfunction.PropFuncArg argObject,
                                                        com.hp.hpl.jena.sparql.engine.ExecutionContext execCxt)
Specified by:
exec in class com.hp.hpl.jena.sparql.pfunction.PropertyFunctionBase