Ontology
Designer.
Why it exists
Pazator's entity model isn't hardcoded. The ontology designer lets you define what kinds of things exist in your data and what attributes they can have. Instead of a fixed schema, you get two flexible type systems that control how forms render, how data is displayed in chips and tiles, and how entities are categorised.
This is what makes Pazator adaptable to different intelligence domains — the same application can model persons of interest in one context and cargo shipments in another, just by changing the ontology.
Two Type Systems
Value Types (15 default)
Value types define categories of attributes that can be assigned to entities. These appear as dropdowns, autocomplete fields, and chip displays throughout the UI.
- gender, nationality, countryOfOrigin, immigrationStatus
- languages, ethnicity, religion, politicalViews
- maritalStatus, incomeLevel, educationLevel
- socialClass, threatLevel, workplace, hairColor
Entity Types (8 default)
Entity types define the categories of things that can exist as top-level records. Each has a label, plural form, icon (60 Font Awesome choices), and colour.
- Person, Organization, Vehicle, Location
- Event, Asset, Communication, Custom
UI Layout
The designer has two modes: tab (rendered in #ontologyTabContainer)
and overlay (fullscreen modal). The sidebar lists types; clicking one opens
the editor panel. A toggle switches the sidebar between value types and entity types.
Editing a Type
Each type's editor provides:
- Label / Plural — text inputs for display names. Entity types also have a plural field.
- Colour picker — native
<input type="color">, updates live. - Icon selector — dropdown of 60 Font Awesome icons.
- Values list — for value types only. Each value shows its name, parent hierarchy, and usage count. Values are draggable to reorder, inline-renameable via contentEditable, and deletable.
- Bulk add — textarea that splits on newlines to create multiple values at once.
- Parent assignment — hierarchy via a prompt-based numbered list of siblings.
- Delete type — with confirmation dialog.
Live Preview
A live preview panel updates on every change. For value types it shows: a simulated form field, detail panel chips (up to 6 with "+N" overflow), and an object tile. For entity types it shows a coloured badge with icon and an object explorer header tile.
Import / Export
The entire ontology can be exported as a JSON file (ontology_<timestamp>.json)
and re-imported. Import merges/replaces through pazatorObjects.importJSON(). Both
operations delegate to window.pazatorObjects, which manages the actual data storage.
Data Storage
All ontology data lives in window.pazatorObjects, which persists to localStorage
under pazator_objects_data, pazator_ontology_types, and
pazator_ontology_entity_types. The designer never accesses storage directly
— all CRUD goes through pazatorObjects methods.
What's Missing
No validation rules or constraints on values. You can't say "threatLevel must be one of None/Low/Medium/High/Critical" — that's enforced by the form code, not the ontology. The parent-child hierarchy is limited to one level (no grandchild relationships). The prompt()-based parent selector is functional but crude compared to a proper tree picker.
Entity type deletion doesn't check for existing entities using that type. Deleting "Vehicle" when you have 200 vehicle records will leave them orphaned with a missing type reference.