1.1.0 SPIN Inferencing Vocabulary An RDF Schema that can be used to attach constraints and rules to RDFS classes, and to encapsulate reusable SPARQL queries into functions and templates. Ask template A SPIN template that wraps an ASK query. The ASK query wrapped by this template. 1 1 A function type that can be used in SPARQL expressions (e.g. FILTER or LET). Functions are Modules that create a single variable binding. The output RDF graph is the (unchanged) input graph. Function 1 the body of the function 0 Update template A SPIN template that has an UPDATE command as its body. The UPDATE command wrapped by this template. 1 1 Rule property The metaclass of spin:rule and its subproperties. spin:RuleProperties can have additional metadata attached to them. An object that can be created by spin:constraints to provide information about a constraint violation. Constraint violation An "artificial" parent class for all Functions and Templates. Modules Select template A SPIN template that wraps a SELECT query. The SELECT query wrapped by this template. 1 1 Construct template The CONSTRUCT query wrapped by this template. 1 1 Library ontology A marker class that can be attached to base URIs (ontologies) to instruct SPIN engines that this ontology only contains a library of SPIN declarations. Library Ontologies should be ignored by SPIN inference engines even if they have been imported by a domain model. For example, a SPIN version of OWL RL may contain all the OWL RL axioms, attached to owl:Thing, but nothing else. However, when executed, these axioms should not be executed over themselves, because we don't want the system to reason about the SPIN triples to speed up things. Magic property The metaclass of SPIN templates. Instances of this class can represent reusable SPARQL queries that can be supplied with arguments. The output of a module depends on the type of its body query. If the body is a CONSTRUCT query, then the output will be the constructed RDF graph. If the body is an ASK query, then the output will be true or false. If the body is a SELECT query, then the output will be the variable bindings of the first result set row. Template 1 the body of the Template 0 An abstract building block of a SPARQL system. A Module can take Arguments as input and applies them on an input RDF Graph. The Arguments should be declared as spin:constraints. A Module can produce an RDF graph and/or new variable bindings as output. Module return type The return type of a Function, e.g. xsd:string. Can be used to link an RDF graph (usually the instance of owl:Ontology) with a SPIN library to define constraints. SPIN-aware tools should include the definitions from those libraries for constraint checking. Using such libraries is a simpler alternative than explicitly importing them using owl:imports, because it does not force all the SPIN triples into the RDF model. imports The symbol of a function, e.g. "=" for the eq function. symbol body The body of a Function or Template. This points to a Query instance. For Functions, this is limited to either ASK or SELECT type queries. If the body is the ASK function then the return value is xsd:boolean. Otherwise, the SELECT query must have a single return variable. The first binding of this SELECT query will be returned as result of the function call. The root resource of the violation (often ?this in the constraint body). violation root An "abstract" base property that groups together those system properties that the user will hardly ever need to see in property trees. This property may be dropped in future versions of this ontology - right now it's mainly here for convenience. system property next rule property Can be used to link two sub-properties of spin:rule (or spin:rule itself) to instruct the SPIN engine to execute one set of rules before another one. The values of the subject property will be executed before those of the object property. A template string for displaying instantiations of a module in human-readable form. The template may contain the argument variable names in curly braces to support substitution. For example, "The number of values of the {?arg1} property." label template constructor Can be used to attach a "constructor" to a class. A constructor is a SPARQL CONSTRUCT query that can add initial values to the current instance. At execution time, the variable ?this is bound to the current instance. Tools can call constructors of a class and its superclasses when an instance of a class has been created. Constructors will also be used to initialize resources that have received a new rdf:type triple as a result of spin:rules firing. An optional attribute of ConstraintViolations to provide a path expression from the root resource to the value that is invalid. If this is a URI then the path represents the predicate of a subject/predicate combination. Otherwise it should be a blank node of type sp:Path. violation path Can be set to true to indicate that this module shall not be instantiated. Abstract modules are only there to organize other modules into hierarchies. abstract constraint Links a class with constraints on its instances. The values of this property are "axioms" expressed as CONSTRUCT or ASK queries where the variable ?this refers to the instances of the surrounding class. ASK queries must evaluate to false for each member of this class - returning true means that the instance ?this violates the constraint. CONSTRUCT queries must create instances of spin:ConstraintViolation to provide details on the reason for the violation. Can be used to link a ConstraintViolation with one or more UPDATE Templates that would help fix the violation. fix query Can be used to point from any resource to a Query. this unbound Can be set to true for SPIN rules and constraints that do not require pre-binding the variable ?this with all members of the associated class. This flag should only be set to true if the WHERE clause is sufficiently strong to only bind instances of the associated class, or its subclasses. In those cases, the engine can greatly improve performance of query execution, because it does not need to add clauses to narrow down the WHERE clause. rule property max iteration count Can be attached to spin:rule (or subclasses thereof) to instruct a SPIN rules engine that it shall only execute the rules max times. If no value is specified, then the rules will be executed with no specific limit. arg4 true Templates true Suggested abstract base class for all Templates. Construct templates Suggested abstract base class for all ConstructTemplates. arg5 arg1 true Ask templates Suggested abstract base class for all AskTemplates. The first operand to compare. true Select templates Suggested abstract base class for all SelectTemplates. true An abstract base class for all defined functions. This class mainly serves as a shared root so that the various instances of the Function metaclass are grouped together. Functions true Magic properties An abstract superclass that can be used to group all spin:MagicProperty instances under a single parent class. arg2 this _this A system variable representing the current context instance in a rule or constraint. true Update templates Suggested abstract base class for all UpdateTemplates. rule An inferencing rule attached to a class. Rules are expressed as Construct queries where the variable ?this will be bound to the current instance of the class. These inferences can be used to derive new values from existing values at the instance. The (boolean) operand to negate. arg3