IRIResolver
Description
Class to manage the resolution of IRIs in tokens
Constructor
IRIResolver( base?: IRIResolver, vocab?: string )Creates a new empty instance of IRIResolver if no parameter is provided, but if a base IRIResolver is specified, its information will be copied to the new instance.
Parameters
| Name | Type | Description |
|---|---|---|
| IRIResolver | IRIResolver to copy its data from. | |
| string | Absolute IRI to change the default vocab value. |
Properties
prefixes: PrefixMapMap to store prefixes and information of its usage
vocab?: stringIRI to resolve relative RDF properties
Methods
resolve( relativeIRI: string, vocab?: boolean ): IRITokenResolves (if necessary) and creates the respective tokens if the IRI provided.
If vocab parameter is to true, the stored vocab IRI is used to resolve relative IRIs.
Parameters
| Name | Type | Description |
|---|---|---|
| string | The relative IRI to be resolved and tokenized. | |
| boolean | Optional parameter to specified if the relative IRIs will be resolved with the stored vocab IRI. |
Returns
An array of tokens representing the provided IRI to be used in the SPARQL query.
resolveIRIRef( relativeIRI: string, vocab: boolean = false ): IRIRefTokenParameters
| Name | Type | Description |
|---|---|---|
| string | ||
| boolean = false |
resolvePrefixed( prefixedName: string ): PrefixedNameTokenParameters
| Name | Type | Description |
|---|---|---|
| string |