Config: Facets

Facets config are defined per graph to browse the content of a named graph using a faceted browser interface. The 'generic' facet config will be used if no specific config is defined for a graph. For facets config, you have to change the following parameters in configs/facets.js:

Parameter Description Example value
list List of all properties for which a facet needs to be created. ['http://www.w3.org/1999/02/22-rdf-syntax-ns#type', 'http://risis.eu/cordisH2020/vocab/fundingScheme', 'http://rdf-vocabulary.ddialliance.org/discovery#startDate']
If you want to use a chain of properties in the faceted browser, use '->' when specifiying the URIs of the properties in your list. For example, 'ex:address->geo:geo'
If you want to use a chain of properties scattered around multiple graph names, use '[graphURI]' when specifiying the URIs of the properties in your list. For example, 'ex:orcidID->[http://orcid.org]rdfs:label' . If the property initiates from a graph other than the original one, you can use '[]->' operator. For example '[http://anothergraph2323.com]->rdf:label'
If you want to use a chain of properties scattered around multiple graph names and multiple SPARQL endpoints, use '[endpointURI>>graphURI]' when specifiying the URIs of the properties in your list. For example, 'ex:orcidID->[http://myendpoint.com>>http://orcid.org]rdfs:label'.
If you want to employ a linkset as an intermediate graph when defining a facet, it should be in the first property of the chain with source and target properties separated by '||' e.g. [http://linksetGraph.com]ldr:source||ldr:target->[http://targetGraph]->ldr:intenedProperty.

After defining the above list of facets, users can define specific configs for each facet property by using the URI of the property. These configs are similar to normal reactors config and can overwrite them in the faceted browser. Main facets configs are as following:

Parameter Description Example value
objectBrowser Specifies which browser component to use to render the values of a facet property. ['CheckboxItem']
objectIViewer Specifies which viewer component to use to render the values of a facet property. ['TwoLetterCountryView']
hasLinkedValue Will create a link to view each value of the facets property. If you want to link to another dataset than the current one, you should also add 'containerDatasetURI' config here. 1
position can be used to render the selected properties based on a given order. 0
category can be used to group selected properties in an accordion menu. ''
isHidden can be used to hide a selected property. 0
dispayQueries shows the generated queries for each facet. 0
allowRangeOfValues shows a range component to filter by min and max values. 0
restrictAnalysisToSelected in case of multiple value for a property, can be used to restrict the presented value of the selected properties for analysis only to the selected values. This setting might affect the query performance! 0
pivotDataset gets the URI of an existing dataset and then allows users to dive into the facet taking into account the current query constraints. 0

A sample config is provided at configs/facets.sample.js. Each component might have its own proprietary configs. You can find the list of proprietary configs for components in Components section.


Edit page on Github