Questions tagged [spin-rdf]

SPARQL Inferencing Notation (SPIN) is a W3C Member Submission that specifies a SPARQL-based rule and constraint language for the Semantic Web. SPIN is also a mechanism to represent reusable SPARQL queries as templates and to define new SPARQL functions.

From spinrdf.org:

SPIN is a W3C Member Submission that has become the de-facto industry standard to represent SPARQL rules and constraints on Semantic Web models. SPIN also provides meta-modeling capabilities that allow users to define their own SPARQL functions and query templates.

Before you explore SPIN further, you may want to read From SPIN to SHACL.

22 questions
3
votes
1 answer

How to define a SPIN rule?

I am using AllegroGraph 4.4. I have their sample database input regarding the Kennedy family tree. I have copied an example from their tutorials on SPIN. Here it is: (ag.spin:register-spin-function !ex:age "prefix kennedy:…
Dragos
  • 2,911
  • 12
  • 39
  • 55
3
votes
1 answer

Sesame server support for SPIN

I am new to SPIN, I read the documentation and I looked up some examples but I would like to start working with it. I saw some tools from http://topquadrant.com for SPIN but I've been working with openrdf-sesame server for a while and I would like…
whitefang1993
  • 1,666
  • 3
  • 16
  • 27
2
votes
1 answer

A simple SPIN rule doesn't work in RDF4J

I've just started using the triple store RDF4J (I am using its workbench, version 2.3.1, run on Windows 10 with Tomcat 9.0) I want to use the SPIN rules in RDF4J. Therefore, I created a new repository (In memory with RDFS+SPIN support). I wanted to…
W.Huang
  • 21
  • 2
2
votes
1 answer

Set default value to property with SPIN

I am new to SPIN. I wonder if it makes sense to use it for the following purpose. Say I have the following class hierarchy: ex:Vehicle ex:Car ex:Sedan Some classes have the property owl:equivalenClass set to some value, for example: ex:Vehicle …
Jay
  • 127
  • 9
2
votes
1 answer

How can I load SPARQL/SPIN constraints and constructors created in TopBraid Composer for use in Sesame within a SPIN-capable repository?

I have successfully generated and tested SPIN constraints (using SPARQL ASK queries) within an OWL/RDF ontology using TopBraid Composer Maestro Edition version 5.1.1. I would now like to test these SPIN constraints in Sesame. How can I get my SPIN…
Greg Cox
  • 287
  • 1
  • 12
2
votes
1 answer

Infer anonymous superclasses using SPIN rules

I am building an ontology in TopBraidComposer which has a class hierarchy and a couple of rules that work great on their own. In my ontology, I'm working on a class level, so all the definitions I create only relate to classes, not individuals. Now…
casualcoder
  • 480
  • 4
  • 17
1
vote
1 answer

SPIN representation to SPARQL

Is there an API that could help convert SPIN representation (of a SPARQL query) back to its SPARQL query form? From: [ a ; ( […
singha
  • 11
  • 1
1
vote
1 answer

How to direct RDF4J to use SPIN RDF triples when sp:text is present in imported RDF file?

I'm using RDF4J server and workbench version 2.2.2. I'm using a SPIN-capable repository in RDF4J, and I'm reading an RDF file I've created in TobBraid Composer Free Edition (TBC FE) containing many spin:construct rules. TBD FE is set to include…
Greg Cox
  • 287
  • 1
  • 12
1
vote
1 answer

Convertering between textual SPARQL syntax and the SPIN RDF Vocabulary: How to add rdfs:comment and sp:text

Using the SPIN API (http://topbraid.org/spin/api/) and working from the example code at https://github.com/spinrdf/spinrdf/blob/master/src-examples/org/topbraid/spin/examples/SPINParsingExample.java I'm trying to add handling of rdfs:comment and…
Greg Cox
  • 287
  • 1
  • 12
1
vote
2 answers

SPIN constraint using CONSTRUCT: where do the CONSTRUCT's triples go?

I'm using TopBraid Composer Free Edition (5.1.3) to create ontologies including SPIN constraints. I then load the resulting RDF files into RDF4J (2.0.1) and use RDF4J Workbench for testing. I'm working on SPIN constraints. Here's an example to…
Greg Cox
  • 287
  • 1
  • 12
1
vote
1 answer

When does a SPIN:rule run?

I'm using TopBraid Free Edition to create OWL ontologies with SPIN rules. I'm loading the ontology and SPIN rules into Sesame OpenRDF Workbench: Application Name OpenRDF Workbench Version 4.1.2 Runtime Information Operating System Windows 8.1…
Greg Cox
  • 287
  • 1
  • 12
1
vote
1 answer

Why did TopBraid Composer FE re-group my multiple OR conditions in a SPIN rule filter?

I'm using TopBraid Composer Free Edition (TBC FE) Version 5.1.3. I'm building SPIN rules / CONSTRUCT queries. Part of my query has a FILTER statement with multiple OR'd conditions. I enter it into TBC FE as follows: FILTER ( (?orgString =…
Greg Cox
  • 287
  • 1
  • 12
1
vote
1 answer

Use a SPIN function defined in TopBraid in my Java project

I'm writing my first Java project for Semantic Web using Jena framework. My ontology was peopled and now I'd like to use some SPIN function (they weren't written by me) in my project. They are very simple: they receive 2 string arguments and return…
1
vote
3 answers

Conditional subquery in SPIN function (SPARQL)

How do I change the query formula based on whether or not a variable is bound? I am invoking the magic property like this: WHERE { VALUES (?subj) { ([my bound positional parameter value goes here...]) } ?subj :myMagicProperty…
RMorrisey
  • 7,637
  • 9
  • 53
  • 71
1
vote
1 answer

Run SPARQL/SPIN templates using TopBraid SPIN API

I'm trying to run templates using the SPIN API. For simple templates, this works well but I have trouble with templates that include FILTERs. For verification purposes, I print the templates' bodies before running them and what I see is not what I…
casualcoder
  • 480
  • 4
  • 17
1
2