FluentPath
Extends
Path<T>

Description

The interface with the methods for constructing a path with in a fluent mode.

Example:

_.inverse( "ex:path1" ) // ^ex:path1
.then( "ex:path2" ) // ^ex:path1 / ex:path2
.onceOrMore()       // (^ex:path1 / ex:path2)+

Methods

subPath(): T extends PathInNegatedToken ? DeniableFluentPath<SubPathToken<T>> : FluentPath<SubPathToken<T>>

Wrap the current path as a sub-path.

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

Parameters

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

Add sequence paths from the current one.

Parameters

NameTypeDescription

The paths to be added as a sequence.

(string | Resource | Path<PathToken> | (string | Resource | Path<PathToken>)[])[]
inverse(): T extends PathInNegatedToken ? DeniableFluentPath<PathInverseToken<IRIToken | "a">> : FluentPath<PathInverseToken>

Change the current path to be an inverse path.

oneOrNone(): FluentPath<PathModToken>

Add the one or none mod (?) into the current path.

zeroOrMore(): FluentPath<PathModToken>

Add the zero or more mod (*) into the current path.

onceOrMore(): FluentPath<PathModToken>

Add the once or more mod (+) into the current path.

FluentPath

Description

Constant with the utils for FluentPath objects.

Methods

createFrom<T extends PathToken, O extends object>( container: FluentPathContainer<T>, object: O ): O & FluentPath<T>

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

Parameters

NameTypeDescription
FluentPathContainer<T>

The related container with the data for the FluentPath statement.

O

The base base from where to create the FluentPath statement.

Returns

The FluentPath statement created from the object provided.