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://yourvivo/tpf/core, where "yourvivo" is the web address of the VIVO of interest. In the example below we use http://openvivo.org/tpf/core. You will see:

...

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

Image Removed

Curl

 

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 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.

...