Data View Document Reference
Technical reference for Data View documents. Covers the DataViewDocument structure, node positions, style overrides, view settings, and the published data format.
A Data View is stored as a .data-view.json file with fileType: "data-view". The document references the central model for entity data and a profile (database or search) for type resolution. This page documents the complete schema for Data View documents.
DataViewDocument
The root interface for a Data View file.
interface DataViewDocument {
schemaVersion: '2.0.0';
meta: { generator: string; generatorVersion: string };
id: string;
title: string;
description?: string;
fileType: 'data-view';
/** View purpose: determines profile type and overlay columns */
viewMode: 'persistence' | 'search';
/** Path to the central model (model.neoarc) */
modelFilePath: string;
/** Which model entities this view includes */
includedEntityIds: string[];
/** Lifecycle status filter */
statusFilter?: ('active' | 'planned' | 'deprecated')[];
/** Database profile ID (used when viewMode === 'persistence') */
databaseProfileId?: string;
/** Search profile ID (used when viewMode === 'search') */
searchProfileId?: string;
/** Per-node positions on the graph canvas */
nodePositions: Record<string, {
x: number;
y: number;
isPinned?: boolean;
}>;
/** Per-node style overrides */
styleOverrides?: Record<string, {
color?: string;
borderColor?: string;
textColor?: string;
}>;
/** Groups (filtered from model groups) */
groups?: DataViewGroup[];
/** Force simulation settings */
viewSettings?: {
nodeSpacing?: number;
centerStrength?: number;
linkDistanceMultiplier?: number;
repulsionStrength?: number;
};
createdDate: string;
modifiedDate: string;
}
| Field | Type | Description |
|---|---|---|
| fileType | "data-view" | Discriminator identifying this as a Data View document |
| viewMode | "persistence" | "search" | Determines the profile type and Entity Overlay column set |
| modelFilePath | string | Relative path to the central model (model.neoarc) |
| includedEntityIds | string[] | Array of model entity node IDs that this view displays |
| databaseProfileId | string? | Database profile ID for persistence mode type/name resolution |
| searchProfileId | string? | Search profile ID for search mode type/name resolution |
| nodePositions | Record<string, {x, y, isPinned?}> | Per-node positions and pinning state on the graph canvas |
| styleOverrides | Record<string, {color?, borderColor?, textColor?}>? | Per-node visual overrides |
| groups | DataViewGroup[]? | Groups filtered from the model, with optional colour overrides |
| viewSettings | object? | Force simulation parameters including nodeSpacing (1-10) |
DataViewGroup
Groups provide visual clustering on the graph canvas. They are derived from model groups, filtered to include only entities selected for this view.
interface DataViewGroup {
id: string;
name: string;
nodeIds: string[];
color?: string;
description?: string;
}
View Settings
Force simulation parameters that control graph layout behaviour.
| Setting | Type | Default | Description |
|---|---|---|---|
| nodeSpacing | number (1-10) | 5 | Controls the charge repulsion between nodes. Higher values spread nodes further apart. Adjustable via the slider control. |
| centerStrength | number (0-1) | 0.1 | Central gravity that pulls nodes towards the canvas centre |
| linkDistanceMultiplier | number | 1.0 | Multiplier for the ideal distance between connected nodes |
| repulsionStrength | number | -300 | Base repulsive force between all nodes |
Persistence Mode Overlay Columns
When viewMode is "persistence", the Entity Overlay displays these columns for each property.
| Column | Source |
|---|---|
| Key | Property keyRole (PK, FK, NK, SK, CP badge) |
| Field | Property name, formatted by database profile naming convention |
| Type | Abstract type resolved to concrete type via database profile |
| Nullable | Property nullable flag |
| Unique | Property unique flag |
| Default | Property defaultValue |
| FK Ref | Foreign key target entity.property from fkResolution |
| Constraints | Property constraints list |
| Index | Property index name |
| Comments | Property description |
Search Mode Overlay Columns
When viewMode is "search", the Entity Overlay displays these columns for each property with a search projection.
| Column | Source |
|---|---|
| Key | Search projection key flag |
| Field | Resolved via search profile naming convention |
| Type | Resolved via search profile type mapping |
| Searchable | Search projection searchBehaviours includes 'searchable' |
| Filterable | Search projection searchBehaviours includes 'filterable' |
| Sortable | Search projection searchBehaviours includes 'sortable' |
| Facetable | Search projection searchBehaviours includes 'facetable' |
| Retrievable | Search projection searchBehaviours includes 'retrievable' |
| Analyser | Per-profile override or base analyser value |
| Boost | Search projection boost value |
FK Edge Inference
Edges on the graph canvas are not authored manually. They are inferred from the model's relationship data.
Empty Document Template
A newly created Data View starts with the following structure.
{
"schemaVersion": "2.0.0",
"meta": { "generator": "NeoArc Studio", "generatorVersion": "1.0.0" },
"id": "",
"title": "",
"description": "",
"fileType": "data-view",
"viewMode": "persistence",
"modelFilePath": "",
"databaseProfileId": "",
"includedEntityIds": [],
"nodePositions": {},
"groups": [],
"viewSettings": {
"nodeSpacing": 5
},
"createdDate": "...",
"modifiedDate": "..."
}