2

I want to use GraphDB for ontology which uses SWRL rules. Is it possible to add SWRL rules set into GraphDB? How can one do it?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
SVS
  • 61
  • 6
  • 1
    There is no way, AFAIK. Perhaps some rules could be convered to OWL 2 (RL) axioms (manually or using the ROWL plugin in Protege). Try to rewrite other rules using GraphDB's own [rule format](http://graphdb.ontotext.com/documentation/standard/reasoning.html#rules). – Stanislav Kralin Sep 14 '19 at 22:58
  • Thank you. But it seems to me, that GraphDB rules format doesn't support arithmetics, comparing individuals' properties and so on, does it? – SVS Sep 15 '19 at 07:42
  • I know Stardog supports SWRL, but are there any other RDF compatible DBMS in this regards? – SVS Sep 15 '19 at 09:12
  • Stardog or Stardog rules would support what you're trying to achieve out of the box. Virtuoso 8 has rule engine, but is commercial. Depending on the size of the data, Apache Jena (TDB) maybe with its Jena rules. Other than that, You could also think of SPARQL 1.1 Update queries if your data is static and you just want to materialize the inferred facts once. For real time ad-hoc queries though not appropiate. – UninformedUser Sep 15 '19 at 12:34
  • So the question, why not trying Stardog? – UninformedUser Sep 15 '19 at 12:34
  • 1
    Note, if you have very dynamic data - and in your traffic analysis task that seems to be the case - you need some backward chaining/query rewriting engine - which Stardog does and GraphDB does not – UninformedUser Sep 15 '19 at 12:37
  • Yeah, that is the case. – SVS Sep 15 '19 at 12:42
  • Yes, as I described here https://stackoverflow.com/questions/57937212/how-to-define-a-class-road-to-be-equivalent-to-a-set-of-objects-with-the-same-va?noredirect=1#comment102299156_57937212 the ontology itself is dynamic, at least in terms of data. – SVS Sep 15 '19 at 13:23
  • @AKSW I was wondering whether Stardog supports operations on ordered collections, i.e. lists represented as https://protege.stanford.edu/conference/2006/submissions/abstracts/7.1_Drummond_listsInProtegeOWL.pdf ? Such operations like "has sub-list", "has item with specified properties", "aggregate over all items"? I feel that to do it efficiently lists have to be internally translated into some tree-like data structures. – SVS Sep 16 '19 at 07:11
  • 1
    I doubt that any triple store will support some non-standard language feature like lists in OWL. Especially since there are multiple proposal how to model lists/sequences in OWL. I mean, in SPARQL you could try to use property paths to some extend to handle standard RDF lists, but in rules I don't know. WE would need to see sample to data before giving any useful advice. Indeed, in Stardog you could implement custom functions and Stardog also supports some custom array datatype. But I'm not an expert in that direction, the Stardog people know better would still need to see concrete data – UninformedUser Sep 16 '19 at 08:35
  • You're correct, GraphDB rules don't support arithmetics or comparisons: their simplicity allows them to be dynamic, yet very efficient (no query rewriting). I posted an answer at https://stackoverflow.com/questions/57937212 showing how you can link roads to segments using a shared "road number" – Vladimir Alexiev Feb 12 '21 at 10:51

0 Answers0