Printouts and property chains
Template:Interlanguagelink: en
Property chains and paths | |
---|---|
Property chains allow to select pages and values with the help of the dot chain syntax | |
Keywords | |
Table of Contents | |
The property chain feature allows to select pages and values with help of the dot chain syntax.
Chaining of entities is supported:
- As part of a query condition (e.g.
[[Located in.Capital of::Foo]]
) - Using a query printout1(e.g.
|?Located in.Capital of
)or - Defining a sort parameter2 (e.g.
|sort=Located in.Capital of
). But see this report for an unresolved issue.
One requirement for both the condition and the print request is that chain members are to be page type entities while the last member is nonrestrictive to any type. The reason is that in order for the traversal process to be successful, chain member nodes are required to be referable which is not possible for primitive data values such as numbers, dates, or text.
It should be noted that the chain syntax3 on a query condition and its application on a result printout are technically two distinct operations that can not be compared with each other. The first relates to the filtering of results and the latter being a traversal process.
Examples
Query examples
- Regular use cases
{{#ask: [[Category:Country]] |?Located in |?-Located in |?-Located in.Capital of |?-Located in.Has population |?-Located in.Has population.Retrieved on |?-Located in.Has population.Retrieved on=WithCustomTitle }}
- Advanced use cases
{{#ask: [[Category:Country]] [[Category:P0434]] |?Located in.-Located in.-Located in.Capital of.Has subobject.Has population.Number |link=none }}
Notes
- The number of chain members is currently not limited to a certain depth.
- The headers (e.g. table headers) of properties identified as being part of a property chain are marked with two little superscripted dots "
⠉
". These dots show all its members when being hovered over. See the SMW sandbox for an example.
See also
- Help page on selecting pages (query conditions)
- Help page on displaying information (print requests)
- OWL 2 Web Ontology on Property Chains
- SPARQL 1.1 Property Paths document describes SPARQL Property Paths
References
- ^ gh:smw:1824
- ^ gh:smw:2073
- ^ W3C: OWL 2 Web Ontology Language Primer - Property Chains