Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
- PREFIX owl: <http://www.w3.org/2002/07/owl#>
- PREFIX ontology: <http://dbpedia.org/ontology/>
- Query B1: Find the class representing an Actor IN the dataset (USING filters).
- SELECT DISTINCT ?a
- WHERE {
- ?a ?b ?c.
- FILTER REGEX(STR(?a), ".*actor.*", "i")
- }
- Query B2: Find the super class for the class Actor.
- SELECT DISTINCT ?c
- WHERE {
- ontology:Actor rdfs:subClassOf ?c
- }
- Query B3: Find ALL the actors IN the dataset.
- Query B4: Get different classes that are defined AS range of the properties that have the class Actor defined AS their domain.
- SELECT DISTINCT ?c
- WHERE {
- ?a rdfs:domain ontology:Actor .
- ?a rdfs:range ?c
- }
- Query B5: Find the super property of the goldenRaspberryAward property.
- SELECT DISTINCT ?c
- WHERE {
- ontology:goldenRaspberryAward rdfs:subPropertyOf ?c
- }
- Query B6: Return ALL the properties that have the class Actor AS either their range or domain.
- SELECT DISTINCT ?a
- WHERE {
- {?a rdfs:range ontology:Actor}
- UNION
- {?a rdfs:domain ontology:Actor}
- }
- Query B7: Return ALL persons that are NOT actors.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement