@prefix arg:  <http://spinrdf.org/arg#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sp:   <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl:  <http://spinrdf.org/spl#> .
@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .

spin:ask  rdf:type       spin:Function ;
        rdfs:comment     "Executes a given ASK query and returns its boolean result. The first argument must point to an sp:Ask or a SPIN template call that has an ASK query as its body. All subsequent argument can come in pairs, with the first one being a variable name and the second its binding.\n\nExample:\n\n    BIND (spin:ask(?query, \"this\", owl:Thing) AS ?result) .\n\nwill execute the sp:Ask behind ?query with the variable ?this pre-bound to owl:Thing." ;
        rdfs:label       "ask" ;
        rdfs:subClassOf  spin:Functions .

spin:violationValue  rdf:type  rdf:Property ;
        rdfs:comment        "An optional attribute of ConstraintViolations to point at a specific RDF node that caused the violation. Should be accessible from the root via the violationPath." ;
        rdfs:domain         spin:ConstraintViolation ;
        rdfs:label          "violation value" ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:cachableForOntologies
        rdf:type            rdf:Property ;
        rdfs:comment        "Can be set to true to instruct the SPIN engine that the outcome of the function does not depend on any instances/indivuduals in the current query graph, but only on the definitions of classes, properties and shapes. Engines may cache the results of all calls to the associated function. Functions should only be marked as cachable if the same combination of input arguments always returns the same result." ;
        rdfs:domain         spin:Function ;
        rdfs:label          "cachable for ontologies" ;
        rdfs:range          xsd:boolean ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:symbol  rdf:type       rdf:Property ;
        rdfs:comment        "The symbol of a function, e.g. \"=\" for the eq function." ;
        rdfs:domain         spin:Function ;
        rdfs:label          "symbol" ;
        rdfs:range          xsd:string ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:returnType  rdf:type   rdf:Property ;
        rdfs:comment        "The return type of a Function, e.g. xsd:string." ;
        rdfs:domain         spin:Function ;
        rdfs:label          "return type" ;
        rdfs:range          rdfs:Class ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:UpdateTemplate  rdf:type  rdfs:Class ;
        rdfs:comment     "A SPIN template that has an UPDATE command as its body." ;
        rdfs:label       "Update template" ;
        rdfs:subClassOf  spin:Template ;
        spin:constraint  [ rdf:type       spl:Attribute ;
                           rdfs:comment   "The UPDATE command wrapped by this template." ;
                           spl:maxCount   1 ;
                           spl:minCount   0 ;
                           spl:predicate  spin:body ;
                           spl:valueType  sp:Update
                         ] .

spin:MagicProperty  rdf:type  rdfs:Class ;
        rdfs:label       "Magic property" ;
        rdfs:subClassOf  rdf:Property , spin:Function .

spin:imports  rdf:type      owl:OntologyProperty ;
        rdfs:comment        "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." ;
        rdfs:domain         owl:Ontology ;
        rdfs:label          "imports" ;
        rdfs:range          owl:Ontology ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:violationSource  rdf:type  rdf:Property ;
        rdfs:comment        "Can be used to link a spin:ConstraintViolation with the query or template call that caused it. This property is typically filled in automatically by the constraint checking engine and does not need to be set manually. However, it can be useful to learn more about the origin of a violation." ;
        rdfs:domain         spin:ConstraintViolation ;
        rdfs:label          "violation source" ;
        rdfs:range          rdfs:Resource ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:fix  rdf:type          rdf:Property ;
        rdfs:comment        "Can be used to link a ConstraintViolation with one or more UPDATE Templates that would help fix the violation." ;
        rdfs:domain         spin:ConstraintViolation ;
        rdfs:label          "fix" ;
        rdfs:range          spin:UpdateTemplate ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:systemProperty  rdf:type  rdf:Property ;
        rdfs:comment  "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." ;
        rdfs:label    "system property" .

spin:command  rdf:type  rdf:Property ;
        rdfs:comment  "Can be used to link a resource with a SPARQL query or update request (sp:Command)." ;
        rdfs:label    "command" ;
        rdfs:range    sp:Command .

sp:Modify  rdfs:subClassOf  spin:Rule .

spin:Info  rdf:type   spin:ConstraintViolationLevel ;
        rdfs:comment  "Indicates that the associated constraint violation is a not a problem. This level can be used for diagnostic and debugging purposes." ;
        rdfs:label    "Info" .

spin:constructViolations
        rdf:type         spin:MagicProperty ;
        rdfs:comment     "Takes an instance (?arg1) and a class definition (?arg2) and returns all constraint violations for that instance as triples. This magic property basically runs its own constraint checker for defining meta-constraints, and can also be used to classify instances.\n\nExample:\n\n    CONSTRUCT {\n        ?s ?p ?o .\n    }\n    WHERE {\n        (my:Person my:OldPerson) spin:constructViolations (?s ?p ?o) .\n    }" ;
        rdfs:label       "construct violations" ;
        rdfs:subClassOf  spin:MagicProperties ;
        spin:constraint  [ rdf:type       spl:Argument ;
                           rdfs:comment   "The class that this type is validated against." ;
                           spl:predicate  sp:arg2 ;
                           spl:valueType  rdfs:Class
                         ] ;
        spin:constraint  [ rdf:type       spl:Argument ;
                           rdfs:comment   "The instance to check." ;
                           spl:predicate  sp:arg1 ;
                           spl:valueType  rdfs:Resource
                         ] .

spin:_arg4  rdf:type  sp:Variable ;
        sp:varName  "arg4" .

spin:Rule  rdf:type      rdfs:Class ;
        rdfs:comment     "Groups together the kinds of SPARQL commands that can appear as SPIN rules and constructors: CONSTRUCT, DELETE WHERE and DELETE/INSERT. This class is never to be instantiated directly." ;
        rdfs:label       "Rule" ;
        rdfs:subClassOf  sp:Command .

spin:violatesConstraints
        rdf:type         spin:Function ;
        rdfs:comment     "Checks whether a given instance (?arg1) violates any of the constraints defined for a given class (?arg2)." ;
        rdfs:label       "violates constraints" ;
        rdfs:subClassOf  spin:Functions ;
        spin:returnType  xsd:boolean .

spin:violationLevel  rdf:type  rdf:Property ;
        rdfs:comment        "An optional attribute of ConstraintViolations to point at a violation level (such as Error and Warning). Defaults to spin:Error." ;
        rdfs:domain         spin:ConstraintViolation ;
        rdfs:label          "violation level" ;
        rdfs:range          spin:ConstraintViolationLevel ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:ConstructTemplate
        rdf:type         rdfs:Class ;
        rdfs:label       "Construct template" ;
        rdfs:subClassOf  spin:Template ;
        spin:constraint  [ rdf:type       spl:Attribute ;
                           rdfs:comment   "The CONSTRUCT query wrapped by this template." ;
                           spl:maxCount   1 ;
                           spl:minCount   0 ;
                           spl:predicate  spin:body ;
                           spl:valueType  sp:Construct
                         ] .

spin:columnIndex  rdf:type  rdf:Property ;
        rdfs:comment        "The index of a column (from left to right) starting at 0." ;
        rdfs:domain         spin:Column ;
        rdfs:label          "column index" ;
        rdfs:range          xsd:integer ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:private  rdf:type      rdf:Property ;
        rdfs:comment        "Can be set to true to indicate that a SPIN function or template is only meant to be used as a helper of other modules, but not directly. Among others, this allows user interfaces to filter out private modules. Furthermore, it tells potential users of this module that they should avoid using this module, as it may not be stable." ;
        rdfs:domain         spin:Module ;
        rdfs:label          "private" ;
        rdfs:range          xsd:boolean ;
        rdfs:subPropertyOf  spin:systemProperty .

sp:Construct  rdfs:subClassOf  spin:Rule .

spin:construct  rdf:type  spin:MagicProperty ;
        rdfs:comment     "Evaluates a given sp:Construct or SPIN template call (first argument on the left hand side) and binds the resulting triples to the variables on the right hand side.\n\nExample:\n\n    (?query \"this\" owl:Thing) spin:construct (?s ?p ?o)\n\nwill execute the sp:Construct ?query using the binding of owl:Thing to ?this. The resulting triples will be bound to ?s, ?p and ?o. If any of ?s ?p ?o are bound, it will only return the matching triples." ;
        rdfs:label       "construct" ;
        rdfs:subClassOf  spin:MagicProperties .

spin:violationPath  rdf:type  rdf:Property ;
        rdfs:comment        "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." ;
        rdfs:domain         spin:ConstraintViolation ;
        rdfs:label          "violation path" ;
        rdfs:range          rdfs:Resource ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:_arg3  rdf:type  sp:Variable ;
        sp:varName  "arg3" .

spin:Functions  rdf:type  spin:Function ;
        rdfs:comment     "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." ;
        rdfs:label       "Functions" ;
        rdfs:subClassOf  spin:Modules ;
        spin:abstract    true .

spin:rulePropertyMaxIterationCount
        rdf:type            rdf:Property ;
        rdfs:comment        "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." ;
        rdfs:domain         spin:RuleProperty ;
        rdfs:label          "rule property max iteration count" ;
        rdfs:range          xsd:integer ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:SelectTemplates  rdf:type  spin:SelectTemplate ;
        rdfs:comment     "Suggested abstract base class for all SelectTemplates." ;
        rdfs:label       "Select templates" ;
        rdfs:subClassOf  spin:Templates ;
        spin:abstract    true .

spin:ConstraintViolationLevel
        rdf:type         rdfs:Class ;
        rdfs:comment     "The type of the supported levels of constraint violations, including spin:Error and spin:Warning." ;
        rdfs:label       "Constraint violation level" ;
        rdfs:subClassOf  rdfs:Resource .

spin:Column  rdf:type    rdfs:Class ;
        rdfs:comment     "Provides metadata about a column in the result set of a (SPARQL) query, for example of the body queries of SPIN templates. Columns can define human-readable labels that serve as column titles, using rdfs:label." ;
        rdfs:label       "Column" ;
        rdfs:subClassOf  rdfs:Resource .

spin:Modules  rdf:type    rdfs:Class ;
        rdfs:comment      "An \"artificial\" parent class for all Functions and Templates." ;
        rdfs:label        "Modules" ;
        rdfs:subClassOf   rdfs:Resource ;
        spin:constructor  [ rdf:type  spl:ConstructDefaultValues ] .

spin:_arg2  rdf:type  sp:Variable ;
        sp:varName  "arg2" .

spin:violationDetail  rdf:type  rdf:Property ;
        rdfs:comment        "Links a (parent) spin:ConstraintViolation with one or more (child) spin:ConstraintViolations that provide details on the parent violation. This is commonly used in conjunction with spin:constructViolations to indicate that certain violations have triggered the parent violation." ;
        rdfs:domain         spin:ConstraintViolation ;
        rdfs:label          "violation detail" ;
        rdfs:range          spin:ConstraintViolation ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:UpdateTemplates  rdf:type  spin:UpdateTemplate ;
        rdfs:comment     "Suggested abstract base class for all UpdateTemplates." ;
        rdfs:label       "Update templates" ;
        rdfs:subClassOf  spin:Templates ;
        spin:abstract    true .

spin:evalInGraph  rdf:type  spin:Function ;
        rdfs:comment     "Evaluates a given SPIN expression or SELECT or ASK query, and returns its result. The first argument must be the expression in SPIN RDF syntax. This RDF representation of this expression is expected to be in the currently active query graph. The second argument is the URI of a graph that the actual query shall be evaluated against. All other arguments must come in pairs: first a property name, and then a value. These name/value pairs will be pre-bound variables for the execution of the expression." ;
        rdfs:label       "eval in graph" ;
        rdfs:subClassOf  spin:Functions .

spin:RuleProperty  rdf:type  rdfs:Class ;
        rdfs:comment     "The metaclass of spin:rule and its subproperties. spin:RuleProperties can have additional metadata attached to them." ;
        rdfs:label       "Rule property" ;
        rdfs:subClassOf  rdf:Property .

spin:nextRuleProperty
        rdf:type            rdf:Property ;
        rdfs:comment        "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." ;
        rdfs:domain         spin:RuleProperty ;
        rdfs:label          "next rule property" ;
        rdfs:range          spin:RuleProperty ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:Templates  rdf:type  spin:Template ;
        rdfs:comment     "Suggested abstract base class for all Templates." ;
        rdfs:label       "Templates" ;
        rdfs:subClassOf  spin:Modules ;
        spin:abstract    true .

spin:SelectTemplate  rdf:type  rdfs:Class ;
        rdfs:comment     "A SPIN template that wraps a SELECT query." ;
        rdfs:label       "Select template" ;
        rdfs:subClassOf  spin:Template , spin:TableDataProvider ;
        spin:constraint  [ rdf:type       spl:Attribute ;
                           rdfs:comment   "The SELECT query wrapped by this template." ;
                           spl:maxCount   1 ;
                           spl:minCount   0 ;
                           spl:predicate  spin:body ;
                           spl:valueType  sp:Select
                         ] .

spin:thisUnbound  rdf:type  rdf:Property ;
        rdfs:comment        "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." ;
        rdfs:domain         sp:Construct ;
        rdfs:label          "this unbound" ;
        rdfs:range          xsd:boolean ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:AskTemplates  rdf:type  spin:AskTemplate ;
        rdfs:comment     "Suggested abstract base class for all AskTemplates." ;
        rdfs:label       "Ask templates" ;
        rdfs:subClassOf  spin:Templates ;
        spin:abstract    true .

spin:_this  rdf:type  sp:Variable ;
        rdfs:comment  "A system variable representing the current context instance in a rule or constraint." ;
        rdfs:label    "_this" ;
        sp:varName    "this" .

spin:_arg1  rdf:type  sp:Variable ;
        sp:varName  "arg1" .

sp:DeleteWhere  rdfs:subClassOf  spin:Rule .

<http://spinrdf.org/spin>
        rdf:type         owl:Ontology ;
        rdfs:comment     "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." ;
        rdfs:label       "SPIN Modeling Vocabulary" ;
        owl:imports      <http://spinrdf.org/sp> ;
        owl:versionInfo  "1.4" .

spin:body  rdf:type         rdf:Property ;
        rdfs:comment        "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." ;
        rdfs:label          "body" ;
        rdfs:range          sp:Command ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:query  rdf:type        rdf:Property ;
        rdfs:comment        "Can be used to point from any resource to a Query." ;
        rdfs:label          "query" ;
        rdfs:range          sp:Query ;
        rdfs:subPropertyOf  spin:command .

spin:ConstraintViolation
        rdf:type         rdfs:Class ;
        rdfs:comment     "An object that can be created by spin:constraints to provide information about a constraint violation." ;
        rdfs:label       "Constraint violation" ;
        rdfs:subClassOf  rdfs:Resource .

spin:column  rdf:type       rdf:Property ;
        rdfs:comment        "Can link a TableDataProvider (esp. SelectTemplate) with one or more columns that provide metadata for rendering purposes. Columns can be sorted by their spin:columnIndex (which must align with the ordering of variables in the SELECT query starting with 0). Not all result variables of the underlying query need to have a matching spin:Column." ;
        rdfs:domain         spin:TableDataProvider ;
        rdfs:label          "column" ;
        rdfs:range          spin:Column ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:Template  rdf:type  rdfs:Class ;
        rdfs:comment     "The metaclass of SPIN templates. Templates are classes that are instances of this class. A template represents a reusable SPARQL query or update request that can be parameterized with arguments. Templates can be instantiated in places where normally a SPARQL query or update request is used, in particular as spin:rules and spin:constraints." ;
        rdfs:label       "Template" ;
        rdfs:subClassOf  spin:Module ;
        spin:constraint  [ rdf:type       spl:Attribute ;
                           rdfs:comment   "the body of the Template" ;
                           spl:maxCount   1 ;
                           spl:minCount   0 ;
                           spl:predicate  spin:body
                         ] .

spin:violationRoot  rdf:type  rdf:Property ;
        rdfs:comment        "The root resource of the violation (often ?this in the constraint body)." ;
        rdfs:domain         spin:ConstraintViolation ;
        rdfs:label          "violation root" ;
        rdfs:range          rdfs:Resource ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:LibraryOntology  rdf:type  rdfs:Class ;
        rdfs:comment     "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." ;
        rdfs:label       "Library ontology" ;
        rdfs:subClassOf  owl:Ontology .

spin:MagicProperties  rdf:type  spin:MagicProperty ;
        rdfs:comment        "An abstract superclass that can be used to group all spin:MagicProperty instances under a single parent class." ;
        rdfs:label          "Magic properties" ;
        rdfs:subClassOf     spin:Functions ;
        rdfs:subPropertyOf  spin:systemProperty ;
        spin:abstract       true .

spin:ConstructTemplates
        rdf:type         spin:ConstructTemplate ;
        rdfs:comment     "Suggested abstract base class for all ConstructTemplates." ;
        rdfs:label       "Construct templates" ;
        rdfs:subClassOf  spin:Templates ;
        spin:abstract    true .

spin:Warning  rdf:type  spin:ConstraintViolationLevel ;
        rdfs:comment  "Indicates that the associated constraint violation is a problem that may not have to be fixed but may lead to issues in the future." ;
        rdfs:label    "Warning" .

spin:inverseBody  rdf:type  rdf:Property ;
        rdfs:comment        "The inverse body of a magic property - used to provide a more optimized query if there is one result variable (on the right). The values must be instances of Select and must return SELECT ?arg1 etc. The WHERE clause can access the variable ?object to refer to the provided value on the right hand side of the magic property." ;
        rdfs:domain         spin:MagicProperty ;
        rdfs:label          "inverse body" ;
        rdfs:range          sp:Select ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:rule  rdf:type         spin:RuleProperty ;
        rdfs:comment        "An inferencing rule attached to a class. Rules are expressed as CONSTRUCT queries or INSERT/DELETE operations 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." ;
        rdfs:domain         rdfs:Class ;
        rdfs:label          "rule" ;
        rdfs:range          spin:Rule ;
        rdfs:subPropertyOf  spin:command .

spin:constraint  rdf:type  rdf:Property ;
        rdfs:comment  "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." ;
        rdfs:domain   rdfs:Class ;
        rdfs:label    "constraint" .

spin:Function  rdf:type  rdfs:Class ;
        rdfs:comment     "Metaclass for functions that can be used in SPARQL expressions (e.g. FILTER or BIND). The function themselves are classes that are instances of this metaclass. Function calls are instances of the function classes, with property values for the arguments." ;
        rdfs:label       "Function" ;
        rdfs:subClassOf  spin:Module ;
        spin:constraint  [ rdf:type       spl:Attribute ;
                           rdfs:comment   "the body of the function" ;
                           spl:maxCount   1 ;
                           spl:minCount   0 ;
                           spl:predicate  spin:body
                         ] .

spin:Module  rdf:type    rdfs:Class ;
        rdfs:comment     "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." ;
        rdfs:label       "Module" ;
        rdfs:subClassOf  rdfs:Class .

spin:AskTemplate  rdf:type  rdfs:Class ;
        rdfs:comment     "A SPIN template that wraps an ASK query." ;
        rdfs:label       "Ask template" ;
        rdfs:subClassOf  spin:Template ;
        spin:constraint  [ rdf:type       spl:Attribute ;
                           rdfs:comment   "The ASK query wrapped by this template." ;
                           spl:maxCount   1 ;
                           spl:minCount   0 ;
                           spl:predicate  spin:body ;
                           spl:valueType  sp:Ask
                         ] .

spin:columnWidth  rdf:type  rdf:Property ;
        rdfs:comment        "The preferred width of the associated Column, for display purposes. Values in pixels (rendering engines may multiply the values depending on resolution)." ;
        rdfs:domain         spin:Column ;
        rdfs:label          "column width" ;
        rdfs:range          xsd:integer ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:TableDataProvider
        rdf:type         rdfs:Class ;
        rdfs:comment     "An abstraction of objects that can produce tabular data. This serves as a base class of spin:SelectTemplate, because SELECT queries can produce tables with columns for each result variable. However, other types of TableDataProviders are conceivable by other frameworks, and this class may prove as a useful shared foundation.\n\nTableDataProviders can link to definitions of columns via spin:column, and these definitions can inform rendering engines." ;
        rdfs:label       "Table data provider" ;
        rdfs:subClassOf  rdfs:Class .

spin:Error  rdf:type  spin:ConstraintViolationLevel ;
        rdfs:comment  "Indicates that the associated constraint violation is an error that should be fixed." ;
        rdfs:label    "Error" .

spin:Fatal  rdf:type  spin:ConstraintViolationLevel ;
        rdfs:comment  "Indicates that the associated constraint violation is a severe error that must be fixed. Constraint checking engines may decide to stop further evaluation once a fatal error has been detected." ;
        rdfs:label    "Fatal" .

spin:_arg5  rdf:type  sp:Variable ;
        sp:varName  "arg5" .

spin:labelTemplate  rdf:type  rdf:Property ;
        rdfs:comment        "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.\"" ;
        rdfs:domain         spin:Template ;
        rdfs:label          "label template" ;
        rdfs:range          xsd:string ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:columnType  rdf:type   rdf:Property ;
        rdfs:comment        "The datatype or resource type of a spin:Column. For example this is useful as metadata to inform a rendering engine that numeric columns (e.g. xsd:float) need to be right-aligned." ;
        rdfs:domain         spin:Column ;
        rdfs:label          "column type" ;
        rdfs:range          rdfs:Class ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:abstract  rdf:type     rdf:Property ;
        rdfs:comment        "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." ;
        rdfs:domain         spin:Module ;
        rdfs:label          "abstract" ;
        rdfs:range          xsd:boolean ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:update  rdf:type       rdf:Property ;
        rdfs:comment        "Can be used to point from any resource to an Update." ;
        rdfs:label          "update" ;
        rdfs:range          sp:Update ;
        rdfs:subPropertyOf  spin:command .

spin:select  rdf:type    spin:MagicProperty ;
        rdfs:comment     "Executes a given SELECT or ASK query (or a corresponding SPIN template call) and binds its result rows to the variables specified on the right hand side. May also pre-bind variables for the query execution, using name-value pairs on the left hand side.\n\nExample:\n\n    (?query \"this\" owl:Thing) spin:select (?a ?b)\n\nwill execute the sp:Select or sp:Ask that ?query points to and pre-bind ?this with the value of owl:Thing for the execution of the query. The first result variable of the query's result set will be bound to ?a, the second to ?b etc. If the nodes on the right are bound (or constants) then it will match with the values from the result set.\n\nNote that the first argument on the left hand side can be an instance of a SPIN template (but not the template itself). If you need to execute a template, retrieve its spin:body first." ;
        rdfs:label       "select" ;
        rdfs:subClassOf  spin:MagicProperties .

spin:cachable  rdf:type     rdf:Property ;
        rdfs:comment        "Can be set to true to instruct the SPIN engine that it may cache the results of all calls to the associated function. Functions should only be marked as cachable if the same combination of input arguments always returns the same result. Functions that query a graph or other background data that may change over time should not be cached. Caching can significantly improve performance of frequently needed functions." ;
        rdfs:domain         spin:Function ;
        rdfs:label          "cachable" ;
        rdfs:range          xsd:boolean ;
        rdfs:subPropertyOf  spin:systemProperty .

spin:constructor  rdf:type  rdf:Property ;
        rdfs:comment        "Can be used to attach a \"constructor\" to a class. A constructor is a SPARQL CONSTRUCT query or INSERT/DELETE Update operation 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." ;
        rdfs:domain         rdfs:Class ;
        rdfs:label          "constructor" ;
        rdfs:range          spin:Rule ;
        rdfs:subPropertyOf  spin:command .

spin:eval  rdf:type      spin:Function ;
        rdfs:comment     "Evaluates a given SPIN expression or SELECT or ASK query, and returns its result. The first argument must be the expression in SPIN RDF syntax. All other arguments must come in pairs: first a property name, and then a value. These name/value pairs will be pre-bound variables for the execution of the expression." ;
        rdfs:label       "eval" ;
        rdfs:subClassOf  spin:Functions .
