Versions Compared

Key

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

...

  • Open a command prompt or terminal.

  • Run the command node -v and press Enter. This will display the version of Node.js if it is installed.

    node version.png
  • Run the command npm -v and press Enter. This will display the version of npm if it is installed.

    npm version.png

For using the ENAPSO tools, it's important to have at least Node.js version 10 or higher, as earlier versions might not support some functionalities of the tools.

If you need to update Node.js to the latest version, you can download it from the official Node.js website and install it on your system. It will automatically replace the older version with the new one.

Installation

Install the enapso-graphdb-cli tool globally using npm:

...

Command Line Examples for Different Triplestores

Fuseki Example

In Fuseki, the data is returned in application/x-trig format when extracting the repository because we cannot set the format of the data.

Code Block
enapsogdb export --dburl "http://localhost/fuseki" --repository "Test" --targetfile "fuseki_backup.trig" --triplestore "fuseki"

...

Code Block
enapsogdb export --dburl "http://localhost/graphdb" --repository "Test" --targetfile "graphdb_backup.trig" --FORMATformat "application/x-trig" --triplestore "graphdb"

...

Code Block
enapsogdb export --dburl "http://localhost/stardog" --repository "Test" --targetfile "stardog_backup.trig" --FORMATformat "application/x-trig" --triplestore "stardog"

...

The below script example restores a graph database repository from a backup file. It includes an optional step to rebuild the cache on the ENAPSO platform, beneficial necessary for those using the ENAPSO together or ENAPSO together Free services, which utilize a cache mechanism to enhance data management efficiency and speed. Below, you'll find detailed command line examples for each triplestore, ensuring you can tailor the restore process to your specific setup.

...

  1. Fuseki Example

    Code Block
    enapsogdb import --dburl "http://localhost/fuseki" --repository "Test" --sourcefile "fuseki_backup.trig" --FORMATformat "application/x-trig" --triplestore "fuseki"
  2. GraphDB Example

    Code Block
    enapsogdb import --dburl "http://localhost/graphdb" --repository "Test" --sourcefile "graphdb_backup.trig" --FORMATformat "application/x-trig" --triplestore "graphdb"
  3. Stardog Example

    Code Block
    enapsogdb import --dburl "http://localhost/stardog" --repository "Test" --sourcefile "stardog_backup.trig" --FORMATformat "application/x-trig" --triplestore "stardog"

...

Code Block
curl -X POST http://localhost/enapso-dev/graphdb-management/v1/build-cache >> Report/EnapsoTestReport.txt$REPORT_FILE

This command triggers the ENAPSO service to rebuild its cache using the latest uploaded data. This step ensures that any changes from the restoration process are promptly reflected, enhancing the performance and efficiency of queries against the updated repository.

Include this step if you use the ENAPSO platform to benefit from the cache mechanism to enhance data management efficiency and speedbecause it is necessary for the cache mechanism. When you upload data, you need to create a cache because the information about the class model for auto-generating templates or managing templates is retrieved from the cache, not directly from the graph database repository. If you do not create a cache and upload the ontology, and there is a class for which you want to create an auto CRUD template, you will be unable to create it and got an error message because the cache will not have information about that class.

This enhanced documentation provides clear instructions and additional context for using the enapso-graphdb-cli tool effectively, ensuring users can manage their graph databases with confidence.

...