3.2.1 • Published 3 years ago

@ldf/datasource-composite v3.2.1

Weekly downloads
353
License
MIT
Repository
github
Last release
3 years ago

Linked Data Fragments Server - Composite Datasource

npm version

This module contains a composite datasource for the Linked Data Fragments server. It delegates queries to an sequence of other datasources.

This package is a Linked Data Fragments Server module.

Usage in @ldf/server

This package exposes the following config entries:

  • CompositeDatasource: A composite datasource that requires at least one compose field. Should be used as @type value.
  • compose: Refers to an array of datasource id's that should be composed. Should be used as key in a CompositeDatasource.

Example:

{
  "@context": "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/server/^3.0.0/components/context.jsonld",
  "@id": "urn:ldf-server:my",
  "import": "preset-qpf:config-defaults.json",

  "datasources": [
    {
      "@id": "urn:ldf-server:myCompositeDatasource",
      "@type": "CompositeDatasource",
      "datasourceTitle": "Composite",
      "description": "An example composite datasource",
      "datasourcePath": "composite",
      "compose": [ "urn:ldf-server:myHdtDatasource", "urn:ldf-server:mySparqlDatasource" ]
    },
    {
      "@id": "urn:ldf-server:myHdtDatasource",
      "@type": "HdtDatasource",
      "datasourceTitle": "DBpedia 2014",
      "description": "DBpedia 2014 with an HDT back-end",
      "datasourcePath": "dbpedia",
      "hdtFile": "data/dbpedia2014.hdt"
    },
    {
      "@id": "urn:ldf-server:mySparqlDatasource",
      "@type": "SparqlDatasource",
      "datasourceTitle": "DBpedia (Virtuoso)",
      "description": "DBpedia with a Virtuoso back-end",
      "datasourcePath": "dbpedia-sparql",
      "sparqlEndpoint": "https://dbpedia.org/sparql"
    }
  ]
}

Usage in other packages

When this module is used in a package other than @ldf/server, then the JSON-LD context https://linkedsoftwaredependencies.org/contexts/@ldf/datasource-composite.jsonld must be imported.

For example:

{
  "@context": [
    "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/core/^3.0.0/components/context.jsonld",
    "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/preset-qpf/^3.0.0/components/context.jsonld",
    "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/datasource-hdt/^3.0.0/components/context.jsonld",
    "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/datasource-sparql/^3.0.0/components/context.jsonld",
    "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/datasource-composite/^3.0.0/components/context.jsonld",
  ],
  // Same as above...
}

License

The Linked Data Fragments server is written by Ruben Verborgh, Miel Vander Sande, Ruben Taelman and colleagues.

This code is copyrighted by Ghent University – imec and released under the MIT license.

3.2.1

3 years ago

3.2.0

3 years ago

3.1.0

4 years ago

3.0.7

4 years ago

3.0.1

4 years ago

3.0.5

4 years ago

3.0.0

4 years ago