PublicShow sourcerdfql_util.pl

Source select_results(+Distinct, +Offset, +Limit, +SortBy, -Result, :Goal)
Calls select_results/8 using Group=[] and Having=true.
Source select_results(+Distinct, +Group, +Having, +Aggregates, +Offset, +Limit, +SortBy, -Result, :Goal) is nondet
Select results for the template Result on backtracking over Goal.
Arguments:
Distinct- Iff 'distinct', only consider distinct solutions
Group- is a list of variables on which to group the results. These are the only variables that can be used in the HAVING filter and final projection.
Having- is a constraint (similar to FILTER) to filter grouped results.
Aggregates- List of aggregate(Function, Var)
Offset- Skip the first Offset results. Offset is applied after Distinct and SortBy
Limit- Only return the first Limit results. Limit is applied after Distinct, SortBy and Offset. The value 'inf' returns all values.
SortBy- Either 'unsorted' or a term order_by(Cols), where each Col in Cols is a term ascending(Expr) or descending(Expr).
To be done
- Group, Having and Aggregate are currently ignored.
Source sort_key(+Result, -Key) is det
Determine the sort-key from a result according to the SPARQL standard:
  1. undefined/null
  2. blank nodes
  3. IRIs
  4. RDF Literals a. Numbers are mapped to their value space b. Other literals are mapped to their plain literal. Note that this works fine for some types:
    • xsd:date and variants
    • xsd:boolean
bug
- This is not good enough. Literals must be compared in their value-space. This requires some study.
- Result is a SPARQL expression.
Source entailment_module(+Entailment, -Module)
Find the Prolog module implementing the entailment rules for a semantic web language.