If you would like to use the ontology for your research, please contact Barbara Giżycka.
Ontology has only one class: GDP (Game Design Pattern). All patterns are instances of this class.
Following properties are used in ontology:
List of patterns to check have to be specified in IN() clauses. It must be given twice (for `?subject` and for `?object`).
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX gdp: <https://geist.re/gdp#>
ASK {
?subject gdp:potentially_conflicting_with ?object .
FILTER(?subject IN(gdp:conflict, gdp:uncertainty_of_information, gdp:alignment) )
FILTER(?object IN(gdp:conflict, gdp:uncertainty_of_information, gdp:alignment) )
}
Result: *TRUE* *(= Yes, there are conflicts in given set)* To see actual conflicts, change `ASK` into `SELECT *`}
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX gdp: <https://geist.re/gdp#>
ASK {
?subject gdp:potentially_conflicting_with ?object .
FILTER(?subject IN(gdp:conflict, gdp:self-facilitated_games, gdp:ability_losses) )
FILTER(?object IN(gdp:conflict, gdp:self-facilitated_games, gdp:ability_losses) )
}
Result: *FALSE* *(= No, there are no conflicts in given set)*
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX gdp: <https://geist.re/gdp#>
ASK {
{
?subject gdp:instantiated_by ?instantiated_by_object .
?instantiated_by_object gdp:potentially_conflicting_with ?object
} UNION {
?subject gdp:potentially_conflicting_with ?object
}
FILTER(?subject IN(gdp:conflict, gdp:self-facilitated_games, gdp:ability_losses) )
FILTER(?instantiated_by_object NOT IN(gdp:conflict, gdp:self-facilitated_games, gdp:ability_losses) )
FILTER(?object IN(gdp:conflict, gdp:self-facilitated_games, gdp:ability_losses) )
}
Result: *TRUE* *(= Yes, there are conflicts in given set)*
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: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX gdp: <https://geist.re/gdp#>
SELECT ?subject
WHERE {
?subject gdp:instantiates ?object.
FILTER( ?object IN(gdp:conflict, gdp:uncertainty_of_information, gdp:alignment, gdp:preventing_goals) )
FILTER( ?subject NOT IN(gdp:conflict, gdp:uncertainty_of_information, gdp:alignment, gdp:preventing_goals) )
}
GROUP BY (?subject)
Note: as above…
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX gdp: <https://geist.re/gdp#>
SELECT ?subject
WHERE {
?subject gdp:instantiated_by | gdp:modulated_by | gdp:modulates ?object.
FILTER( ?object IN(gdp:conflict, gdp:uncertainty_of_information, gdp:alignment, gdp:preventing_goals) )
FILTER( ?subject NOT IN(gdp:conflict, gdp:uncertainty_of_information, gdp:alignment, gdp:preventing_goals) )
}
GROUP BY (?subject)
Note: as above…
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX gdp: <https://geist.re/gdp#>
SELECT ?subject
WHERE {
{
?subject gdp:instantiated_by | gdp:modulated_by | gdp:modulates ?object.
} UNION {
?object gdp:instantiates | gdp:modulated_by | gdp:modulates ?subject.
}
FILTER( ?object IN(gdp:conflict, gdp:uncertainty_of_information, gdp:alignment, gdp:preventing_goals) )
FILTER( ?subject NOT IN(gdp:conflict, gdp:uncertainty_of_information, gdp:alignment, gdp:preventing_goals) )
}
GROUP BY (?subject)