1.5.1 SPIN SPARQL Syntax An RDF schema to syntactically represent SPARQL queries and update commands as RDF triples. GROUP_CONCAT Represents GROUP_CONCAT aggregations. Command A shared superclass for sp:Query and sp:Update that can be used to specify that the range of property can be either one. Drop An Update operation that removes a specified graph from the Graph Store. Must specify the graph using sp:graphIRI, or sp:default, sp:named or sp:all. May have the SILENT flag, encoded using sp:silent. Ask An ASK query that returns true if the condition in the body is met by at least one result set. 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. Values A VALUES element. sp:varNames points to an rdf:List of strings for the variables, sp:values to an rdf:List of rdf:Lists with nodes for each variable, in the order defined by the variables list. Asc Marker to indicate ascending order. 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(*). Bind A BIND element. 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. Seq path A sequence of multiple paths. SUM Represents sum aggregations, e.g. SELECT SUM(?varName)... Minus A MINUS element group. Load A LOAD Update operation. The document to load is specified using sp:document, and the (optional) target graph using sp:into. MAX Represents MAX aggregations. Element An abstract base class for all pattern elements. Update Abstract base class to group the various SPARQL UPDATE commands. Desc Marker to indicate descending order. 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). Create An Update operation that creates a new empty graph with a name specified by sp:graphIRI. May have sp:silent set to true. Triple A base class for TriplePattern and TripleTemplate. This basically specifies that subject, predicate and object must be present. Exists An EXISTS element group. Reverse path A path with reversed direction. Service A SERVICE call that matches a nested sub-pattern against a SPARQL end point specified by a URI. 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. 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"). Sub query A nested SELECT query inside of an element list. The query is stored in sp:query. SAMPLE Represents SAMPLE aggregations Add A SPARQL UPDATE ADD operation. Uses sp:source and sp:target to represent "from" and "to" graphs, respectively. Also sp:silent may be true. Select query A SELECT-type query that returns variable bindings as its result. Reverse link path AVG Represents AVG aggregations. MIN Represents MIN aggregations. Triple pattern A triple pattern used in the body of a query. Element group Abstract base class of group patterns. Alt path An alternative path with the union of sp:path1 and sp:path2. Delete data An Update operation to delete specific triples. The graph triples are represented using sp:data, which points to an rdf:List of sp:Triples or sp:NamedGraphs. Optional An optional element in a query. Mod path A modified path such as rdfs:subClassOf*. Filter A constraint element that evaluates a given expression to true or false. Tuple Abstract base class for things that have subject and object. Delete where An Update operation where the triples matched by the WHERE clause (sp:where) will be the triples deleted. Aggregation Base class of aggregation types (not part of the SPARQL 1.0 standard but supported by ARQ and other engines). Insert data An Update operation to insert specific triples. The graph triples are represented using sp:data, which points to an rdf:List of sp:Triples or sp:NamedGraphs. Union A UNION group. Triple template A prototypical triple used as template in the head of a Construct query. May contain variables. 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). Element list A list of Elements. This class is never instantiated directly as SPIN will use plain rdf:Lists to store element lists. Not exists A NOT EXISTS element group. Describe A DESCRIBE-type Query. Clear An Update operation that removes all triples from a specified graph. Must specify the graph using sp:graphIRI, or sp:default, sp:named or sp:all. May have the SILENT flag, encoded using sp:silent. SP System class 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. Named graph A named Graph element such as GRAPH <uri> {...}. text 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. order by 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. silent mod min elements Points to an ElementList, for example in an Optional element. subject A resource or Variable describing the subject of a triple. insert pattern Points to a list of sp:TripleTemplates or sp:NamedGraphs in a modify command. path1 The first child path of a property path. Used by sp:AltPath and sp:SeqPath. arg3 The third argument of a function call. object An RDF Node or Variable describing the object of a triple. templates Points to a list of TripleTemplates that form the head of a Construct query. node variable The variable of a Bind element. group by Points from a Query to the list of GROUP BY expressions. from Specifies an RDF Dataset used by a Query (FROM syntax in SPARQL). Values of this property must be URI resources. result variables An rdf:List of variables that are returned by a Select query. named Used in DROP and CLEAR. path2 The second child path of a property path. Used by sp:AltPath and sp:SeqPath. arg2 The second argument of a function call. separator Stores the separator="..." value of a GROUP_CONCAT (sp:GroupConcat) aggregation. using mod max query Links a SubQuery resource with the nested Query. graph IRI Points to graph names (IRIs) in various sp:Update operations. document The URI of the document to load using a LOAD Update operation. delete pattern Points to a list of sp:TripleTemplates and sp:NamedGraphs in a modify operation. path Points from a TriplePath to its path. target where The WHERE clause of a Query. expression Points to an expression, for example in a Filter or Assignment. using named source all Used in DROP and CLEAR. values The VALUES block at the end of a query. The object may just be an untyped blank node, i.e. the sp:Values type triple is optional. 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. default Used in DROP and CLEAR. from named Specifies a named RDF Dataset used by a Query (FROM NAMED syntax in SPARQL). Values of this property must be URI resources. arg1 The first argument of a function call. SP system property An abstract base proprerty that groups together the SP system properties. Users typically don't need to see them anyway. distinct A marker property to indicate that a Select query is of type SELECT DISTINCT. into The (optional) target of a LOAD Update operation. having Points from a SELECT query to a list of HAVING expressions. varName The name of a Variable. as Points to a Variable used in an AS statement such as COUNT aggregates. graph name node The name (URI or Variable) of a NamedGraph. arg Abstract superproperty for the enumerated arg1, arg2 etc. sub path The child path of a property path expression. This is used by ReversePath and ModPath. offset The OFFSET solution modifier of a Query. var names The names of the variables (xsd:strings) of the variables declared for a VALUES element. bindings The actual bindings of a sp:Values element. arg4 The forth 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. predicate A resource or Variable describing the predicate of a triple. result nodes Contains the result nodes (URI resources or Variables) of a Describe query. with reduced A property with true to indicate that a Select query has a REDUCED flag. limit The LIMIT solution modifier of a Query. Let Deprecated: use sp:Bind instead. A variable assignment (LET (?<varName> := <expression>)). Not part of the SPARQL 1.0 standard, but (for example) ARQ. Insert Deprecated - use sp:Modify instead. 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. Delete Deprecated - use sp:Modify instead. 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.