SPIN Architecture

Instead of relying on the textual representation of SPARQL expressions, SPIN offers an RDF Schema for SPARQL. As a result, SPARQL queries can be stored as RDF triples together with any RDF domain model. This enables linkage of RDF resources with the associated SPARQL queries as well as sharing and reuse of SPARQL queries as part of Semantic Web models. An RDF vocabulary for SPARQL is the first layer in the SPIN framework.

Using the SPARQL RDF syntax, SPIN defines a light-weight collection of RDF properties that allow domain modelers to attach inference rules (as SPARQL CONSTRUCT queries or INSERT/DELETE requests) and constraint checks/unit tests (as ASK or CONSTRUCT queries) to RDFS or OWL class definitions:

Properties for attaching rules and constraints to classes are provided by the SPIN Vocabulary, a second layer in the SPIN framework. Note that by providing a way to attach rules and constraints to classes, SPIN supports an object-oriented modeling paradigm that is familiar to many potential users. However, in contrast to classical object-oriented systems, SPIN is fully embedded into the Semantic Web space, making it possible to link web resources together to integrate data from various sources. Also, although SPIN can be used to encapsulate behavior with objects, this happens purely declaratively and thus transparent to humans or agents.

SPIN also offers a very powerful meta-modeling mechanism that can be employed to define new SPARQL functions based on other SPARQL expressions, and to encapsulate reusable SPARQL query templates. The SPIN templates mechanism makes it possible to define domain-specific modeling languages with executable, declarative semantics. Based on this mechanism, SPIN provides a library of frequently needed modeling patterns with functions and templates to constrain cardinalities and value ranges. This module library is the third layer in the SPIN framework.