Config: Reactors

ld-reactor scopes

Configs are defined per scope. A scope is one of the 15 combinations of 'dataset', 'resource', 'property' and 'object' hierarchies. The configuration is shaped from traversing the less-specific scope to the more-specific scope.
The 'generic' config for each scope will be used if no specific config is defined for a graph. For each scope, you need to change the following parameters in configs/reactor.js:

Dataset Level

Parameter Description Example value
datasetReactor Selects the right component for handling a dataset. ['Dataset']
resourceFocusType Use this, if you want to focus on properties of specific resource types (i.e. RDF Classes). Multiple entity types can be also set. If no value is set, all existing entity types will be shown. ['http://rdfs.org/ns/void#Dataset']
resourceLabelProperty Use this, if you want to use the value of a specific property as label for your resources. ['http://purl.org/dc/terms/title']
resourceLanguageTag Use this, if you want to use a specific language tag for the labels of your resources. ['en']
resourceImageProperty Use this, if you want to use the value of a specific property as image for your resources. ['http://xmlns.com/foaf/0.1/depiction']
resourceGeoProperty Use this, if you want to use the value of a specific property as geo coordinates/shape of your resources. ['http://geovocab.org/geometry#geometry']
datasetLabel specifies a title for the dataset to be shown instead of the graph URI. ['My Dataset Title']
metadata adds a link to the metadata related to this dataset. ['http://ld-r.org/about']
maxNumberOfResourcesOnPage Indicates the maximum number of resources per dataset to be shown on page. 20
readOnly If set to '1', will disable editing property values of a specific dataset. 0
isHidden can be used to hide a dataset. 0
hasLimitedAccess can be used to restrict access to a certain dataset (admin only feature!). 0
constraint allows to add some pre-filters on a dataset e.g. to allow browsing only a sample of dataset. blank node with property value pairs
allowResourceNew allows to add new resources to editable datasets. 0
allowResourceDelete allows to delete resources from editable datasets. 0
allowResourceClone allows cloning resources in editable datasets. 0
templateResource allows to use an existing resource as template for the new resources. null

Resource Level

Parameter Description Example value
resourceReactor Selects the right component for handling resources. ['Resource']
readOnly If set to '1', will disable editing property values of a specific resource. 0
usePropertyCategories If set to '1', you can categorize properties in different tabs. It is required to define the list of categories beforehand by using categories. 1
propertyCategories List of categories to be used. ['general', 'content', 'structural']
dynamicResourceDomain used when creating random URIs for resources. ['http://example.org']
treatAsResourceType If set to '1', will treat the resource URI as type for the resource which allows defining scopes based on resource types. 1

Property Level

Parameter Description Example value
propertyReactor Selects the right component for handling properties. Can be set to either 'IndividualProperty' or 'AggregateProperty'. ['IndividualProperty']
readOnly If set to '1', will disable editing property values. 0
category If useCategories is set to '1', here you have to mention the category name from the list of categories. ['general']
label Label for the property. If not set, the exact property name for its URI will be used. ['Dataset Title']
hint A hint for the property which will be shown in the popover. ['The title of the dataset described by this document.']
isHidden Hide the property. 1
defaultValue default value for the corresponding component. default
allowNewValue If set to '1', will allow adding new objects to a given property. 1
delimitedBy In case of allowing new values to be added, this delimiter e.g. ',' will split the given new value to multiple separated values.
allowExtension If set to '1', will allow adding new properties to a given object (works only for URI object values). You can specify the list of property extensions and their config in extensions. 1
hasBlankNode If set to '1', will hide the object value of the blank node property on view/edit. 1
autoLoadDetails If set to '1', will automatically expand blank nodes after initial load. 1

Value (Object) Level

Parameter Description Example value
objectReactor Selects the right component for handling object values. Can be set to either 'IndividualObject' or 'AggregateObject'. ['IndividualObject']
objectIEditor Specifies the right edit component for an individual object. ['DBpediaInput']
objectAEditor Specifies the right edit componen for an aggregate object.
extendedOEditor Specifies the right view when component value is edited in extended mode. ['BasicIndividualDetailEdit']
objectIViewer Specifies the right view component for an individual object. ['BasicDBpediaView']
objectAViewer Specifies the right view component for an aggregate object. ['BasicAggregateView']
extendedOViewer Specifies the right view when component value is extended. ['BasicIndividualDetailView']
hasLinkedValue If set to '1', it indicates that the value should be linked to a dataset. 1
containerDatasetURI defines the URI of the dataset to which the value is linked. http://exampleDataset.com
shortenURI will shorten objects with URI values. 1

A sample config is provided at configs/reactor.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