An RDF Schema to syntactically represent SPARQL queries (including SPARQL UPDATE) as RDF triples. SPIN SPARQL Syntax 1.3.0 Let A variable assignment (LET (?<varName> := <expression>)). Not part of the SPARQL 1.0 standard, but (for example) ARQ. Triple template A prototypical triple used as template in the head of a Construct query. May contain variables. Mod path A modified path such as rdfs:subClassOf*. Base class of aggregation types (not part of the SPARQL 1.0 standard but supported by ARQ and other engines). Aggregation Triple path Similar to a TriplePattern, but with a path expression as its predicate. For example, this can be used to express transitive sub-class relationships (?subClass rdfs:subClassOf* ?superClass). A UNION group. Union Tuple Abstract base class for things that have subject and object. A DESCRIBE-type Query. Describe A nested SELECT query inside of an element list. The query is stored in sp:query. Sub query An "artificial" root class that groups all SP classes. This makes them look much less overwhelming in UI tools. Typical end users don't need to see those classes anyway. SP System class Count Counts the number of times a variable is used. The variable is stored in the variable property. This might be left blank to indicate COUNT(*). Seq path A sequence of multiple paths. Element list A list of Elements. This class is never instantiated directly as SPIN will use plain rdf:Lists to store element lists. An abstract base class for all pattern elements. Element Filter A constraint element that evaluates a given expression to true or false. An optional element in a query. Optional An alternative path with the union of sp:path1 and sp:path2. Alt path Ask An ASK query that returns true if the condition in the body is met by at least one result set. Desc Marker to indicate descending order. Triple An abstract base class for TriplePattern and TripleTemplate. This basically specifies that subject, predicate and object must be present. Update Abstract base class to group the various SPARQL UPDATE commands. Triple pattern A triple pattern used in the body of a query. Select query A SELECT-type query that returns variable bindings as its result. Order by condition An abstract base class for ascending or descending order conditions. Instances of this class (typically bnodes) must have a value for expression to point to the actual values. A NOT EXISTS element group. Not exists Query Abstract base class of the various types of supported queries. Common to all types of queries is that they can have a body ("WHERE clause"). Abstract base class of group patterns. Element group A shared superclass for sp:Query and sp:Update that can be used to specify that the range of property can be either one. Command Path The base class of SPARQL property path expressions. Paths are used by sp:TriplePath triple paths. Construct A CONSTRUCT-type query that can be used to construct new triples from template triples (head) that use variable bindings from the match patterns (body). Asc Marker to indicate ascending order. Modify Represents a MODIFY (part of SPARQL UPDATE language). The graph IRIs are stored in sp:graphIRI. The template patterns are stored in sp:deletePattern and sp:insertPattern. The WHERE clause is represented using sp:where. Delete Represents a DELETE FROM (part of SPARQL UPDATE language). The graph IRIs are stored in sp:graphIRI. The template patterns to delete are stored in sp:deletePattern. The WHERE clause is represented using sp:where. Insert Represents a INSERT INTO (part of SPARQL UPDATE language). The graph IRIs are stored in sp:graphIRI. The template patterns to delete are stored in sp:insertPattern. The WHERE clause is represented using sp:where. Reverse path A path with reversed direction. Variable A variable mentioned in a Triple or expression. Variables are often blank nodes with the variable name stored in ts:name. Variables can also be supplied with a URI in which case the system will attempt to reuse the same variable instance across multiple query definitions. Named graph A named Graph element such as GRAPH <uri> {...}. Represents sum aggregations, e.g. SELECT SUM(?varName)... Sum Service A SERVICE call that matches a nested sub-pattern against a SPARQL end point specified by a URI. arg1 The first argument of a function call. service URI Used by sp:Service to specify the URI of the SPARQL end point to invoke. Must point to a URI node. Specifies an RDF Dataset used by a Query (FROM syntax in SPARQL). Values of this property must be URI resources. from varName The name of a Variable. arg4 The forth argument of a function call. reduced A property with true to indicate that a Select query has a REDUCED flag. Points to a Variable used in an AS statement such as COUNT aggregates. as arg3 The third argument of a function call. query Links a SubQuery resource with the nested Query. delete pattern Points to a list of sp:TripleTemplates in a MODIFY or DELETE FROM command. Can be attached to sp:Queries to store a textual representation of the query. This can be useful for tools that do not have a complete SPIN Syntax parser available. text A marker property to indicate that a Select query is of type SELECT DISTINCT. distinct arg5 The fifth argument of a function call. Further arguments are not common in SPARQL, therefore no sp:arg6, etc are defined here. However, they can be created if needed. An abstract base proprerty that groups together the SP system properties. Users typically don't need to see them anyway. SP system property path1 The first child path of a property path. Used by sp:AltPath and sp:SeqPath. insert pattern Points to a list of sp:TripleTemplates in a MODIFY or INSERT INTO command. result variables An rdf:List of variables that are returned by a Select query. sub path The child path of a property path expression. This is used by ReversePath and ModPath. arg Abstract superproperty for the enumerated arg1, arg2 etc. Points to a list of TripleTemplates that form the head of a Construct query. templates graph name node The name (URI or Variable) of a NamedGraph. Points from a TriplePath to its path. path graph IRI Points to zero or more graph names in sp:Update commands. mod max path2 The second child path of a property path. Used by sp:AltPath and sp:SeqPath. Links a query with an ORDER BY clause where the values are rdf:List containing OrderByConditions or expressions. While the domain of this property is sp:Query, only Describe and Select queries can have values of it. order by offset The OFFSET solution modifier of a Query. group by Points from a Query to the list of GROUP BY expressions. The variable of a Let element. variable from named Specifies a named RDF Dataset used by a Query (FROM NAMED syntax in SPARQL). Values of this property must be URI resources. subject A resource or Variable describing the subject of a triple. mod min predicate A resource or Variable describing the predicate of a triple. object An RDF Node or Variable describing the object of a triple. The LIMIT solution modifier of a Query. limit The WHERE clause of a Query. where elements Points to an ElementList, for example in an Optional element. expression Points to an expression, for example in a Filter or Assignment. arg2 The second argument of a function call. Contains the result nodes (URI resources or Variables) of a Describe query. result nodes