view src/sparql/construct_sia_vector_table_bnodes.sparql @ 16:6863887e1b70

organized imports added new "createV" and "createW" methods so that we can specifically create Vector Tables V or W as described in the paper removed unnecessary code added try/catch blocks where necessary
author stevenh
date Tue, 08 Jan 2013 18:30:14 +0000
parents 0775168f1a51
children
line wrap: on
line source
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX abc: <http://example.org/abc#>
PREFIX seq: <http://example.org/seq#>
PREFIX sia: <http://example.org/sia#>

CONSTRUCT { _:vte rdf:type sia:VectorTableElement;
			sia:fromDatapoint ?datapoint1;
			sia:toDatapoint ?datapoint2}
WHERE
{
 	?datapoint1 sia:memberOfOrderedSet ?bnode .
 	?datapoint2 sia:memberOfOrderedSet ?bnode .
	?bnode a sia:OrderedSet .
	?datapoint1 sia:orderedIndex ?i1 .
	?datapoint2 sia:orderedIndex ?i2
	FILTER ((?datapoint1 != ?datapoint2) && (?i1 < ?i2))
}
GROUP BY ?datapoint1 ?datapoint2