Loading The People Ontology Into AllegroGraph - mdebellis/SemanticKG-Design GitHub Wiki
Loading the People Ontology in AllegroGraph
This page walks you through how to:
- Create a repository in AllegroGraph
- Load the People Ontology
- Run AllegroGraph reasoning
- Launch Gruff for advanced SPARQL exploration
Note: Earlier versions of this exercise used AllegroGraph's Traditional Web View. Franz no longer supports that view. These instructions use the current AllegroGraph user interface.
Step 1: Open AllegroGraph
If you are using AllegroGraph Cloud, go to:
https://allegrograph.cloud/signin
If you are using Docker, make sure your container is running. If you followed the earlier instructions, start it with:
docker start agraph
Then open AllegroGraph in your browser at:
Log in using the credentials you created when you set up AllegroGraph. If you used the defaults from the earlier Docker exercise, they are:
- Username:
test - Password:
xyzzy
If you need help getting access to the Community (Free) version of AllegroGraph go here: Getting Access to the Community Version of AllegroGraph
Step 2: Create a New Repository
After you log in, AllegroGraph should take you to the root page.
-
Click + CREATE REPOSITORY in the upper-right corner.
-
In the form that appears, enter the following value:
- Name of new repository*:
People
- Name of new repository*:
-
Accept the default values for the other options.
-
Click CREATE & OPEN in the lower-right corner.
AllegroGraph should create the repository and open it.
Step 3: Download the People Ontology
Important: Due to how GitHub serves URLs, it is best to download the ontology file to your computer first rather than trying to load it directly from the GitHub page.
-
Go to the ontology on GitHub:
-
Click Raw.
-
Right-click the page and choose Save As....
-
Save the file to your desktop or another folder that will be easy to find.
Alternatively, you can clone the full GitHub repository if you are comfortable using Git.
Step 4: Import the People Ontology
After creating and opening the People repository, AllegroGraph displays several options for populating and using the repository.
-
In the left panel, click Add, delete & import data. This option is near the top, just below Query.
-
On the Choose action screen, click Import RDF from an uploaded file.
This is the third option, after Add statements and Delete statements.
-
On the Select file to import screen, click the box labeled Drag-N-Drop an RDF file or click here to select files.
-
Use your operating system's file selector to locate the copy of the People Ontology that you saved locally.
-
Expand Import Options.
-
Change the format from Format: Auto-detect to Turtle.
When you click Auto-detect, AllegroGraph shows a list of possible formats. Turtle should be near the bottom.
-
Accept the other default values.
-
Click VERIFY & IMPORT FILE.
You should see a message similar to:
Success: 2319 statements were imported successfully!
The exact number of imported statements may differ slightly if the ontology has been revised.
Step 5: Run Reasoning
Next, run AllegroGraph reasoning so that inferred triples are generated.
-
In the left panel, click Repository control.
-
In the search box, type:
Manage reasoningThe search box may already contain a default value, probably your user name. Replace it with
Manage reasoning. -
As you type, AllegroGraph should auto-complete and show Manage Reasoning as a link below the search bar.
-
Click Manage Reasoning.
You should see a message similar to:
Success: Generated 2901 triples!
Again, the exact number may differ slightly if the ontology has been revised.
Step 6: Launch Gruff
To explore the ontology visually and run more advanced SPARQL queries:
-
In the left panel, click Gruff. It should appear near the bottom of the list of options.
-
AllegroGraph should open Gruff for the
Peoplerepository.
In Gruff, you can:
- Explore classes and individuals visually
- Write and run advanced SPARQL queries, including
CONSTRUCT,INSERT, and transitive-path queries - Query both explicit and inferred triples
Tip: Gruff is especially useful for queries that go beyond what Snap SPARQL or Protege are designed to support.
That's it! You have created a repository, loaded the People Ontology, generated inferred triples, and opened the repository in Gruff.
To continue, go to the next exercise: Exploring SPARQL Queries in Gruff