...
VIVO uses the LinkedDataFragments Server, available on GitHub here: https://github.com/LinkedDataFragments/Server.Java
Configuration
There are currently two supported means of exposing a TPF endpoint for the content in VIVO:
- Enable the embedded TPF server
- Setup and external TPF server
Embedded TPF server
Since the TPF endpoint does not currently enforce visibility settings for classes or properties set in VIVO, the service is turned off by default. In order to enable the TPF endpoint, a "tpf.activeFlag" property must be added to the runtime.properties file with a value of "true". For this property to take effect, the Tomcat server must be restarted.
Code Block |
---|
tpf.activeFlag = true |
External TPF server
In order to run the external TPF server, the following steps should be taken:
- Clone and build the dependency project: https://github.com/rdfhdt/hdt-java
- Note: This step will not be necessary once the HDT artifact is published to Maven Central
- Clone and build: https://github.com/LinkedDataFragments/Server.Java
Note: This step will not be necessary once an executable release has been published
Create "config.json" along the lines of the below:
Expand |
---|
No Format |
---|
{
"title": "VIVO Linked Data Fragments server",
"datasourcetypes": {
"SparqlDatasource" : "org.linkeddatafragments.datasource.sparql.SparqlDataSourceType"
},
"datasources": {
"vivo": {
"title": "VIVO Linked Data TPF",
"type": "SparqlDatasource",
"description": "VIVO Semantic TPF server",
"settings": { "endpoint": "http://localhost:8080/vivo/api/sparqlQuery",
"username": "vivo_root@mydomain.edu",
"password": "your-password" }
}
},
"prefixes": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"hydra": "http://www.w3.org/ns/hydra/core#",
"void": "http://rdfs.org/ns/void#",
"bibo": "http://purl.org/ontology/bibo/",
"c4o": "http://purl.org/spar/c4o/",
"cito": "http://purl.org/spar/cito/",
"dcterms": "http://purl.org/dc/terms/",
"event": "http://purl.org/NET/c4dm/event.owl#",
"fabio": "http://purl.org/spar/fabio/",
"foaf": "http://xmlns.com/foaf/0.1/",
"geo": "http://aims.fao.org/aos/geopolitical.owl#",
"obo": "http://purl.obolibrary.org/obo/",
"ocrer": "http://purl.org/net/OCRe/research.owl#",
"ocresst": "http://purl.org/net/OCRe/statistics.owl#",
"ocresd": "http://purl.org/net/OCRe/study_design.owl#",
"ocresp": "http://purl.org/net/OCRe/study_protocol.owl#",
"ro": "http://purl.obolibrary.org/obo/ro.owl#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"swo": "http://www.ebi.ac.uk/efo/swo/",
"vcard": "http://www.w3.org/2006/vcard/ns#",
"vitro-public": "http://vitro.mannlib.cornell.edu/ns/vitro/public#",
"vivo": "http://vivoweb.org/ontology/core#",
"scires": "http://vivoweb.org/ontology/scientific-research#",
"vann": "http://purl.org/vocab/vann/"
}
}
|
|
Deploy the externalized TPF server:
As a standalone application:
Code Block |
---|
$ java -jar target/ldf-server.jar config.json --port <port-number | 8080> |
- Or, as a standard web-application, deployed in Tomcat or Jetty
- Place 'target/ldf-server.war' in your servlet container of choice
- Navigate to: http://localhost:[port-number]/vivo
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.
...