Configure the Data Source Footnote
SuperWEB2 can be configured to display 'footnote' text at the bottom of each table. For example:
The footnote is intended to provide information about the source of the data in the table, and can be set to show a different string for each dataset.
To define the text string, you need to edit the file database_labels.properties, which is located in <tomcat_home>\webapps\webapi\WEB-INF\classes\
There may be multiple copies of this file for different languages and locales, with names like database_labels_en.properties, and database_labels_en_AU.properties. Each one contains the text used for different languages. Depending on which languages are in use on your deployment, you may need to make these changes in multiple versions of the file. The properties file that is used will depend on the language settings in the end user's web browser, the set of supported locales defined in the faces-config.xml configuration file, and the language selected by the user from the drop-down list. See Multilingual and Localisation Support for more information about localisation and how SuperWEB2 uses the properties files.
The data source text is defined in this file using several components. For example:
dataSource=Dataset
...
datasource.description={0}: {1}
bank.datasource=datasource.synthetic
people.datasource=datasource.synthetic
census.datasource=datasource.2021
datasource.synthetic=WingArc Australia synthetic data
datasource.2021=2021 National Census
The value of dataSource
, which appears at the very top of the database_labels.properties file, defines the text that appears on the left of the string ("Dataset" in this example).
The datasource.description
defines the structure of the whole sentence: when displayed in SuperWEB2, {0}
is replaced with the value of dataSource
and {1}
is replaced with the dataset-specific text, defined below.
The dataset-specific text is defined by the combination of a property named <dataset_id>.datasource
(where <dataset_ID>
is the ID of the dataset in the catalogue), and datasource.<datasource_id>
(where <datasource_id>
is an ID of your choosing to identify this text string). This means you can have the same text string for multiple datasets without having to duplicate the text for each one.
In the example above:
- For tables created using the datasets with the IDs
bank
andpeople
, SuperWEB2 will display the text "Dataset: WingArc Australia synthetic data". - For tables created using the dataset with the ID
census
, SuperWEB2 will display the text "Dataset: 2021 National Census".
If the text you want to show for your dataset is not already listed in this file:
Add the datasource text as follows (replace
<datasource_id>
with an ID of your choosing to identify this text, and replace<text>
with the text string itself):CODEdatasource.<datasource_id>=<text>
Then map your dataset to this text by adding a line similar to the following (replace
<dataset_id>
with the ID of the dataset, and<datasource_id>
with the ID of the data source text string you want to use):CODE<dataset_id>.datasource=datasource.<datasource_id>
- Restart Tomcat (or the SuperWEB2 Service if you use SuperSTAR Suite).
If you do not want to display a data source for a given dataset, simply remove the mapping for that dataset from this file. If you do not want to display datasource footnotes for any datasets, set datasource.description
to an empty string.
The data source footnote will also be displayed by default when downloading graphs to PNG or PDF. You can control the text that appears in these files by editing the settings in the sw2-chart-export-options.js configuration file.