...
This guide outlines the steps to prepare and upload the EBUCorePlus
ontology to your graph database. Follow these instructions to ensure your graph database is properly set up to manage and utilize ontology data, from downloading the necessary files to configuring the upload through the GraphDB Management Service's endpoint.
Access Swagger Documentation: Navigate to the GraphDB Management Service documentation in your web browser.
Prepare Your Ontology File: Ensure the
ebucoreplus
ontology file is saved on your local machine. You can obtain the EBUCorePlus ontology from the EBU GitHub repository. Once you open the link, you will see the content of the ontology file displayed. To download it, locate theDownload
icon on the upper right side of the page and click on it. This will automatically save the file to the default download folder on your local machine.Clone EBUCorePlus Repository: If you want to clone the entire repository, ensure that Git is installed on your computer. You can check this by running
git --version
in your terminal. If Git is not installed, you will need to download and install it from the official Git website. Open your command prompt (CMD), and move to the directory where you want the repository to be cloned. You can do this by running the commandcd path/to/your/directory
, replacingpath/to/your/directory
with the path to the desired directory on your local machine. Once you're in the desired directory, run the following command to clone the repository:Code Block language bash git clone https://github.com/ebu/ebucoreplus.git
This will clone the entire ebucoreplus repository to your local machine.Add Uploading
Upload EBUCoreplus Ontology via
...
Upload the Ontology: Utilize the upload-ontology-from-file
endpoint to upload the ontology to the graph database repository.
Click the
Try it out
button.Fill out the following fields:
filename: Select and upload your
ebucoreplus
ontology 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#
. Using this base IRI helps ensure consistent referencing within your ontology. If you need to use a specific or different IRI, replace the default with your custom IRI. Enter the base IRI for your ontology.context (Optional): Define the context (also known as a named graph) for your ontology within the graph database repository. The context is an identifier that organizes data within the graph database, such as
http://www.ebu.ch/metadata/ontologies/ebucoreplus
. If the context field is left empty, behavior varies by triplestore:In Fuseki, data will be added to the default context
http://ont.enapso.com/default
.In GraphDB by Ontotext, data will be added to the graph database's default context, as described in their documentation.
Execute the upload by clicking the
Execute
button: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 successful upload.
If you receive both HTTP
200
and HTTP201
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.
Upload Demo Data
This guide outlines the steps to upload the demo data for the EditorialObject
to your graph database. 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. editorialObject_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 to create a backup before pulling the latest image, and then restore your data afterward. |
Upload Demo Data via enapso-graphdb-cli tool
Prerequisites
Ensure Node.js is installed on your machine. If not, install it from the Node.js official website. This installation includes npm (Node Package Manager), which manages Node packages.
After installation, verify that Node.js and npm are successfully installed by doing the following:
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.Run the command
npm -v
and press Enter. This will display the version of npm if it is installed.
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:
...
enapso-graphdb-cli tool
Prerequisites
Ensure Node.js is installed on your machine. If not, install it from the Node.js official website. This installation includes npm (Node Package Manager), which manages Node packages.
After installation, verify that Node.js and npm are successfully installed by doing the following:
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.Run the command
npm -v
and press Enter. This will display the version of npm if it is installed.
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:
Code Block |
---|
npm install -g @innotrade/enapso-graphdb-cli |
Uploading EBUCoreplus OntologyData
Open the terminal, and navigate to the directory where the ebucoreplus.owl
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 "ebucoreplus.owl" --format "text/turtle" --baseiri "http://www.ebu.ch/metadata/ontologies/ebucoreplus#" --context "http://www.ebu.ch/metadata/ontologies/ebucoreplus" --triplestore "fuseki" |
Upload EBUCoreplus Ontology via GraphDB Management Service's provided API
Access Swagger Documentation: Navigate to the GraphDB Management Service documentation in your web browser.
Add Uploading Ontology via CURL and CLI tool here.
Upload the Ontology: Utilize the
upload-ontology-from-file
endpoint to upload the ontology to the graph database repository.Click the
Try it out
button.Fill out the following fields:
fileName: Select and upload your
ebucoreplus
ontology 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#
. Using this base IRI helps ensure consistent referencing within your ontology. If you need to use a specific or different IRI, replace the default with your custom IRI. Enter the base IRI for your ontology.context (Optional): Define the context (also known as a named graph) for your ontology within the graph database repository. The context is an identifier that organizes data within the graph database, such as
http://www.ebu.ch/metadata/ontologies/ebucoreplus
. If the context field is left empty, behavior varies by triplestore:In Fuseki, data will be added to the default context
http://ont.enapso.com/default
.In GraphDB by Ontotext, data will be added to the graph database's default context, as described in their documentation.
Execute the upload by clicking the
Execute
button: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 successful upload.
If you receive both HTTP
200
and HTTP201
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.
Upload Demo Data
This guide outlines the steps to upload the demo data for the EditorialObject
to your graph database. 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. editorialObject_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 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
...
Access Swagger Documentation: Navigate to the GraphDB Management Service documentation in your web browser.
Editorial Object Demo Data: The above attached file, named
editorialObject_demoData.ttl
, contains the demo data for the Editorial Object.Upload the Ontology File: Utilize the
upload-ontology-from-file
endpoint 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.ttl
ontology 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.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.
If you receive both
HTTP 200
andHTTP 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.
CRUD Template Management
This section provides detailed instructions on how to generate CRUD (create
, read
, update
, delete
) templates for specific classes within your ontology using the View Management API. By following these steps, you can automate the creation of SPARQL templates that facilitate the management of instances of any specified class, such as the EditorialObject
from the EBUCorePlus
ontology. This process simplifies the implementation of CRUD operations in your graph database.
...