How to Use An Leabharlann Ghealach
Welcome to An Leabharlann Ghealach, a database for Irish and Celtic source texts. This website will allow users to log and cite texts, keep track of secondary analyses, and discover new texts in the network. An Leabharlann will help keep track of all editions and translations of a text and where they can be found online.
Directory
1. A Graph Database
Neo4j is a graph database language designed to store data as nodes, and connections between data as relationships. Unlike traditional databases that use tables, Neo4j organizes data into a graph structure, making it ideal for representing complex relationships, such as those between authors, texts, editions, publishers, websites, and text versions in this application.
- Nodes: Represent entities like Authors, Texts, or Publishers. Any data which might have multiple data points under it should be a node with properties. Each node has labels (e.g., 'Author', 'Text') and properties (e.g., 'name: "Jane Doe"').
- Relationships: Connect nodes through relationships like A 'WROTE' B or C 'PUBLISHED' D, allowing us to model how entities are related.
A node has properties, and a relationship connects nodes. For example, if we had a node for Homer, it would look like this:
graph LR
H(("Author
name: Homer
born: 8th c. BC")):::entity
classDef entity fill:#f9f9f9,stroke:#333,stroke-width:1px;
And if we had a node for the Iliad, it could look like this:
graph LR
I(("Text
title: The Iliad
language: Ancient Greek")):::entity
classDef entity fill:#f9f9f9,stroke:#333,stroke-width:1px;
Then we could relate them by saying that Homer WROTE The Iliad:
graph LR
%% Define two circular nodes with multi-line labels
H(("Author
name: Homer
born: 8th c. BC")):::entity
I(("Text
title: The Iliad
language: Ancient Greek")):::entity
%% Connect them with a labeled arrow
H -->|WROTE| I
%% Style all .entity nodes
classDef entity fill:#f9f9f9,stroke:#333,stroke-width:1px;
You can see that each node is given a label, here "Author" and "Text". The name of the author and title of the text are properties stored within a node. All nodes have labels telling you what they are, while the properties of a node tell you about the data stored within. So Homer IS AN Author, and the Iliad IS A Text. This feature will become useful later when we discuss searching through the database. Note that a node can have an arbitrary number of labels, e.g. James Clarence Mangan IS AN Author and IS A Translator.
2. How is This Database Laid Out?
Due to the complexity of relationships in the humanities, no rigid structure could ever capture the unruly relationships of a humanities database without itself becoming unruly. But Neo4j allows users to set relationships that could be unique, as well as relationships that are extremely common. To capture all of these, users can create many different labels to suit their needs.
A node consists of a label and a list of properties and their values.
Node Labels:
- Author: Represents authors with properties like 'name' (e.g., 'name: "Homer"').
- Text: Represents works (e.g., books, poems) with properties like 'title'.
- Edition: Represents specific editions of texts with properties like 'title' or 'publication_date'.
- For example, the Audacht Morainn is a medieval Irish document. It is a Text. But Fergus Kelly's 1970 translation of the Audacht Morainn is an Edition and a Translation of that Text, not a Text itself. The two are connected with an EDITION_OF relationship.
graph LR
%% Nodes
E(("Edition
title: Audacht Morainn
publication_date: 1970")):::edition
T(("Text
title: Audacht Morainn")):::text
F(("Author Translator
name: Fergus Kelly")):::person
%% Relationships
E -->|EDITION_OF| T
F -->|WROTE| E
F -->|TRANSLATED| T
%% Styling
classDef edition fill:#f9f9f9,stroke:#333,stroke-width:1px;
classDef text fill:#f9f9f9,stroke:#333,stroke-width:1px;
classDef person fill:#f9f9f9,stroke:#333,stroke-width:1px;
- Publisher: Represents publishing companies, either commercial (Penguin Random House) or academic (Cambridge University Press).
- Book: Represents physical books, and no other medium. A Book is always also an Edition, with added properties like 'ISBN'.
- Webpage: Represents a single webpage, displaying a Text's contents, a page of a manuscript, or anything else on a single webpage.
- Website: Represents a website hosting many webpages or which is otherwise prominent, e.g. the Corpus of Electronic Texts (CELT) which hosts dozens of valuable webpages, or the British Museum (www.britishmuseum.org), which hosts many webpages for individual artifacts.
- Etc...
Properties:
- Each node has a unique 'nodeId' and a 'createdBy' property (the username of the creator).
- Custom properties (e.g., 'name', 'title', 'isbn') can be added as needed, as determined by the user. Must use letters, numbers, or underscores.
Relationships:
- Examples include `WROTE` (Author to Text), `PUBLISHED` (Publisher to Edition), or custom types the user can define.
- Relationships connect nodes directionally (e.g., Author → Text) and are displayed as related nodes on info pages.
Constraints: The database enforces a uniqueness or existence constraint in certain vital node properties. For example, every node must have a unique 'nodeId' property to ensure each node has a valid identifier, and all Author nodes must have a 'name' property, etc...
This structure allows a user to create a flexible layout that captures many possible interactions between texts and their authors, publishers, versions, manuscripts, etc., in a way that is navigable and understandable.
3. Logging In and Registering
Many features, such as creating, editing, or deleting content, require you to be logged in.
- Access the Login Form: Click the "Account" link in the top-right corner of any page.
- Log In:
- Enter your username and password in the login form.
- Click "Log In". If successful, the "Account" link will show your username with a dropdown to log out.
- If you encounter an error (e.g., "Invalid credentials"), double-check your username and password.
- Register:
- Click the "Register" link in the login form to go to the registration page.
- Fill out the form with a unique username and password, then submit.
- Return to the login form to sign in with your new credentials.
- Log Out: Click your username in the top-right corner and select "Log out" from the dropdown.
4. Exploring the Homepage
The homepage (index.html) displays lists of nodes organized by labels, such as Authors, Texts, and Editions.
- Default Columns: By default, you’ll see three columns for Authors, Texts, and Editions, each listing nodes of that type.
- Node Links: Click any node name (e.g., an author’s name) to view its details on the node info page.
- Create Nodes: If logged in, a "+" button appears next to each column title, linking to a form to create a new node of that type.
- Customize Columns: Add or remove columns to display different node types (see Customizing Homepage Columns).
5. Searching for Nodes
Use the search bar at the top of any page to find nodes.
- Enter a search term (e.g., an author’s name) in the search bar.
- Press the "Search" button or hit Enter.
- If a matching Author node is found, you’ll be redirected to its details page. Otherwise, an error message like "No results found" will appear.
6. Viewing Node Details
The node info page (info.html) displays details about a specific node, such as an Author, Text, or Edition.
- Node Properties: View the node’s properties (e.g., name, title) in a table on the right.
- Relationships: See lists of outgoing and incoming relationships (e.g., "WROTE → Book Title") below the node title.
- Actions: If logged in, you can:
7. Creating a New Node
Authenticated users can create new nodes (e.g., Authors, Texts) from the homepage.
- Log in (see Logging In).
- Go to the homepage and find the "+" button next to a column title (e.g., "Authors").
- Click the "+" button to go to the create form for that node type.
- Fill out the form:
- Labels: Specify one or more labels (e.g., "Author"). All nodes automatically get the "Entity" label.
- Properties: Add properties like `name` or `title` (e.g., `name: "Jane Doe"` for an Author).
- Submit the form. If successful, you’ll be redirected to the new node’s details page.
- Error Handling: If you see an error (e.g., "Invalid label format"), ensure labels and properties use only letters, numbers, or underscores, and avoid reserved names like `nodeId` or `createdBy`.
8. Editing Node Properties
Modify a node’s properties from its details page.
- Log in and navigate to a node’s details page (e.g., via search or homepage links).
- Click the "Edit Properties" button below the node title.
- In the form:
- Edit existing property values (e.g., change `name` from "Jane Doe" to "Jane Smith").
- Add new properties by clicking "Add Property" and entering a name and value.
- Delete a property by clicking its "Delete" button in the details table.
- Click "Update Properties" to save changes or "Cancel" to discard them.
- Error Handling: If you see an error (e.g., "Property names can only contain letters, numbers, underscores"), adjust the property name and try again.
9. Deleting a Node
Delete a node and all its relationships from its details page.
- Log in and navigate to the node’s details page.
- Click the "Delete Node" button (red, next to "Edit Properties").
- Confirm the deletion in the pop-up dialog, which warns that all relationships will also be deleted.
- If successful, you’ll be redirected to the homepage. If an error occurs (e.g., "You can only delete nodes you created"), you’ll see a message below the form.
- Note: Only the node’s creator or an admin can delete it.
10. Managing Relationships
Create or delete relationships between nodes on the node details page.
- Create a Relationship:
- Log in and go to a node’s details page.
- Click the "Create Relationship" button.
- In the form, select the target node and relationship type (e.g., "WROTE" to a Text node).
- Submit to create the relationship. The page will refresh to show the new relationship.
- Delete a Relationship:
- In the "Outgoing Relationships" or "Incoming Relationships" section, find the relationship (e.g., "WROTE → Book Title").
- Click the "Delete" button next to it and confirm in the pop-up.
- The page will refresh, removing the relationship.
- Note: Only the relationship’s creator or an admin can delete it.
11. Customizing Homepage Columns
Adjust the node types displayed on the homepage.
- View Default Columns: The homepage shows Authors, Texts, and Editions by default.
- Add a Column:
- Log in to see the "Add Column" dropdown above the columns.
- Select a label (e.g., "Publisher") from the dropdown and click "Add".
- A new column will appear with nodes of that label.
- Remove a Column:
- Click the "Remove" button next to a column’s title (not available for default columns unless additional columns are added).
- The column will disappear, and its label will return to the "Add Column" dropdown.
- Note: The homepage always shows at least three columns (Authors, Texts, Editions) to maintain a consistent layout.
12. Troubleshooting
- Login Issues: Ensure your username and password are correct. If you can’t log in, try registering a new account or resetting your password (if available).
- Search Returns No Results: Check your spelling or try broader terms.
- Permission Errors: You can only edit/delete nodes or relationships you created, unless you’re an admin.
- Page Not Loading: If you see a "Loading…" message or errors, check your internet connection or try refreshing. The app is hosted on Render’s free tier, so occasional delays may occur.
- Contact Support: If issues persist, contact the administrator (@ogmios on Twitter).
Labels
A list of all labels currently used:
-
Author
-
Used for all people who write, edit, or translate a Text.
-
Text
-
A Text is the pure form of a document or writing, the Platonic ideal of a text, not associated with any edition or translation.
For example, the Iliad is a Text, written by Homer. Robert Fagles' 1990 book titled "The Iliad" by Homer, published by Penguin Classics, in which he translates the epic into English, is also the Iliad by Homer, but not the pure Text itself. Rather, it is an Edition and Translation of the Text.
The Text is an umbrella category under which are organized all other nodes related to that Text.