Fuseki Admin

This service allows you to do various operations with a Jena Fuseki instance, by calling its API.

Features

  • Create datasets, or check if they already exist
  • Generate compressed backups og a given dataset
  • Wait for a Fuseki task to be completed

Dependencies

  • None

Install

$ npm install @semapps/fuseki-admin --save

Usage

const { FusekiAdminService } = require('@semapps/fuseki-admin');
module.exports = {
mixins: [FusekiAdminService],
settings: {
url: 'http://localhost:3030/',
user: 'admin',
password: 'admin'
}
};

Service settings

PropertyTypeDefaultDescription
urlStringrequiredBase URL of the Fuseki instance
userStringrequiredUser with access to admin operations
passwordStringrequiredPassword for the above user

Actions

The following service actions are available:

datasetExist

Check if a dataset already exists.

Parameters
PropertyTypeDefaultDescription
datasetStringrequiredName of the dataset
Return

True if the dataset exists

listAllDatasets

Return a list of all existing datasets in the Fuseki instance.

Return

An array with the names of all existing datasets.

createDataset

Create a dataset if it doesn't already exist.

Parameters
PropertyTypeDefaultDescription
datasetStringrequiredName of the dataset

backupDataset

Generate a compressed backup of all the triples in the dataset (through Fuseki protocol).

Parameters
PropertyTypeDefaultDescription
datasetStringrequiredName of the dataset

waitForTaskCompletion

Wait for a Fuseki task to be completed.

Parameters
PropertyTypeDefaultDescription
taskIdStringrequiredID of the Fuseki task