Custom class metadata configuration

Custom class metadata configuration

Colours, link directions, class labels, the property display order can be altered by setting custom class metadata.

DFRNT provides a special section called "metadata" to define custom behaviours for types and traits. Although these behaviours cannot yet be accessed through the user interface, they can be manually set. To define custom behaviours for a class, simply include the key "DFRNT" in the "@metadata" section and choose from the keys listed below:
 
reversedEdgeDirection: ["myProperty1", "myProperty2"]
If you have properties called myProperty1 and myProperty2 that are defined as links to other types, you can reverse the direction of the links in visualisations. By default, all links go "out" from a record to another record. However, if you include a property in the propertyReversedEdgeDirection, the direction will be reversed and go "in" to the record from the linked record.
 
hexRgbBackground: "#123456"
By using the hexRgbBackground key, you can customise the default colour of a type when it is displayed in a graph. Normally, the colors are automatically chosen based on a hash with constant luminance. However, with hexRgbBackground, you have the ability to set a custom colour for your type.
 
labelOverride: "My Custom Type Name"
By setting a labelOverride, the class name will be overridden in the DFRNT user interface. This provides a convenient way to customise the display name of a class according to your preference.
Instead of using the default class name, you can choose a more descriptive or meaningful label that accurately represents the purpose or content of the class. This can be particularly useful when working with complex data models or when the default class names are not intuitive.
With the ability to override the label, you can ensure that the class names in the DFRNT user interface align with your specific requirements.
 
propertyDisplayOrder: ["myProperty1", "myProperty2"]
If you set the propertyDisplayOrder, the properties in the record navigator will be displayed in the order you specify. This allows you to customise the display order of properties according to your preference.
Additionally, if a property is not included in the propertyDisplayOrder, it will be hidden from the navigator, allowing you to selectively hide certain keys from being displayed.
    • Related Articles

    • Changing the default display label property

      Apply specific @metadata to make DFRNT use a different property than "label" for search and display purposes. The system has a default property called "label" that is used for record labels. However, it is possible to change which property is used. ...
    • Overview of DFRNT data modelling

      The data model in DFRNT data products follows the TerminusDB graph metamodel 1:1, and enables easy data modelling and advanced visualisation The data modelling capabilities of DFRNT.com involves five categories of data structures: Records, ...
    • Use TerminusCMS data products in DFRNT

      Additionally to DFRNT hosted data products, you can connect and collaborate directly on data products hosted at TerminusCMS from DFRNT, using TerminusDB API keys. DFRNT.com helps you manage data products that are either hosted in DFRNT through the ...
    • Render and browse records as Markdown documents, together with inbound and outbound links

      Data in DFRNT can be browsed like a wiki, complete with inbound and outbound links so that data can be navigated freely and for exploration with Markdown for rich text. Document contents can be viewed by opening a record through the canvas, or by ...
    • The DFRNT Data Product Builder

      DFRNT is a data product builder with knowledge graph visualisation, modelling and management, with version control, API access and a datalog engine. With DFRNT data products, digital architects, cybersecurity professionals, data practitioners and ...