Alias for backward compatibility

  • Builds a complete SPARQL CONSTRUCT query from normalized schema results

    Uses @tpluscode/sparql-builder to ensure proper query structure with:

    • PREFIX declarations at the top level (deduplicated)
    • CONSTRUCT clause with all patterns
    • WHERE clause with all patterns (including SUBSELECTs)

    Parameters

    • constructResult: ConstructResult

      Result from normalizedSchema2construct

    • OptionalprefixMap: Prefixes

      Optional prefix mappings for the query

    Returns string

    Complete SPARQL query string

    const result = normalizedSchema2construct(iri, typeIRIs, schema, { prefixMap });
    const query = buildSPARQLConstructQuery(result, prefixMap);
    // Execute query against triple store