Difference between revisions of "Time Format Alternate Half Year"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Is Alternate Half-Format set)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
At ESCB level SDMX data exchanges, there is an agreement to use 'H' as the frequency value for semiannual observations. This is specified via 'YYYY-H1' or 'YYYY-H2'.
+
[[Category:Fusion Registry Install]]
 +
[[Category:How_To]]
  
The Registry supports this by setting a system property so the Registry is in 'alternate half year' mode.  Under this mode:
+
At ESCB level SDMX data exchanges, there is an agreement to use 'H' as the frequency value for semi-annual observations. This is specified via 'YYYY-H1' or 'YYYY-H2'.
* Frequency value 'H' means half-year (semiannual or semester)
 
* The hourly frequency is not supported
 
* 'YYYY-S1' and 'YYYY-H1' are valid TIME_PERIOD formats for half-yearly observations, however conversion will output in ‘YYYY-H1’ format
 
  
Alternate half year mode is controlled at system level on Registry start-up by setting the Java System variable "TF_ALTERNATE_HALF_YEAR" to "true".
+
The Registry supports this with a system property. When this is enabled the Registry is in 'alternate half year' mode.  Under this mode:
 +
* Frequency value 'H' means half-year (semiannual or semester) as does frequency value 'S'. They are interchangeable as input.
 +
* 'YYYY-S1' and 'YYYY-H1' are valid TIME_PERIOD formats for half-yearly observations.
 +
* Output in SDMX-ML 2.1 will always be in the 'S' format (e.g. an input of 'YYYY-H1' will be converted to 'YYYY-S1'). This ensures that the output is correct to the SDMX specification.
 +
* Output in other formats will not be converted from 'H' to 'S' (e.g. SDMX-CSV)
 +
* The hourly frequency is not supported.
 +
 
 +
'Alternate half year' mode is controlled at system level on Registry start-up by setting the Java System variable "TF_ALTERNATE_HALF_YEAR" to "true".
  
 
== Setting System Property ==
 
== Setting System Property ==
  
If using Apache Tomcat, it is recommended to set the value via JAVA_OPTS and using the setenv.bat or setenv.sh file:
+
If using Apache Tomcat, it is recommended to set the value via JAVA_OPTS and using the ''setenv.bat'' or ''setenv.sh'' file:
  
 
  SET JAVA_OPTS=-DTF_ALTERNATE_HALF_YEAR=true
 
  SET JAVA_OPTS=-DTF_ALTERNATE_HALF_YEAR=true
Line 20: Line 25:
 
Different procedures may be required for other web application servers like JBoss.
 
Different procedures may be required for other web application servers like JBoss.
  
== Is Alternate Half-Format set ==
+
== Is Alternate Half-Year Format set? ==
  
 
On startup the Fusion Registry system log will report the following message:
 
On startup the Fusion Registry system log will report the following message:

Latest revision as of 00:35, 11 September 2023


At ESCB level SDMX data exchanges, there is an agreement to use 'H' as the frequency value for semi-annual observations. This is specified via 'YYYY-H1' or 'YYYY-H2'.

The Registry supports this with a system property. When this is enabled the Registry is in 'alternate half year' mode. Under this mode:

  • Frequency value 'H' means half-year (semiannual or semester) as does frequency value 'S'. They are interchangeable as input.
  • 'YYYY-S1' and 'YYYY-H1' are valid TIME_PERIOD formats for half-yearly observations.
  • Output in SDMX-ML 2.1 will always be in the 'S' format (e.g. an input of 'YYYY-H1' will be converted to 'YYYY-S1'). This ensures that the output is correct to the SDMX specification.
  • Output in other formats will not be converted from 'H' to 'S' (e.g. SDMX-CSV)
  • The hourly frequency is not supported.

'Alternate half year' mode is controlled at system level on Registry start-up by setting the Java System variable "TF_ALTERNATE_HALF_YEAR" to "true".

Setting System Property

If using Apache Tomcat, it is recommended to set the value via JAVA_OPTS and using the setenv.bat or setenv.sh file:

SET JAVA_OPTS=-DTF_ALTERNATE_HALF_YEAR=true
(For Windows systems)
export JAVA_OPTS=-DTF_ALTERNATE_HALF_YEAR=true
(For Unix systems)

Different procedures may be required for other web application servers like JBoss.

Is Alternate Half-Year Format set?

On startup the Fusion Registry system log will report the following message:

2021-12-31 23:59:59.123 INFO main io.sdmx.core.fmr.application.FusionRegistryApplicationInitialiser - Using 'Alternate Half-Year' Setting

Active system properties can also be queried using the REST API which is detailed here.