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.

...

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

...

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

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

...

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.

...