Loading The People Ontology Into AllegroGraph - mdebellis/SemanticKG-Design GitHub Wiki

Loading the People Ontology in AllegroGraph

This page walks you through how to:

  1. Create a repository in AllegroGraph
  2. Load the People Ontology
  3. Run AllegroGraph reasoning
  4. 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:

http://localhost:10035/

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.

  1. Click + CREATE REPOSITORY in the upper-right corner.

  2. In the form that appears, enter the following value:

    • Name of new repository*: People
  3. Accept the default values for the other options.

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

  1. Go to the ontology on GitHub:

    People Ontology

  2. Click Raw.

  3. Right-click the page and choose Save As....

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

  1. In the left panel, click Add, delete & import data. This option is near the top, just below Query.

  2. On the Choose action screen, click Import RDF from an uploaded file.

    This is the third option, after Add statements and Delete statements.

  3. On the Select file to import screen, click the box labeled Drag-N-Drop an RDF file or click here to select files.

  4. Use your operating system's file selector to locate the copy of the People Ontology that you saved locally.

  5. Expand Import Options.

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

  7. Accept the other default values.

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

  1. In the left panel, click Repository control.

  2. In the search box, type:

    Manage reasoning
    

    The search box may already contain a default value, probably your user name. Replace it with Manage reasoning.

  3. As you type, AllegroGraph should auto-complete and show Manage Reasoning as a link below the search bar.

  4. 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:

  1. In the left panel, click Gruff. It should appear near the bottom of the list of options.

  2. AllegroGraph should open Gruff for the People repository.

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