The IRI string (can be prefixed or full)
Prefix mappings (e.g., { "schema": "http://schema.org/" })
RDF node (either string for prefixed or NamedNode for full IRI)
// No prefix - becomes default prefix
convertIRIToNode('name', {}) // Returns: ':name'
// Known prefix - left as-is
convertIRIToNode('schema:Person', { schema: 'http://schema.org/' }) // Returns: 'schema:Person'
// Unknown prefix or full IRI - becomes NamedNode
convertIRIToNode('http://example.org/entity', {}) // Returns: NamedNode
convertIRIToNode('urn:x121', {}) // Returns: NamedNode
Convert an IRI string to an RDF node, handling both prefixed names and full IRIs
This function provides consistent IRI handling across the SPARQL schema package.
Logic: