Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

VIVO uses the LinkedDataFragments Server, available on GitHub here: https://github.com/LinkedDataFragments/Server.Java

Manual Query

Manual query can be used to view triples, and to run SPARQL queries resolved as Triple Pattern Fragments.  These methods are view data.  To save data, use curl, or Programmatic Access.

View Triples using Triple Pattern Fragments

To use TPF manually, visit the TPF endpoint of a VIVO, http://vivoyourvivo/tpf/core, where "vivoyourvivo" is the web address of the VIVO of interest. In the example below we use http://openvivo.org/tpf/core. You will see:

...

The Linked Data Fragments server can also resolve full SPARQL queries. The queries are decomposed into a series of TPF requests behind the scenes in the browser. The VIVO server sees only TPF requests. Each TPF request is handled quickly as previously described. To issue a SPARQL query using Triple Pattern Fragments, go to http://vivoyourvivo/tpf where "yourvivo" is the web address of your VIVO. You will see a screen such as that below. Type in your query. You will need to provide the prefixes used in your query, as shown below. Press Execute, and the query is resolved a series of TPF queries. Results are presented dynamically.

To try this yourself, you can use the Linked Data Fragments Server of OpenVIVO, available here: http://openvivo.org/tpf

Image Removed

 

Note in the example that prefixes are supplied as part of the query.  The Triple Pattern Fragments server has no knowledge of VIVO prefixes.  These must be supplied with the query.

Image Added

Curl

curl can be used to issue triple pattern fragment queries and return RDF/XML. For example:

...

Returns an RD/XML document containing the first 100 triples regarding the specified subject.

Headers

Headers can be used to specify the output format.

Code Block
curl -H "Accept: application/n-triples; charset=utf-8" http://openvivo.org/tpf/core?subject=http://openvivo.org/a/orcid0000-0002-1304-8447

Which returns 166 triples as of this writing.

Programmatic Access

Programmatic access follows the same approach as curl. Issue an HTTP request for the specified data. Here's a simple Javascript JQuery Ajax code fragment making a TPF request. The code expects a siteUri, a subjectUri and a predicateUri, and returns all triples with the specified subjectUri and predicateUri. A dataFilterFunction is called on the return prior to the successFunction being called.

...