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: PrefixMap
Map to store prefixes and information of its usage
vocab?: string
IRI to resolve relative RDF properties
Methods
resolve( relativeIRI: string, vocab?: boolean ): IRIToken
Resolves (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 ): IRIRefToken
Parameters
Name | Type | Description |
---|---|---|
string | ||
boolean = false |
resolvePrefixed( prefixedName: string ): PrefixedNameToken
Parameters
Name | Type | Description |
---|---|---|
string |