Showing or hiding predicates - view-a-LOD/Valeros GitHub Wiki

In your dataset or ontology, some predicates might be more interesting for users to see than others.

This predicate visibility can be easily configured in config/settings.ts, and is divided into three main categories:

  1. Always show.
  2. Show under "details" tab.
  3. Never show.

Always show predicates, or show under "details" tab

_Files/Pasted image 20240709120415.png

In the predicateVisibility field of the config/settings.ts file, you can configure for specific predicates whether you want to always show them, show them in the "details" tab, or hide them:

predicateVisibility: {  
  [ViewMode.List]: {  
    [PredicateVisibility.Show]: [  
      'https://schema.org/author',  
      'http://www.nationaalarchief.nl/mdto#omschrijving',  
      'http://www.nationaalarchief.nl/mdto#dekkingInRuimte',  
      'http://www.nationaalarchief.nl/mdto#dekkingInTijd',  
      'http://www.nationaalarchief.nl/mdto#URLBestand',  
      'http://www.nationaalarchief.nl/mdto#heeftRepresentatie',  
      ...
    ],  
    [PredicateVisibility.Details]: ['*'],  
    [PredicateVisibility.Hide]: [] 
  }
}

Note that you can use the '*' wildcard to move all unspecified predicates into a specific PredicateVisibility category. In the example above, all the predicates that are not defined in the PredicateVisibility.Show list are automatically moved to the details view.

As an alternative example, if you want to simply show all fields by default:

predicateVisibility: {  
  [ViewMode.List]: {  
    [PredicateVisibility.Show]: ['*'],  
    [PredicateVisibility.Details]: [],  
    [PredicateVisibility.Hide]: []
  }
}

Hiding predicates

Sometimes, you might want to hide a predicate in the entire viewer. As an example, in MDTO, the mdto:checksum might not be interesting to show for end users. To hide the predicate, simply add it to the alwaysHidePredicates field in the config/settings.ts file:

alwaysHidePredicates: [  
  'http://www.nationaalarchief.nl/mdto#checksum',  
  'http://www.nationaalarchief.nl/mdto#waardering',
  ...
]