-- Data Loading via SPASQL using "soft" pragma which invokes in-built cache-invalidation. SPARQL define get:soft "soft" select * from where {?s ?p ?o.}; SPARQL define get:soft "soft" select * from where {?s ?p ?o.}; SPARQL define get:soft "soft" select * from where {?s ?p ?o.}; -- Test Rule Basis Latitude Relation SPARQL CONSTRUCT { ?this <#hasLatitude> ?n. } { GRAPH { ?this ?p ?n. FILTER (contains(str(?p),'latitude') || contains(str(?p),'Latitude') )} } ; -- Test Rule Basis Longitude Relation SPARQL CONSTRUCT { ?this <#hasLongitude> ?n. } { GRAPH { ?this ?p ?n. FILTER (contains(str(?p),'longitude') || contains(str(?p),'Longitude') )} } ; -- Custom Relationship Type SPARQL DROP SPIN LIBRARY ; SPARQL CREATE SPIN LIBRARY { CLASS { comment """Class instance generated from a Macro that defines Spatial Things, Longitude, and Latitude""" defmacro <#hasLatitude> { ?this <#hasLatitude> ?n. } { FILTER (contains(str(?p),'latitude') || contains(str(?p),'Latitude') ) . ?this ?p ?n . } defmacro <#hasLongitude> { ?this <#hasLongitude> ?n. } { FILTER (contains(str(?p),'longitude') || contains(str(?p),'Longitude') ) . ?this ?p ?n . } } } ASK FROM virtrdf: WHERE { ?s ?o}; -- Data Set #1 SPARQL DEFINE input:macro-lib SELECT ?x ?y ?z FROM WHERE { ?x a sioc:Item . ?x <#hasLatitude> ?y. ?x <#hasLongitude> ?z. } ; -- Data Set #2 SPARQL DEFINE input:macro-lib SELECT ?y ?z FROM FROM FROM WHERE { ?x a sioc:Item . ?x <#hasLatitude> ?y . ?x <#hasLongitude> ?z . }