Versions Compared

Key

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

...

Note

When running the pull command, please note that if an image is already running and you pull the latest one, it will overwrite existing data in the knowledge graph repository, resetting it to the default state. To avoid losing your data, follow the guidelines on the provided /wiki/spaces/ENAPSODOCS/pages/2239528974 Confluence page to create a backup before pulling the latest image, and then restore your data afterward.

...

Service Name

Description

Access Link

View Management Service

API documentation for View Management

View Management Docs

GraphDB Management Service

API documentation for GraphDB Management

GraphDB Management Docs

Quick Start Guide to Setting Up ENAPSO Demo

To perform the following tasks, you need to clone the repository and run the setup script:

  • Upload the ontology file, for detailed instructions and a step-by-step process, follow the link: Upload the Ontology File.

  • Upload the demo data file, for detailed instructions and a step-by-step process, follow the link: Upload the Demo Data.

  • Create CRUD templates for the EditorialObject class, for detailed instructions and a step-by-step process, follow the link: Create CRUD Templates.

  • Set up REST routes for the CRUD operations, for detailed instructions and a step-by-step process, follow the link: Set up REST Routes.

Follow these steps to set up the ENAPSO demo on your local machine.

  1. Open a new terminal and clone the repository to your local machine by running the following command:

    Code Block
    languagebash
    git clone https://github.com/innotrade/enapso-demo.git

    This will download all the necessary files and scripts to set up the ENAPSO demo.

  2. Navigate to the cloned repository directory

    Code Block
    languagebash
    cd enapso-demo
  3. Run the appropriate setup script for your operating system.

    For macOS and Linux

    Code Block
    languagebash
    cd scripts
    chmod +x setup_enapso_media_mac.sh
    ./setup_enapso_media_mac.sh

    For Windows

    Code Block
    languagebash
    cd scripts
    setup_enapso_media_windows.bat

    The setup script will perform the following tasks:

    • Upload the ontology file (ontologies/ebucoreplus.owl)

    • Upload the demo data file (demo-data/editorialObject_demoData.ttl)

    • Create CRUD templates for the EditorialObject class

    • Set up REST routes for the CRUD operations

Testing the Setup

To verify that the ontology and data have been successfully uploaded, CRUD templates created, and routes established, open your terminal, and run the following command to read the instances of the EditorialObject class:

Code Block
curl -X GET http://localhost/enapso-dev/view-management/v1/editorialObject

Further HTTP method

For more details on other HTTP methods, including examples for each method, follow the link: Detailed CRUD Operation Examples

Uploading Your Ontology

This guide outlines the steps to prepare and upload the EBUCorePlus ontology to your graph database. For details, open the expanders.

...

Expand
titleUpload Demo Data

Follow these instructions to effectively populate your graph databases with instances of the EditorialObject within the EBUCorePlus ontology, using either the GraphDB Management Service's provided API endpoints or the enapso-graphdb-cli tool, which are explained below. Additionally, you can find the necessary TTL demo data here.

View file
nameeditorialObject_demoData.ttl

Note

When running the pull command, please note that if an image is already running and you pull the latest one, it will overwrite existing data in the knowledge graph repository, resetting it to the default state. To avoid losing your data, follow the guidelines on the provided /wiki/spaces/ENAPSODOCS/pages/2239528974 Confluence page to create a backup before pulling the latest image, and then restore your data afterward.

Upload Demo Data via enapso-graphdb-cli tool

Prerequisites

Refer to the prerequisite information above and follow the same procedure.

Installation

Refer to the installation information above and follow the same procedure.

Uploading Demo Data

Open the terminal, and navigate to the directory where the editorialObject_demoData.ttl file is located, or set the file path in the --sourcefile variable, and execute the following command to successfully upload the ontology

Code Block
enapsogdb import --dburl "http://localhost/fuseki" --repository "Test" --sourcefile "editorialObject_demoData.ttl" --format "text/turtle" --baseiri "http://www.ebu.ch/metadata/ontologies/ebucoreplus#" --context "http://www.ebu.ch/metadata/ontologies/ebucoreplus/demodata" --triplestore "fuseki"

enapso-graphdb-cli.png

Upload Demo Data via GraphDB Management Service's provided API

  1. Access Swagger Documentation: Navigate to the GraphDB Management Service documentation in your web browser.

  2. Editorial Object Demo Data: The above attached file, named editorialObject_demoData.ttl, contains the demo data for the Editorial Object.

  3. Upload the Ontology File: Utilize the upload-ontology-from-fileendpoint to upload the demo data to the graph database repository.

    • Click the Try it out button.

    • Fill out the following fields:

      • fileName: Select and upload your editorialObject_demoData.ttlontology file.

      • format: Specify the format as text/turtle.

      • baseIRI (Optional): Enter the base IRI for your ontology such as http://www.ebu.ch/metadata/ontologies/ebucoreplus#.

      • context (Optional): Define the context (also known as a named graph) for your demo data, such as http://www.ebu.ch/metadata/ontologies/ebucoreplus/demodata.

    • Execute the upload by clicking the Execute button.

      demo data.png

    • Upon execution, the response will indicate that the ontology has been successfully uploaded. You will see a message or a status code in the Swagger interface confirming the upload was successful.

      response.png

    • If you receive both HTTP 200 and HTTP 201 responses for similar requests, it means:

      • HTTP 200 is returned when you upload data that already exists in the graph database repository, indicating a successful overwrite.

      • HTTP 201 is returned when the upload adds new data to the graph database repository.

...