...
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. |
Here we already need to add that a backup is required, since a new pull overwrites existing data!
Code Block |
---|
|
docker pull registry.innotrade.com/innotrade/enapso-together-free |
...
This maps the container's port 80 to your local machine's port 80.
Resolving Port Conflicts
If you encounter a port conflict when attempting to run the Docker container for the ENAPSO together Free platform, you have an option to resolve it and access the service:
Change the Host Port
If port 80 is already in use on your machine, you can map the container's internal port (80) to a different port on your host. For example, if you choose to use port 8080 on your host, you can modify your Docker run command like this:
...
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 the Download
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 command cd path/to/your/directory
, replacing path/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 |
---|
|
git clone https://github.com/ebu/ebucoreplus.git |
This will clone the entire ebucoreplus repository to your local machine.
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 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.
...
Here we need to add the upload of an ontology via the enapso-cli tool!
This guide outlines the steps to upload the pre-formatted Turtle (TTL) 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.
View file |
---|
name | 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. |
Caution! Re-Pulling Docker Images leads to data loss!
Access Swagger Documentation: Navigate to the GraphDB Management Service documentation in your web browser.
Editorial Object Demo Data: Below is the provided Turtle-formatted demo data for the Editorial Object. This data includes predefined instances that demonstrate the use and structure of the Editorial Object within ebucoreplus ontology.
Expand |
---|
title | EditorialObject Escaped Demo Data |
---|
|
<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_7cdb7f1d-89e6-4cd7-8282-2740a43bf8e0>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"In 1989, a young man must protect his fragile mother, who just awoke from a coma, from learning that her beloved East Germany as she knew it has disappeared.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"The film combines comedy and drama elements, capturing the fall of the Berlin Wall and the transformation of East Germany through personal and poignant moments.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Various scenes depicting the comedic efforts to recreate East Germany in an apartment.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"Good Bye Lenin!\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_da44ec80-754e-436c-b4f8-322da13e00a1>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"A thrilling race against time, Lola has 20 minutes to find a large sum of money to save her boyfriend s life.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"The movie employs a ground-breaking narrative structure of three different outcomes based on the slightest changes in Lola s actions.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Fast-paced sequences with multiple repetitions of the 20-minute loop.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"Run Lola Run\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_26950b42-bea9-432c-bffc-a1b7eb9c25cf>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"In 1984 East Berlin, an agent of the secret police conducts surveillance on a writer and his lover but finds himself becoming increasingly absorbed by their lives.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"This drama explores themes of surveillance, privacy, and the moral decisions faced by individuals in a totalitarian state.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Intense surveillance scenes and emotional character development.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"The Lives of Others\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_9fe17ffb-afa1-4914-ab64-a8f41148b560>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"A historical drama detailing the rise and fall of the Red Army Faction, a radical left-wing terrorist group in 1970s West Germany.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"The film dives deep into the political climate of Germany during the time, portraying the motivations and consequences of radical activism.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Action-packed scenes of protests and confrontations with police.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"The Baader Meinhof Complex\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_f94cdb34-11c4-42b2-b992-b57384153827>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"A pioneering silent sci-fi film about a futuristic urban dystopia, where the wealthy elite live above ground while workers toil below.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"This 1927 film directed by Fritz Lang is known for its revolutionary visual style and special effects, setting standards for the science fiction genre.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Iconic scenes of the massive cityscapes and the robot transformation.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"Metropolis\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_a6769040-b5b0-4b08-a0a7-5992b71d710f>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"The crew of a German submarine during WWII experience the boredom, filth, and sheer terror of war beneath the waves.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"This intense submarine thriller is acclaimed for its realistic portrayal of the claustrophobic life of a wartime submarine crew.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Tense underwater sequences and the psychological strain on the crew.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"Das Boot\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_fd9e3d6c-2f46-411a-85b3-12053975f555>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"Depicts the final days of Adolf Hitler as seen through the eyes of his secretary, during the last days of the Third Reich in the bunker beneath Berlin.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"The film provides a detailed and harrowing look at the collapse of Hitler\u2019s regime and is renowned for Bruno Ganz s performance as Hitler.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Intense bunker scenes and the collapse of Berlin.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"Downfall\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_fd617f4d-cb77-4757-915d-8cce1043d52a>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"An angel in Berlin decides to become mortal after falling in love with a beautiful trapeze artist.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"This poetic film by Wim Wenders blends fantasy, romance, and philosophical musings on the human condition.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Scenes of angels observing the mundane and beautiful moments of human life.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"Wings of Desire\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_8ddb1303-3560-4878-899d-ada16657239b>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"This tragicomedy follows a day in the life of Niko, a college dropout, who navigates various social milieus and struggles with his direction in life.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"The film is shot in black and white, capturing the essence of contemporary Berlin while exploring themes of alienation and self-discovery.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Niko s wanderings through Berlin, encountering different people and situations.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"A Coffee in Berlin\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_b42a73b3-2018-4e44-82d2-31df4328b870>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"In a small German village before World War I, a series of disturbing events take place, hinting at the origins of fascism.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"This austere black-and-white film by Michael Haneke explores the roots of evil in a society poised on the brink of war.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Tension-filled scenes depicting mysterious accidents and the oppressive atmosphere of the village.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"The White Ribbon\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_052d0a16-4bfe-41db-a814-62e77cac76b6>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"A father tries to reconnect with his workaholic daughter by creating an outrageous alter ego and posing as her CEO s life coach.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"The film is a unique blend of comedy and drama, offering a poignant look at family relationships and personal priorities.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Humorous yet heartfelt encounters between the father in disguise and his daughter.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"Toni Erdmann\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_775a4b5a-83f9-4220-8296-6a177547fbba>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"A young Spanish woman who has newly moved to Berlin finds her flirtation with a local man turned potentially deadly as their night out with his friends reveals a dangerous secret.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"The entire film is famously shot in one single, continuous take, offering an immersive experience that heightens the tension and realism.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"The continuous shot that captures the escalating night from fun to danger.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"Victoria\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_2eef8910-1ff0-45ec-a66e-14b6068947cd>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"Three young anti-capitalist activists break into wealthy homes as a form of protest, leaving behind messages for the homeowners, until one heist goes wrong.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"This film combines elements of drama, romance, and political activism, exploring the consequences of idealism in a capitalist society.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Scenes of the activists planning and executing their unique form of protest.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"The Edukators\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_4ae1e5dd-58df-40bc-b413-42acfa733e34>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"True story of Sophie Scholl, a member of the non-violent anti-Nazi resistance group The White Rose, focusing on her arrest and trial in 1943.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"The film is a gripping narrative of courage and conviction in the face of totalitarian oppression.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Dramatic courtroom scenes and the portrayal of Sophie s defiance.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"Sophie Scholl \u2013 The Final Days\".\r\n\r\n<http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus\/data\/EditorialObject_789eced0-aa96-491c-80c9-b9914791f213>\r\n a <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#EditorialObject>;\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#contentDescription> \"In 1980s East Germany, a doctor is banished to a small country hospital as punishment for applying for an exit visa. As she plans her escape to the West, she becomes entangled with another doctor.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#productionSynopsis> \"This film delicately explores the theme of freedom versus responsibility in a tightly controlled society.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#shotLog> \"Scenes highlighting the tension between the doctors and the oppressive surveillance.\";\r\n <http:\/\/www.ebu.ch\/metadata\/ontologies\/ebucoreplus#title> \"Barbara\".\r\n
|
...
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.
Image AddedRun the command npm -v
and press Enter. This will display the version of npm if it is installed.
Image Added
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 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" |
Image Added
Upload Demo Data via GraphDB Management Service's provided API
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:
fileData: Copy the Turtle text from the EditorialObject Escaped Demo Data
section and paste it against the fileData
key. Make sure to include the entire text block to preserve the integrity of the datafilename: 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.
Image RemovedImage AddedUpon 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 that the upload was successful.
Image AddedIf 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.
Image Removed
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.
...