Changes

Jump to navigation Jump to search
Line 17: Line 17:  
1. pointing to "good enough in class" examples (the best in class examples risk being overly complex)
 
1. pointing to "good enough in class" examples (the best in class examples risk being overly complex)
 
2. document how this is done using the Q and P templates
 
2. document how this is done using the Q and P templates
 +
 +
== defining properties for a type ==
 +
 +
{{SPARQL|query=
 +
SELECT ?class ?classLabel ?wikidataQid ?property ?propertyLabel ?wikidataPid WHERE {
 +
  ?class pdiot:P291 ?property.
 +
  OPTIONAL {?class pdiot:P103 ?wikidataQid}
 +
  OPTIONAL {?property pdiot:P104 ?wikidataPid}
 +
  SERVICE wikibase:label {
 +
    bd:serviceParam wikibase:language "en" .
 +
  } 
 +
}
 +
ORDER BY ASC(?classLabel)
 +
LIMIT 100
 +
|label=expected properties
 +
}}
 +
 +
{{SPARQL|query=
 +
#defaultView:Graph
 +
SELECT ?class ?classLabel  ?rgb ?property ?propertyLabel  WHERE {
 +
  ?class pdiot:P291 ?property.
 +
  BIND ("111177" AS ?rgb)
 +
  SERVICE wikibase:label {
 +
    bd:serviceParam wikibase:language "en" .
 +
  } 
 +
}
 +
ORDER BY ASC(?classLabel)
 +
LIMIT 100
 +
|label=graph of expected properties
 +
}}

Navigation menu