Main Page

From SPANG Document
Jump to: navigation, search

SPANG: a command-line client supporting query generation for distributed SPARQL endpoints

Project URL: http://purl.org/net/spang

Installation

In short,

  1. Uncompress spang-*-*-*.tgz
  2. Add spang-*-*-*/bin directory to the command path

For more details, see here.

Usage

Usage of basic options

The subject, predicate, and the object are specified by options, -S, -P, -O, respectively.


Search triples by specifying the subject

spang uniprot -S tax:511145

Get abbreviated form using prefix definitions (-a option)

spang uniprot -S tax:511145 -a

Get sorted results

spang uniprot -S tax:511145 -a | sort

Search by specifying the subject and predicate

spang uniprot -S tax:511145 -P up:otherName -a

Search by specifying the object

spang uniprot -O tax:511145 -a

Usage of other options

Get the list of graphs

spang mbgd -G

Search from a specific graph (-F option) and limit the output (-L option)

spang mbgd -F mbgdr:uniprot-goa -L 10

Count (-N option)

spang mbgd -F mbgdr:uniprot-goa -N

Print the internally generated SPARQL query and quit (-q option)

spang mbgd -F mbgdr:uniprot-goa -N -q

Make inference by specifying a rule set (-i option, only for Virtuoso)

spang mbgd -S tax:511145 -P rdfs:label -i ontologies -a

Advanced settings

The system-wide settings are included in the SPANG package.

Users can additionally define the user-specific settings as follows.

cd ~
mkdir .spang
mkdir .spang/template
vi .spang/endpoints
vi .spang/prefix
vi .spang/template/example.rq

The user-specific settings overwrites the system-wide settings.

Endpoint nicknames

  • (system-wide settings) spang-*.*.*/etc/endpoints
  • (user-specific settings) ~/.spang/endpoints

Prefix declarations

  • (system-wide settings) spang-*.*.*/etc/prefix
  • (user-specific settings) ~/.spang/prefix

SPARQL library

  • (system-wide library) spang-*.*.*/etc/template/*
  • (user-specific library) ~/.spang/template/*

SPARQL library on the Web

Example usages

spang mbgd mbgdl:get_ortholog K9Z723