Rendering types for a predicate - view-a-LOD/Valeros GitHub Wiki

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]
TheNodeTypeComponent
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 theNodeTableCellComponent
, which is where all predicate render components are rendered by default. To show that this component requires explicit manual configuration, we use therequiresExplicitRendering
field.