Schema View

The Graph Visualization library allows you to visualize a graph’s schema in the form of a property graph.

In order to enable schema view, you must configure the properties described in Schema View Configuration Parameters.

Once the schema view is enabled, it will appear along side the graph in the graph visualization panel as shown:

Figure: Visualizing Schema and Graph Views

Description of image follows

Description of the illustration schema_and_graph_view_viz.png

Schema View Modes

You can switch between Schema view, Graph view, or use both in the graph visualization panel using the toggle buttons in the toolbar.

Figure: Schema View Modes

Description of image follows

Description of the illustration schema_view_toggle.png

Depending on which toggle button is active the corresponding view will be displayed. The following describes more about the supported modes:

It is important to note that depending on your data and settings configurations, either the Schema or Graph view will be always enabled in the toolbar. If both the toggle buttons are manually turned off, then it automatically defaults to Graph view.

Schema Validation

In addition to rendering the schema of a graph, the Graph Visualization library automatically validates the provided graph data against the schema if one is available.

If the graph data conforms to the schema based on the defined validation rules (see Validation Rules), then the Graph Visualization library initializes without any problems. Also, in the absence of a schema, the Schema view will not be displayed, and the schema validations will not be executed.

If the schema validation fails, then the errors will be displayed in the following JSON format:

[{
    errorType : string              // Used by consuming application to summarize or detail the error
    entityType: 'vertex' | 'edge'   // Can be used to format the error message to specify the context
    entityId?: string               // Used to identify the entity in the message
    entityDescriptor?: string[]     // Used to represent name or labels of the entity in the message
    property?: string               // Name of the property that failed validation
    expectedType?: string           // Expected type of the property
    actualType?: string             // Actual type of the property
    message?: string                // Ready to use message if no further customization is needed at the consuming side
}]

The consuming applications can then use the message property to obtain the complete message for display on its interface. They can also derive their own custom message, summarize errors, or categorize errors using errorType and other properties provided in the error message.

Schema View Configuration Parameters

In order to enable Schema View in your visualization, you must configure a few related properties.

The following properties control the behavior of Schema View:

Validation Rules

The graph data must conform to the schema based on the certain validation rules.

The graph data is validated against the schema by verifying the following rules: