Created on Feb. 23, 2013, 12:33 p.m. by Hevok & updated by Hevok on May 2, 2013, 5:20 p.m.

With the **Property Path** one is `able to navigate within the RDF Graph`

and to formulate Property Paths expression for matching on that Graph that would be otherwise very complicated.

For example one can define a Graph Pattern or a Property Graph of different Length. In the trivial case if the path length of the property path that connect Property with Property is 1, one has a basic Triple Pattern. On the other hand one can define possibilities, i.e. select things that fulfill either this or that conditions. One can even define Sequences of Properties, e.g. where one starts with resource x and follows foaf:knows and than again one follows the property foaf:knows and this resources that match the first Triple also match the next foaf:knows and the next foaf:name so one will have in the end People that are known to People that one knows. So one goes one step further in the graph and so what one had to do with several separate connected SPARQL Query can be done with a single one, the so called Property Graph. So one connects one property with another property and even more and so on to the Property Path greater or bigger than one.

One can also put in these Path Reverse Properties, where one reverses the direction of a Property, i.e. exchanges the subject on the Object.

In the end one can connect Sequences and reverse Properties, so one has inverse path sequences where one starts with a Resource and look at all things that are connected via a foaf:knows and then one is looking backwards, i.e. the reverse foaf:knows and look which people are known by which people that one knows and one filters this expression to exclude oneself. In such one gets a List of people who know people that are known by them and one follows as many foaf:knows as there are available.

If one does not know how long the graph will be one can define something like a Transitive Graph Pattern of arbitrary length. With the simple Plus Sing **+** one says that at least one foaf:knows or many foaf:knows. Thus, one can make a short matching expression that transverses the whole graph by the foaf:knows Property.

On the other hand one has also the possibility to negate a Property Graph and one says in the answer one wants only those results that do not contain Properties of certain types or connected Properties of this type.

- A
**Property Path**is a possible route through an RDF Graph between two Graph Nodes.- trivial case: Property path of length 1, i.e. a Triple Pattern
**alternatives**: match one or both possibilities { :book1**dc:title|rdfs:label**?displayString }**Sequence**: Property Path of Length > 1 { ?x foaf:mbox hevok@example . ?x**foaf:knows/foaf:knows/foaf:name**?name . }-
Inverse Property Paths: Reversing the Direction of the Triple

{ ?x foaf:mbox hevok@example } = { hevk@example ^foaf:mbox ?x } -

**inverse Path Sequences**Paths { ?x foaf:knows/^foaf:knows ?y . FILTER(?x != ?y) } -**Arbitary Length Match**{ ?x foaf:mbox hevok@example . ?x**foaf:knows+foaf:name**?name . } -**Negated Property Paths**{ ?x**!(rdf:type|^rdf:type)**?y }

SPARQL 1.1 gives a lot of more opportunity and things that can be computed with it.

## Comment on This Data Unit