Public Types | Public Member Functions

Filter Class Reference

Represents the contents of a FILTER in Sparql. More...

Inheritance diagram for Filter:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Type {
  InvalidFilter, FunctionFilter, SelectFilter, ExistsFilter,
  LiteralFilter
}

Public Member Functions

 Filter ()
 Constructs an invalid Filter.
CUBI_EXPLICIT Filter (const Exists &exists)
 Constructs a Filter from an Exists.
CUBI_EXPLICIT Filter (const Function &function)
 Constructs a Filter from a Function.
CUBI_EXPLICIT Filter (const LiteralValue &literal)
 Constructs a Filter from a LiteralValue.
CUBI_EXPLICIT Filter (const Select &select)
 Constructs a Filter from a Select.
Type filterType () const
Exists exists () const
Function function () const
LiteralValue literalValue () const
Select select () const

Detailed Description

Represents the contents of a FILTER in Sparql.

A filter can either be a standard expression (like in FILTER(?var = 3) ), a subselect expression, an Exists block or a LiteralValue. When using a Select as a filter, the Select must return only one column, for example FILTER((SELECT COUNT(?t) WHERE {?res nao:hasTag ?t}) = 2) to select only the solutions ?t which have two tags.

You can use filterType() to know if a Filter contains a Function, a Select, an Exists or a LiteralValue.


The documentation for this class was generated from the following files:
 All Classes Functions Enumerations