When a property’s range is the same as its domain (ie. its values are resources of the same type as the original subject), sapi-nt treats the property as recursive.
When supplying a filter or projection parameter, you can use recursive properties in the same way as non-recursive properties in property paths, or you can use them to specify recursive or inverse property paths.
Recursive property paths traverse the recursive relationship an indefinite number of times, and a resource satisfies the filter if any of the values in that chain match the filter criteria.
The types of recursion are “one or more” and “zero or more”,
given by the suffixes + and * respectively.
These reflect the recursive path functionality defined in the SPARQL query language.
To specify that a relationship in a property path is recursive, append the suffix to the name of the property.
For example, the request parameter:
region.broader+.label=England
specifies a property path, region.broader+.label where the broader relationship is recursive.
This filter will match any resource whose region has a broader ancestor with the label “England”.
Alternatively, the filter given by:
region.broader*.label=England
will also match resources whose region itself has the label “England”.
Similarly to recursive paths, when a property is considered recursive, you can optionally specify the inverse of the property in a filter or projection path.
Inverted properties are denoted by the ~ token preceding the property name.
This is analogous to the ^ token in the SPARQL query language.
For example, the request parameter:
region.~broader.label=England
specifies a property path region.~broader.label where the broader relationship is recursive.
This filter will match any resource whose region is the broader value of a resource labelled “England” (eg. the parent of that resource in a hierarchy).