Skip to main content
Version: v0.1.0

Schema Editor

The Schema Editor is a tool for editing the structure of ontology entities and relationships in various ways. It supports three modes: visual UI-based editing, direct JSON editing, and bulk registration via CSV files.

Editing Mode Overview

ModePurposeBest For
UI ModeVisually edit entities and relationshipsSmall-scale schema design, structure review
JSON ModeWrite schemas directly as JSON textPrecise schema control, copy/paste of existing schemas
CSV ModeBulk register entities and relationships via CSV filesRegistering large numbers of entities/relationships at once
Switching Modes

Click the tabs at the top of the editor to switch modes. Content written in one mode is preserved when switching to another mode.

UI Mode

Edit schemas using the same visual interface as the Ontology Builder.

Editing Entities

  1. Click an entity node on the canvas to select it.
  2. In the right properties panel, you can edit the following items:
    • Name: Entity label (e.g., Person, Product)
    • Description: A description of the entity
    • Property List: Property names, data types, required status

Editing Relationships

  1. Click a relationship (arrow) on the canvas to select it.
  2. In the properties panel, you can edit the following items:
    • Relationship Type: Relationship name (e.g., PURCHASED, WORKS_FOR)
    • Direction: Source → Target direction
    • Property List: Properties to assign to the relationship

JSON Mode

Write or modify the ontology schema directly in JSON format. This is useful when pasting schemas written externally, or exporting an existing schema, modifying it, and reapplying it.

JSON Schema Structure

{
"entities": [
{
"name": "Customer",
"description": "Customer information",
"properties": [
{ "name": "id", "type": "STRING", "required": true },
{ "name": "name", "type": "STRING", "required": true },
{ "name": "email", "type": "STRING", "required": false }
]
}
],
"relationships": [
{
"type": "PURCHASED",
"source": "Customer",
"target": "Product",
"properties": [
{ "name": "purchase_date", "type": "DATE" }
]
}
]
}

Key Features

  • Syntax Validation: Displays syntax errors in real-time as you enter JSON.
  • Auto-completion: Auto-completes keywords such as property types (STRING, INTEGER, FLOAT, BOOLEAN, DATE).
  • Import/Export: Export the current schema as a JSON file, or import an external JSON file.
Required Fields

entities[].name, relationships[].type, relationships[].source, and relationships[].target are required fields. Omitting them will result in a validation error.

CSV Mode

Upload CSV files to bulk register entities and relationships. This allows you to quickly apply large schema definitions created in spreadsheets.

Entity CSV Format

ColumnRequiredDescription
entity_nameYEntity name
property_nameYProperty name
property_typeYData type (STRING, INTEGER, FLOAT, BOOLEAN, DATE)
requiredNWhether required (true/false, default false)
descriptionNProperty description

Relationship CSV Format

ColumnRequiredDescription
relationship_typeYRelationship type name
source_entityYSource entity name
target_entityYTarget entity name
property_nameNRelationship property name
property_typeNRelationship property type

Upload Procedure

  1. Select the CSV tab in the editor.
  2. Click the Upload Entity CSV or Upload Relationship CSV button.
  3. Review the preview of the uploaded data.
  4. Click the Apply button to reflect it in the schema.
Merging with Existing Schema

When uploading a CSV, if an entity or relationship with the same name already exists, the properties will be merged. Existing properties are preserved and only new properties are added. If overwriting is needed, delete the existing items first.