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
subPath( path: Path<PathToken> ): FluentPath<SubPathToken<PathToken>>
Parameters
Name | Type | Description |
---|---|---|
Path<PathToken> |
alternatives( ...paths: (string | Resource | Path<PathToken> | (string | Resource | Path<PathToken>)[])[] ): FluentPath<PathAlternativeToken>
Parameters
Name | Type | Description |
---|---|---|
(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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
string | Resource | Path<PathToken> |
negated( path: string | Resource | Path<IRIRefToken | PrefixedNameToken | "a" | PathInverseToken<IRIRefToken | PrefixedNameToken | "a"> | PathAlternativeToken<PathInNegatedToken> | SharedSubPathToken<...>> ): FluentPath<PathNegatedToken>
Create an negated path from the another one.
Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
FluentPathContainer<undefined> | The related container with the data for the | |
O | The base base from where to create the |
Returns
The PathBuilder
statement created from the object provided.