1.0.0
A collection of SPIN functions that can be used to query, traverse and aggregate tabular data.
Aggregator
A pair of SPARQL functions that can be used to aggregate values of a SPR table. Instances of this class can be passed into the various aggregateXY functions.
Table class
Metaclass of classes that can represent tabular data. The classes that have this metaclass as their type need to specify SPARQL/SPIN functions for various look up tasks.
cell function
start value
result function
The URI of the SPIN Function that shall be called at the end of the steps.
colCount function
system property
An "abstract" base property that groups together those system properties that the user will hardly ever need to see in property trees. This property may be dropped in future versions of this ontology - right now it's mainly here for convenience.
colType function
colWidth function
rowCount function
arg6
The sixth argument of a function call.
step function
The URI of the SPIN Function that shall be called at each step.
colName function
Magic SPR properties
true
col cells
Iterates over all rows of a given table (left side, ?arg1) at column ?arg2 and binds the variable on the right with the cell values. The second variable on the right may be bound to the row index as well.
The column index, starting at zero.
The spr:Table to get the values for.
Table
Base class of table classes. Must define the URIs of low-level SPARQL functions that are used by SPR to access individual table cells and table meta data.
row indices
Iterates over all rows of a given table (left side, ?arg1) and binds the variable on the right with the index of the rows.
The spr:Table to get the row indexes of.
lastIndex
1
index
?0
?0
0
?0
?1
?1
lastIndex
?1
index
row
value
row
value
row
SPR Functions
Base class of various SPR related functions.
true
Aggregator result functions
The total number of steps.
The end result after stepping through the values.
true
Column type functions
The column index, starting at zero.
The table to get the column name for.
true
column type
Gets the (data) type of a column, if this information is present. The datatype may be derived from spin:Columns attached to the table data provider.
tableClass
tableClass
function
result
function
result
Avg
0
Aggregator functions
The spr:Table to iterate over.
The aggregator to perform.
true
aggregate row
Applies the spr:Aggregator ?arg1 to all columns of row ?arg3 of spr:Table ?arg2.
The row index.
stepFunction
startValue
resultFunction
colCount
stepped
startValue
stepFunction
1
colCount
0
result
stepped
colCount
stepped
resultFunction
resultFunction
result
Column width functions
The column index, starting at zero.
The table to get the column name for.
true
column width
Gets the width (in pixels) of a given column. This may have been derived from spin:Columns attached to the table data provider.
tableClass
tableClass
function
result
function
result
Sum
0
Row count functions
The spr:Table to get the number of rows for.
true
is empty
Checks whether a given SPR table has zero rows.
0
Cell functions
true
hasCell
Checks if there is a cell value in a given Table (?arg1) at a given row (?arg2) and column (?arg3).
The column index, starting at 0.
The row index, starting at 0.
The spr:Table to get the cell value of.
tableClass
tableClass
function
result
function
result
aggregate row
Applies the spr:Aggregator ?arg1 to all rows of column ?arg3 of spr:Table ?arg2.
The column index.
stepFunction
startValue
resultFunction
rowCount
stepped
startValue
stepFunction
1
rowCount
0
result
stepped
rowCount
stepped
resultFunction
resultFunction
result
Column name functions
The column index, starting at zero.
The table to get the column name for.
true
column name
Gets the name of a column in a given result set. The name is usually derived from the variable name, but may also originate from spin:Columns attached to the table data provider.
tableClass
tableClass
function
result
function
result
Aggregator step functions
The current cell value that shall be aggregated on top of ?arg1.
The old value to start with, e.g. 0 for SUM.
true
row cells
Iterates over all colums of a given table (left side, ?arg1) at row ?arg2 and binds the variable on the right with the cell values. The second variable on the right may be bound to the column index as well.
The row index, starting at zero.
The spr:Table to get the values for.
row indices
Iterates over all columns of a given table (left side, ?arg1) and binds the variable on the right with the index of the columns.
The spr:Table to get the row indexes of.
lastIndex
1
index
?0
?0
0
?0
?1
?1
lastIndex
?1
index
col
value
col
value
col
Product
1
The current aggregate value.
The step function.
The max number of steps to make.
Visits a given column ?arg2 of Table ?arg1 with a given spr:AggregatorStepFunction (?arg5) and then calls itself recursively until the last value index (?arg4) has been reached. ?arg6 is the result of the previous step.
The current step index.
The row to iterate over.
value
next
arg6
value
arg6
value
result
next
next
1
result
The spr:Table to iterate over.
visit row
The max number of steps to make.
visit row
The current aggregate value.
The row to iterate over.
value
next
arg6
value
arg6
value
result
next
next
1
1
result
Visits a given row ?arg2 of Table ?arg1 with a given spr:AggregatorStepFunction (?arg5) and then calls itself recursively until the last value index (?arg4) has been reached. ?arg6 is the result of the previous step.
The current step index.
The step function.
The spr:Table to iterate over.
tableClass
function
tableClass
function
result
function
result
function
result
row count
Gets the number of rows in a given table.
tableClass
result
tableClass
tableClass
function
result
function
The table to get the number of columns of.
tableClass
result
Column count functions
true
The column index, starting at 0.
The row index, starting at 0.
column count
Gets the number of columns of a given result set.
cell
Gets the cell value of a given Table (?arg1) at a given row (?arg2) and column (?arg3).
The spr:Table to get the cell value of.