no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | pub:ontology [2019/09/19 17:27] (current) – created kkutt | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Game Design Patterns ontology ====== | ||
+ | |||
+ | If you would like to use the ontology for your research, please contact [[bgc@agh.edu.pl|Barbara Giżycka]]. | ||
+ | |||
+ | ==== Based on " | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | Ontology has only one class: **GDP** (**G**ame **D**esign **P**attern). All patterns are instances of this class. | ||
+ | |||
+ | Following properties are used in ontology: | ||
+ | * **rdfs: | ||
+ | * **rdfs: | ||
+ | * **: | ||
+ | * **: | ||
+ | * **: | ||
+ | * **: | ||
+ | |||
+ | ===== Use Cases ===== | ||
+ | ===== UC.1. Check for conflicts in given set of patterns ===== | ||
+ | |||
+ | List of patterns to check have to be specified in IN() clauses. It must be given twice (for `?subject` and for `?object`). | ||
+ | |||
+ | ==== Query 1.A ==== | ||
+ | |||
+ | < | ||
+ | PREFIX rdf: < | ||
+ | PREFIX owl: < | ||
+ | PREFIX rdfs: < | ||
+ | PREFIX xsd: < | ||
+ | PREFIX gdp: < | ||
+ | ASK { | ||
+ | ? | ||
+ | FILTER(? | ||
+ | FILTER(? | ||
+ | } | ||
+ | </ | ||
+ | **Result:** *TRUE* *(= Yes, there are conflicts in given set)* | ||
+ | To see actual conflicts, change `ASK` into `SELECT *`} | ||
+ | |||
+ | ==== Query 1.B ==== | ||
+ | |||
+ | |||
+ | < | ||
+ | PREFIX rdf: < | ||
+ | PREFIX owl: < | ||
+ | PREFIX rdfs: < | ||
+ | PREFIX xsd: < | ||
+ | PREFIX gdp: < | ||
+ | ASK { | ||
+ | ? | ||
+ | FILTER(? | ||
+ | FILTER(? | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **Result:** *FALSE* *(= No, there are no conflicts in given set)* | ||
+ | |||
+ | |||
+ | ===== UC.2. Check for conflicts in given set of patterns (using `instantiated_by` relation) ===== | ||
+ | |||
+ | ==== Query 2.A ==== | ||
+ | |||
+ | < | ||
+ | PREFIX rdf: < | ||
+ | PREFIX owl: < | ||
+ | PREFIX rdfs: < | ||
+ | PREFIX xsd: < | ||
+ | PREFIX gdp: < | ||
+ | ASK { | ||
+ | { | ||
+ | ? | ||
+ | ? | ||
+ | } UNION { | ||
+ | ? | ||
+ | } | ||
+ | |||
+ | FILTER(? | ||
+ | FILTER(? | ||
+ | FILTER(? | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **Result:** *TRUE* *(= Yes, there are conflicts in given set)* | ||
+ | |||
+ | |||
+ | ===== UC.3. Select all items that are in given relation with our set of patterns ===== | ||
+ | |||
+ | ==== Query 3.A `instantiates` ==== | ||
+ | Note: The query is looking for everything that is in the `instantiates` relationship. But for us enough is just one such thing for each of our patterns. | ||
+ | |||
+ | < | ||
+ | PREFIX rdf: < | ||
+ | PREFIX owl: < | ||
+ | PREFIX rdfs: < | ||
+ | PREFIX xsd: < | ||
+ | PREFIX gdp: < | ||
+ | SELECT ?subject | ||
+ | WHERE { | ||
+ | ? | ||
+ | FILTER( ?object IN(gdp: | ||
+ | FILTER( ?subject NOT IN(gdp: | ||
+ | } | ||
+ | GROUP BY (?subject) | ||
+ | </ | ||
+ | |||
+ | ==== Query 3.B other relations ==== | ||
+ | |||
+ | Note: as above... | ||
+ | |||
+ | < | ||
+ | PREFIX rdf: < | ||
+ | PREFIX owl: < | ||
+ | PREFIX rdfs: < | ||
+ | PREFIX xsd: < | ||
+ | PREFIX gdp: < | ||
+ | SELECT ?subject | ||
+ | WHERE { | ||
+ | ? | ||
+ | FILTER( ?object IN(gdp: | ||
+ | FILTER( ?subject NOT IN(gdp: | ||
+ | } | ||
+ | GROUP BY (?subject) | ||
+ | </ | ||
+ | |||
+ | ==== Query 3.C other relations AND checked in two ways (?sub ?rel ?obj AND ?obj ?rel ?subj) ==== | ||
+ | |||
+ | |||
+ | Note: as above... | ||
+ | |||
+ | < | ||
+ | PREFIX rdf: < | ||
+ | PREFIX owl: < | ||
+ | PREFIX rdfs: < | ||
+ | PREFIX xsd: < | ||
+ | PREFIX gdp: < | ||
+ | SELECT ?subject | ||
+ | WHERE { | ||
+ | { | ||
+ | ? | ||
+ | } UNION { | ||
+ | ? | ||
+ | } | ||
+ | FILTER( ?object IN(gdp: | ||
+ | FILTER( ?subject NOT IN(gdp: | ||
+ | } | ||
+ | GROUP BY (?subject) | ||
+ | </ | ||