rudof service

rudof service shows the service description of a SPARQL endpoint. A service description uses the SPARQL 1.1 Service Description vocabulary, a W3C recommendation, to describe the features that the endpoint supports.

Example

Show the service description of UniProt:

$ rudof service -s https://sparql.uniprot.org/sparql
Service
  endpoint: https://sparql.uniprot.org/sparql
  supportedLanguage: [SPARQL11Query]
  feature: [UnionDefaultGraph, BasicFederatedQuery]
  result_format: [JSON, CSV, TSV, N-TRIPLES, Turtle, RDF/XML, XML]
  default_dataset: Dataset: base://#_1

With no --service, the command shows the service description that is already loaded. This is useful in rudof shell.

With -r mie, the result is a MIE document that describes the endpoint.

Configuration file

--config-file (-c) passes a TOML configuration file. The base_iri key sets the base IRI to resolve relative IRIs in the service description.

Options

$ rudof service --help
Show information about SPARQL service

Usage: rudof service [OPTIONS]

Options:
  -s, --service <URL>           SPARQL service URL. If omitted, shows the currently loaded service description
  -f, --format <FORMAT>         SPARQL service format [default: turtle] [possible values: turtle, ntriples, rdfxml, trig, n3, nquads, jsonld, pg, html]
  -r, --result-format <FORMAT>  Output result service format [default: json] [possible values: internal, mie, json]
      --reader-mode <MODE>      RDF Reader mode [default: strict] [possible values: lax, strict]
      --base <IRI>              Base used to resolve relative IRIs in the service description
  -c, --config-file <FILE>      Config file name
  -o, --output-file <FILE>      Output file name, default = terminal
      --force-overwrite         Force overwrite to output file if it already exists
  -h, --help                    Print help