Liking cljdoc? Tell your friends :D

grafter-2.rdf4j.sparql.path

An implementation of SPARQL Property Paths[1] for grafter/rdf4j.

[1] https://www.w3.org/TR/sparql11-query/#propertypaths

Syntax Form | Property Path Expression Name | Matches

iri | PredicatePath | An IRI. A path of length one. ^elt | InversePath | Inverse path (object to subject). elt1 / elt2 | SequencePath | A sequence path of elt1 followed by elt2. elt1 | elt2 | AlternativePath | A alternative path of elt1 or elt2 (all possibilities are tried). elt* | ZeroOrMorePath | A path that connects the subject and object of the path by zero or more matches of elt. elt+ | OneOrMorePath | A path that connects the subject and object of the path by one or more matches of elt. elt? | ZeroOrOnePath | A path that connects the subject and object of the path by zero or one matches of elt. !expression | NegatedPropertySet | Negated property set. An IRI which is not one of expression. !iri is short for !(iri). (elt) | | A group path elt, brackets control precedence.A zero occurrence of a path element always matches.

The order of IRIs, and reverse IRIs, in a negated property set is not significant and they can occur in a mixed order.

The precedence of the syntax forms is, from highest to lowest:

  • IRI, prefixed names
  • Negated property sets
  • Groups
  • Unary operators *, ? and +
  • Unary ^ inverse links
  • Binary operator /
  • Binary operator |

Precedence is left-to-right within groups.

An implementation of SPARQL Property Paths[1] for `grafter`/`rdf4j`.

  [1] https://www.w3.org/TR/sparql11-query/#propertypaths

  Syntax Form | Property Path Expression Name | Matches
  =====================================================
  iri         | PredicatePath      | An IRI. A path of length one.
  ^elt        | InversePath        | Inverse path (object to subject).
  elt1 / elt2 | SequencePath       | A sequence path of elt1 followed by elt2.
  elt1 | elt2 | AlternativePath    | A alternative path of elt1 or elt2 (all possibilities are tried).
  elt*        | ZeroOrMorePath     | A path that connects the subject and object of the path by zero or more matches of elt.
  elt+        | OneOrMorePath      | A path that connects the subject and object of the path by one or more matches of elt.
  elt?        | ZeroOrOnePath      | A path that connects the subject and object of the path by zero or one matches of elt.
  !expression | NegatedPropertySet | Negated property set. An IRI which is not one of `expression`. !iri is short for !(iri).
  (elt)       |                    | A group path elt, brackets control precedence.A zero occurrence of a path element always matches.

The order of IRIs, and reverse IRIs, in a negated property set is not significant and they can occur in a mixed order.

The precedence of the syntax forms is, from highest to lowest:

  * IRI, prefixed names
  * Negated property sets
  * Groups
  * Unary operators *, ? and +
  * Unary ^ inverse links
  * Binary operator /
  * Binary operator |

Precedence is left-to-right within groups.
raw docstring

!clj

(! x)

Translates to !x : NegatedPropertySet

Translates to !x : NegatedPropertySet
sourceraw docstring

*clj

(* x)

A path of zero or more occurrences of x

A path of zero or more occurrences of x
sourceraw docstring

+clj

(+ x)

A path of one or more occurrences of x

A path of one or more occurrences of x
sourceraw docstring

-clj

(- x)

Translates to ^x : InversePath

Translates to ^x : InversePath
sourceraw docstring

/clj

(/ x y & zs)

A sequence path of x, followed by y, followed by zs

A sequence path of x, followed by y, followed by zs
sourceraw docstring

?clj

(? x)

A path of zero or one x

A path of zero or one x
sourceraw docstring

fix-symclj

(fix-sym name)
source

pathcljmacro

(path & path)

Build a path with syntax similar to SPARQL property path syntax.

SPARQL Form | Clojure Form | Expression Name

iri | iri | PredicatePath ^elt | -elt - or - (- elt) | InversePath elt1 / elt2 | elt1 / elt2 | SequencePath elt1 | elt2 | elt1 | elt2 | AlternativePath elt* | elt* - or - (elt *) | ZeroOrMorePath elt+ | elt+ - or - (elt +) | OneOrMorePath elt? | elt? - or - (elt ?) | ZeroOrOnePath !expression | !expression | NegatedPropertySet (elt) | (elt) | Group

E.G.,

(path -a / b* / !c | d? | !(java.net.URI. (str "http://www.grafter.org/example#" p)))

Where bindings a, b, c, d are URIs, and binding p is a String.

Build a path with syntax similar to SPARQL property path syntax.

SPARQL Form | Clojure Form         | Expression Name
====================================================
iri         | iri                  | PredicatePath
^elt        | -elt - or - (- elt)  | InversePath
elt1 / elt2 | elt1 / elt2          | SequencePath
elt1 | elt2 | elt1 | elt2          | AlternativePath
elt*        | elt* - or - (elt *)  | ZeroOrMorePath
elt+        | elt+ - or - (elt +)  | OneOrMorePath
elt?        | elt? - or - (elt ?)  | ZeroOrOnePath
!expression | !expression          | NegatedPropertySet
(elt)       | (elt)                | Group

E.G.,

(path -a / b* / !c | d? | !(java.net.URI. (str "http://www.grafter.org/example#" p)))

Where bindings a, b, c, d are URIs, and binding p is a String.
sourceraw docstring

PathStringcljprotocol

string-valueclj

(string-value _)
source

|clj

(| x y & zs)

A alternative path of x, or y, or zs (all possibilities are tried).

A alternative path of x, or y, or zs (all possibilities are tried).
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close