SPIN SPARQL Syntax
type: Ontology
version info: 1.5.0
comment: An RDF schema to syntactically represent SPARQL queries and update commands as RDF triples.

Path
type: Class
subclass of: SP System class
comment: The base class of SPARQL property path expressions. Paths are used by sp:TriplePath triple paths.

SP System class
type: Class
subclass of: Resource
comment: 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.

Asc
type: Class
subclass of: Order by condition
comment: Marker to indicate ascending order.

Order by condition
type: Class
subclass of: SP System class
comment: 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.

SUM
type: Class
subclass of: Aggregation
comment: Represents sum aggregations, e.g. SELECT SUM(?varName)...

Aggregation
type: Class
subclass of: SP System class
comment: Base class of aggregation types (not part of the SPARQL 1.0 standard but supported by ARQ and other engines).

Union
type: Class
subclass of: Element group
comment: A UNION group.

Element group
type: Class
subclass of: Element
comment: Abstract base class of group patterns.

Triple pattern
type: Class
subclass of: Triple
subclass of: Element
comment: A triple pattern used in the body of a query.

Triple
type: Class
subclass of: Tuple
comment: A base class for TriplePattern and TripleTemplate. This basically specifies that subject, predicate and object must be present.

Element
type: Class
subclass of: SP System class
comment: An abstract base class for all pattern elements.

GROUP_CONCAT
type: Class
subclass of: Aggregation
comment: Represents GROUP_CONCAT aggregations.

Load
type: Class
subclass of: Update
comment: A LOAD Update operation. The document to load is specified using sp:document, and the (optional) target graph using sp:into.

Update
type: Class
subclass of: Command
comment: Abstract base class to group the various SPARQL UPDATE commands.

Delete data
type: Class
subclass of: Update
comment: 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.

Desc
type: Class
subclass of: Order by condition
comment: Marker to indicate descending order.

Triple template
type: Class
subclass of: Triple
comment: A prototypical triple used as template in the head of a Construct query. May contain variables.

MAX
type: Class
subclass of: Aggregation
comment: Represents MAX aggregations.

AVG
type: Class
subclass of: Aggregation
comment: Represents AVG aggregations.

Modify
type: Class
subclass of: Update
comment: 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.

Triple path
type: Class
subclass of: Tuple
subclass of: Element
comment: 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).

Tuple
type: Class
subclass of: SP System class
comment: Abstract base class for things that have subject and object.

Element list
type: Class
subclass of: List
subclass of: Element group
comment: A list of Elements. This class is never instantiated directly as SPIN will use plain rdf:Lists to store element lists.

Sub query
type: Class
subclass of: Element
comment: A nested SELECT query inside of an element list. The query is stored in sp:query.

MIN
type: Class
subclass of: Aggregation
comment: Represents MIN aggregations.

Bind
type: Class
subclass of: Element
comment: A BIND element.

Optional
type: Class
subclass of: Element group
comment: An optional element in a query.

Alt path
type: Class
subclass of: Path
comment: An alternative path with the union of sp:path1 and sp:path2.

COUNT
type: Class
subclass of: Aggregation
comment: 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(*).

Reverse path
type: Class
subclass of: Path
comment: A path with reversed direction.

Construct
type: Class
subclass of: Query
comment: 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).

Query
type: Class
subclass of: Command
comment: 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").

Variable
type: Class
subclass of: SP System class
comment: 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.

Ask
type: Class
subclass of: Query
comment: An ASK query that returns true if the condition in the body is met by at least one result set.

Mod path
type: Class
subclass of: Path
comment: A modified path such as rdfs:subClassOf*.

Create
type: Class
subclass of: Update
comment: An Update operation that creates a new empty graph with a name specified by sp:graphIRI. May have sp:silent set to true.

Named graph
type: Class
subclass of: Element group
comment: A named Graph element such as GRAPH <uri> {...}.

Command
type: Class
subclass of: SP System class
comment: A shared superclass for sp:Query and sp:Update that can be used to specify that the range of property can be either one.

Reverse link path
type: Class
subclass of: Path

Values
type: Class
subclass of: Element
comment: 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.

Not exists
type: Class
subclass of: Element group
comment: A NOT EXISTS element group.

Drop
type: Class
subclass of: Update
comment: 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.

Delete where
type: Class
subclass of: Update
comment: An Update operation where the triples matched by the WHERE clause (sp:where) will be the triples deleted.

Insert data
type: Class
subclass of: Update
comment: 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.

Service
type: Class
subclass of: Element group
comment: A SERVICE call that matches a nested sub-pattern against a SPARQL end point specified by a URI.

Select query
type: Class
subclass of: Query
comment: A SELECT-type query that returns variable bindings as its result.

Exists
type: Class
subclass of: Element group
comment: An EXISTS element group.

Filter
type: Class
subclass of: Element
comment: A constraint element that evaluates a given expression to true or false.

Minus
type: Class
subclass of: Element group
comment: A MINUS element group.

Clear
type: Class
subclass of: Update
comment: 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.

Describe
type: Class
subclass of: Query
comment: A DESCRIBE-type Query.

Seq path
type: Class
subclass of: Path
comment: A sequence of multiple paths.

SAMPLE
type: Class
subclass of: Aggregation
comment: Represents SAMPLE aggregations

arg5
type: Property
sub property of: arg
comment: 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.

arg
type: Property
comment: Abstract superproperty for the enumerated arg1, arg2 etc.

path1
type: Property
sub property of: SP system property
range: Path
comment: The first child path of a property path. Used by sp:AltPath and sp:SeqPath.

SP system property
type: Property
comment: An abstract base proprerty that groups together the SP system properties. Users typically don't need to see them anyway.

arg1
type: Property
sub property of: arg
comment: The first argument of a function call.

default
type: Property
sub property of: SP system property
range: boolean
comment: Used in DROP and CLEAR.

values
type: Property
sub property of: SP system property
range: Values
domain: Query
comment: 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.

object
type: Property
sub property of: SP system property
domain: Tuple
comment: An RDF Node or Variable describing the object of a triple.

graph name node
type: Property
sub property of: SP system property
range: Resource
domain: Named graph
comment: The name (URI or Variable) of a NamedGraph.

varName
type: Property
sub property of: SP system property
range: string
domain: Variable
comment: The name of a Variable.

named
type: Property
sub property of: SP system property
range: boolean
comment: Used in DROP and CLEAR.

as
type: Property
sub property of: SP system property
range: Variable
comment: Points to a Variable used in an AS statement such as COUNT aggregates.

distinct
type: Property
sub property of: SP system property
range: boolean
domain: Select query
comment: A marker property to indicate that a Select query is of type SELECT DISTINCT.

path2
type: Property
sub property of: SP system property
range: Path
comment: The second child path of a property path. Used by sp:AltPath and sp:SeqPath.

order by
type: Property
sub property of: SP system property
range: List
domain: Query
comment: 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.

variable
type: Property
sub property of: SP system property
range: Variable
domain: Bind
comment: The variable of a Bind element.

arg4
type: Property
sub property of: arg
comment: The forth argument of a function call.

silent
type: Property
sub property of: SP system property
range: boolean

having
type: Property
sub property of: SP system property
range: List
domain: Select query
comment: Points from a SELECT query to a list of HAVING expressions.

query
type: Property
sub property of: SP system property
range: Query
domain: Sub query
comment: Links a SubQuery resource with the nested Query.

group by
type: Property
sub property of: SP system property
range: List
domain: Select query
comment: Points from a Query to the list of GROUP BY expressions.

graph IRI
type: Property
sub property of: SP system property
range: Resource
comment: Points to graph names (IRIs) in various sp:Update operations.

limit
type: Property
sub property of: SP system property
range: long
domain: Query
comment: The LIMIT solution modifier of a Query.

using
type: Property
sub property of: SP system property
range: Resource
domain: Modify

templates
type: Property
sub property of: SP system property
range: List
domain: Construct
comment: Points to a list of TripleTemplates that form the head of a Construct query.

result nodes
type: Property
sub property of: SP system property
range: List
domain: Describe
comment: Contains the result nodes (URI resources or Variables) of a Describe query.

using named
type: Property
sub property of: SP system property
range: Resource
domain: Modify

arg3
type: Property
sub property of: arg
comment: The third argument of a function call.

reduced
type: Property
sub property of: SP system property
range: boolean
domain: Select query
comment: A property with true to indicate that a Select query has a REDUCED flag.

sub path
type: Property
sub property of: SP system property
comment: The child path of a property path expression. This is used by ReversePath and ModPath.

into
type: Property
sub property of: SP system property
range: Resource
domain: Load
comment: The (optional) target of a LOAD Update operation.

with
type: Property
sub property of: SP system property
range: Resource
domain: Modify

service URI
type: Property
sub property of: SP system property
range: Resource
domain: Service
comment: Used by sp:Service to specify the URI of the SPARQL end point to invoke. Must point to a URI node.

where
type: Property
sub property of: SP system property
range: Element list
comment: The WHERE clause of a Query.

document
type: Property
sub property of: SP system property
range: Resource
domain: Load
comment: The URI of the document to load using a LOAD Update operation.

result variables
type: Property
sub property of: SP system property
range: List
domain: Select query
comment: An rdf:List of variables that are returned by a Select query.

separator
type: Property
sub property of: SP system property
range: string
domain: GROUP_CONCAT
comment: Stores the separator="..." value of a GROUP_CONCAT (sp:GroupConcat) aggregation.

text
type: Property
sub property of: SP system property
range: string
comment: 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.

path
type: Property
sub property of: SP system property
range: Path
domain: Triple path
comment: Points from a TriplePath to its path.

mod max
type: Property
sub property of: SP system property
range: integer
domain: Mod path

bindings
type: Property
sub property of: SP system property
range: List
domain: Values
comment: The actual bindings of a sp:Values element.

elements
type: Property
sub property of: SP system property
range: Element list
comment: Points to an ElementList, for example in an Optional element.

predicate
type: Property
sub property of: SP system property
range: Resource
domain: Triple
comment: A resource or Variable describing the predicate of a triple.

node
type: Property
sub property of: SP system property
domain: Reverse link path

from named
type: Property
sub property of: SP system property
range: Resource
domain: Query
comment: Specifies a named RDF Dataset used by a Query (FROM NAMED syntax in SPARQL). Values of this property must be URI resources.

arg2
type: Property
sub property of: arg
comment: The second argument of a function call.

subject
type: Property
sub property of: SP system property
range: Resource
domain: Tuple
comment: A resource or Variable describing the subject of a triple.

delete pattern
type: Property
sub property of: SP system property
range: List
domain: Update
comment: Points to a list of sp:TripleTemplates and sp:NamedGraphs in a modify operation.

expression
type: Property
sub property of: SP system property
comment: Points to an expression, for example in a Filter or Assignment.

all
type: Property
sub property of: SP system property
range: boolean
comment: Used in DROP and CLEAR.

from
type: Property
sub property of: SP system property
range: Resource
domain: Query
comment: Specifies an RDF Dataset used by a Query (FROM syntax in SPARQL). Values of this property must be URI resources.

offset
type: Property
sub property of: SP system property
range: long
domain: Query
comment: The OFFSET solution modifier of a Query.

var names
type: Property
sub property of: SP system property
range: List
domain: Values
comment: The names of the variables (xsd:strings) of the variables declared for a VALUES element.

mod min
type: Property
sub property of: SP system property
range: integer
domain: Mod path

insert pattern
type: Property
sub property of: SP system property
range: List
domain: Modify
comment: Points to a list of sp:TripleTemplates or sp:NamedGraphs in a modify command.

Delete
type: DeprecatedClass
subclass of: Modify
comment: 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.
type: Class

Insert
type: DeprecatedClass
subclass of: Modify
comment: 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.
type: Class

Let
type: DeprecatedClass
subclass of: Bind
comment: Deprecated: use sp:Bind instead. A variable assignment (LET (?<varName> := <expression>)). Not part of the SPARQL 1.0 standard, but (for example) ARQ.
type: Class