-
Notifications
You must be signed in to change notification settings - Fork 8
Rendering types for a predicate

If you want to render certain objects as types, e.g., for the rdf:type predicate, you can add a NodeTypeComponent entry to the renderComponents/[RenderMode.ByPredicate] field in config/settings.ts:
[RenderMode.ByPredicate]: [{
component: NodeTypeComponent,
predicates: [
'http://www.w3.org/1999/02/22-rdf-syntax-ns#type',
'https://schema.org/additionalType',
'http://www.wikidata.org/entity/P31',
],
requiresExplicitRendering: true,
}],Note
The NodeTypeComponent is not a 'regular' predicate render component (see Rendering custom components for a predicate), but used elsewhere throughout the codebase as well. Because of this, its input properties do not match the expected default data structure, which means we need to explicitly define how to pass data to it in the NodeTableCellComponent, which is where all predicate render components are rendered by default. To show that this component requires explicit manual configuration, we use the requiresExplicitRendering field.
This project is still in the prototyping phase. If you have any questions, thoughts or feedback, please reach out to Simon Dirks (mail@simondirks.com).
- Rendering components by type
- Rendering components by predicate
- Pre-defined predicate render components