PathBuilder

Description

Builder with the methods that helps you to construct any path.

See https://www.w3.org/TR/sparql11-query/#propertypaths for more information.

Methods

Parameters

NameTypeDescription
Path<PathToken>
alternatives( ...paths: (string | Resource | Path<PathToken> | (string | Resource | Path<PathToken>)[])[] ): FluentPath<PathAlternativeToken>

Parameters

NameTypeDescription
(string | Resource | Path<PathToken> | (string | Resource | Path<PathToken>)[])[]
sequences( ...paths: (string | Resource | Path<PathToken> | (string | Resource | Path<PathToken>)[])[] ): FluentPath<PathSequenceToken>

Create a sequence path from the paths.

Parameters

NameTypeDescription

The paths to be added as path sequence.

(string | Resource | Path<PathToken> | (string | Resource | Path<PathToken>)[])[]
inverse( path: string | Resource | Path<PathToken> ): FluentPath<PathInverseToken>

Parameters

NameTypeDescription
string | Resource | Path<PathToken>

Create an negated path from the another one.

Parameters

NameTypeDescription
string | Resource | Path<IRIRefToken | PrefixedNameToken | "a" | PathInverseToken<IRIRefToken | PrefixedNameToken | "a"> | PathAlternativeToken<PathInNegatedToken> | SharedSubPathToken<...>>

The path to be negated.

oneOrNone( path: string | Resource | Path<PathToken> ): FluentPath<PathModToken>

Set the path to be matched one or zero times. i.e. the ? mod.

Parameters

NameTypeDescription
string | Resource | Path<PathToken>

The path to add the mod.

zeroOrMore( path: string | Resource | Path<PathToken> ): FluentPath<PathModToken>

Set the path to be matched zero or more times. i.e. the * mod.

Parameters

NameTypeDescription
string | Resource | Path<PathToken>

The path to add the mod.

onceOrMore( path: string | Resource | Path<PathToken> ): FluentPath<PathModToken>

Set the path to be matched one or more times. i.e. the + mod.

Parameters

NameTypeDescription
string | Resource | Path<PathToken>

The path to add the mod.

PathBuilder

Description

Constant with the utils for PathBuilder objects.

Methods

createFrom<O extends object>( container: FluentPathContainer<undefined>, object: O ): O & PathBuilder

Factory function that allows to crete a PathBuilder from the object provided.

Parameters

NameTypeDescription
FluentPathContainer<undefined>

The related container with the data for the PathBuilder statement.

O

The base base from where to create the PathBuilder statement.

Returns

The PathBuilder statement created from the object provided.