View on GitHub

star-wars-ontology

An OWL ontology describing events, characters and places in the Star Wars Universe

home | docs | benefits | modules | events | modelling principles | test questions | performance | tools

SPARQL

Resources

SPARQL by example

Querying for death year

Someone who was killed during an event died on the date of that event.

eg Plo Koon died during Order 66 on 19BBY

We cannot simply do this in OWL as there are no property chains for datatype properties.

See deaths.sparql and DeathsSparqlReport

Neither of these queries is complete using just the basic graph.

We use the jena SPARQL engine as it:

SWRL alternative

Cannot be used in reasonable time as the SWRL tab freezes up when we try to run it

Sentient(?person) ^ diedIn(?person, ?event) ^ year(?event, ?y) -> diedInYear(?person, ?y)

We tried reducing the number of instances to just Attack_on_the_Raddus + Leia + Ackbar It runs the rule pretty much instantly but you have to assert them back into the ontology with the SWRL tab - clunky

If we just want to query, we can try SWQRL

Sentient(?person) ^ diedIn(?person, ?event) ^ year(?event, ?y) -> sqwrl:select(?person, ?y) ^ sqwrl:orderBy(?y)

This works fine again in the simple case, but looks like Drools can’t handle the number of individuals

References