sparql-view-unfold
    Preparing search index...
    • Transformation that rewrites non-recursive property paths into equivalent BGPs and UNIONs.

      Property paths in SPARQL (like ex:knows/ex:name or ex:knows|ex:worksWith) are syntactic sugar for more complex patterns. This transformation expands them into their equivalent algebraic form, which is necessary because the mapping-based rewriting operates on individual triple patterns.

      • Link (<predicate>): Simple triple pattern
      • Alt (path1|path2): UNION of alternatives
      • Seq (path1/path2): JOIN with intermediate variables
      • Inv (^path): Swaps subject and object
      • NPS (!(<p1>|<p2>)): Negated property set (FILTER NOT IN)
      • ZeroOrOne (path?): UNION with empty match case
      • ZeroOrMore (path*): Returns original (recursive, cannot be fully expanded)
      • OneOrMore (path+): Returns original (recursive, cannot be fully expanded)

      Type Parameters

      • T extends Operation

      Parameters

      Returns T

      The transformed operation with paths expanded

      // ex:knows/ex:name becomes:
      // ?s ex:knows ?linkvar_0 . ?linkvar_0 ex:name ?o
      // ex:knows|ex:worksWith becomes:
      // { ?s ex:knows ?o } UNION { ?s ex:worksWith ?o }