sparql-view-unfold
    Preparing search index...

    Function mappingFromConstructQueries

    • Builds the Mapping a set of SPARQL CONSTRUCT queries denotes, splitting a template of several triples into a mapping per triple and merging what is left into one generic head.

      Parameters

      • constructQueries: readonly string[]

        The SPARQL CONSTRUCT query strings defining the mappings

      • options: MappingOptions = {}

        What the mapping is configured with

      Returns Mapping

      the mapping, keeping its own head where there is exactly one and merged behind ?m_s ?m_p ?m_o otherwise

      Error if no CONSTRUCT is given, if a body calls an unstable function, or if a template holds a term one of its positions does not admit

      const mapping = mappingFromConstructQueries([
      'CONSTRUCT { ?t rdf:reifies <<( ?s ?p ?o )>> } WHERE { ... }',
      'CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o . FILTER(!isTriple(?o)) }',
      ]);