Skip to content
Snippets Groups Projects
Commit 8fe8e24d authored by gmantele's avatar gmantele
Browse files

[TAP] Update the documentation of the configuration file.

parent 34d1859d
No related branches found
No related tags found
No related merge requests found
...@@ -542,13 +542,27 @@ ...@@ -542,13 +542,27 @@
<td> <td>
<p>Comma separated list of output formats for query results.</p> <p>Comma separated list of output formats for query results.</p>
<p>Allowed values are: votable (or 'vot'), fits, text, csv, tsv, json and html.</p> <p>Allowed values are: votable (or 'vot'), fits, text, csv, tsv, json and html.</p>
<p>The special value "ALL" will select all formats provided by the library.</p> <p>The VOTable format may be more detailed with the following syntax:
<p>The VOTable format may be more detailed with the following syntax: (<code>serialization</code>,<code>version</code>):<code>mime_type</code>:<code>short_mime_type</code>. (<code>serialization</code>,<code>version</code>):<code>mime_type</code>:<code>short_mime_type</code>.
The MIME type part and the parameters part may be omitted (e.g. votable:application/xml:votable , votable(td,1.3)]). The MIME type part and the parameters part may be omitted
Empty string values are allowed for each values (e.g. votable():: , votable(td)::votable).</p> (e.g. votable:application/xml:votable , votable(td,1.3)]).
<p>It is also possible to define a custom Separated Value format, different from CSV and TSV, thanks to the following syntax: sv(<code>separator</code>):<code>mime_type</code>:<code>short_mime_type</code>. Empty string values are allowed for each values (e.g. votable():: ,
On the contrary to the VOTable syntax, the parameter (i.e. separator) MUST BE provided. The MIME type part may be omitted ; then the MIME type will be set by default to text/plain.</p> votable(td)::votable).</p>
<p>There is finally a last possible value: a class name of a class implementing OutputFormat and having at least one constructor with exactly one parameter of type tap.ServiceConnection.</p> <p>The default VOTable format (i.e. serialization and version) is the one defined
with the short form `votable`. It is be default set to
`vot(binary,1.3)::votable` (see the special value `ALL` below). To change it
just define a VOTable format with the short form `votable`.</p>
<p>It is also possible to define a custom Separated Value format, different from
CSV and TSV, thanks to the following syntax:
sv(<code>separator</code>):<code>mime_type</code>:<code>short_mime_type</code>. On the contrary to the VOTable
syntax, the parameter (i.e. separator) MUST BE provided. The MIME type part
may be omitted ; then the MIME type will be set by default to text/plain.</p>
<p>There is finally a last possible value: a class name of a class implementing
OutputFormat and having at least one constructor with exactly one parameter of
type tap.ServiceConnection.</p>
<p>The special value <code>ALL</code> will select all formats provided by the library. It is
equivalent to the following:</p>
<pre>output_formats = vot(binary,1.3)::votable, vot(td,1.3)::votable/td, vot(binary,1.3)::votable/b, vot(binary2,1.3)::votable/b2, vot(fits,1.3)::votable/fits, fits, csv, tsv, text, html,json</pre>
<p><em>Default: <code>ALL</code></em></p> <p><em>Default: <code>ALL</code></em></p>
</td> </td>
<td><ul><li>votable</li><li>vot</li><li>vot(td,1.2)::votable</li><li>json,html ,csv, text</li><li>sv(|):text/psv:psv</li><li>sv([])</li><li>{apackage.FooOutputFormat}</li></ul></td> <td><ul><li>votable</li><li>vot</li><li>vot(td,1.2)::votable</li><li>json,html ,csv, text</li><li>sv(|):text/psv:psv</li><li>sv([])</li><li>{apackage.FooOutputFormat}</li></ul></td>
...@@ -669,14 +683,14 @@ ...@@ -669,14 +683,14 @@
values. A list of values must be indicated between parenthesis and values must be separated by a pipe. values. A list of values must be indicated between parenthesis and values must be separated by a pipe.
</p> </p>
<p>Allowed values for <code>Frame</code> are: <code>ICRS</code>, <code>FK4</code>, <p>Allowed values for <code>Frame</code> are: <code>ICRS</code>, <code>FK4</code>,
<code>FK5</code>, <code>ECLIPTIC</code>, <code>GALACTIC</code> and <code>UNKNOWNFRAME</code>.</p> <code>FK5</code>, <code>J2000</code>, <code>ECLIPTIC</code>, <code>GALACTIC</code> and <code>UNKNOWNFRAME</code>.</p>
<p>Allowed values for <code>RefPos</code> are: <code>BARYCENTER</code>, <code>GEOCENTER</code>, <p>Allowed values for <code>RefPos</code> are: <code>BARYCENTER</code>, <code>GEOCENTER</code>,
<code>HELIOCENTER</code>, <code>LSR</code>, <code>TOPOCENTER</code>, <code>RELOCATABLE</code> <code>HELIOCENTER</code>, <code>LSR</code>, <code>TOPOCENTER</code>, <code>RELOCATABLE</code>
and <code>UNKNOWNREFPOS</code>.</p> and <code>UNKNOWNREFPOS</code>.</p>
<p>Allowed values for <code>Flavor</code> are: <code>CARTESIAN2</code>, <code>CARTESIAN3</code> and <p>Allowed values for <code>Flavor</code> are: <code>CARTESIAN2</code>, <code>CARTESIAN3</code> and
<code>SPHERICAL2</code>.</p> <code>SPHERICAL2</code>.</p>
<p> <p>
If the special value <em>NONE</em> is given instead of a list of allowed coordinate systems, If the special value <code>NONE</code> is given instead of a list of allowed coordinate systems,
no coordinate system will be allowed. And if the list is empty, any coordinate system will be allowed. no coordinate system will be allowed. And if the list is empty, any coordinate system will be allowed.
</p> </p>
<p><em>By default, any coordinate system is allowed.</em></p> <p><em>By default, any coordinate system is allowed.</em></p>
...@@ -691,7 +705,7 @@ ...@@ -691,7 +705,7 @@
<p>Comma-separated list of all allowed geometries.</p> <p>Comma-separated list of all allowed geometries.</p>
<p> <p>
Each item of the list must be the name (whatever is the case) of an ADQL geometrical function (e.g. INTERSECTS, COORDSYS, POINT) to allow. Each item of the list must be the name (whatever is the case) of an ADQL geometrical function (e.g. INTERSECTS, COORDSYS, POINT) to allow.
If the list is empty (no item), all functions are allowed. And if the special value <em>NONE</em> is given, no ADQL function will be allowed. If the list is empty (no item), all functions are allowed. And if the special value <code>NONE</code> is given, no ADQL function will be allowed.
</p> </p>
<p><em>By default, all ADQL geometrical functions are allowed.</em></p> <p><em>By default, all ADQL geometrical functions are allowed.</em></p>
</td> </td>
...@@ -711,7 +725,7 @@ ...@@ -711,7 +725,7 @@
(and more particularly a name) different in ADQL and in SQL. (and more particularly a name) different in ADQL and in SQL.
</p> </p>
<p> <p>
If the list is empty (no item), all unknown functions are forbidden. And if the special value <em>ANY</em> is given, any unknown function is allowed ; If the list is empty (no item), all unknown functions are forbidden. And if the special value <code>ANY</code> is given, any unknown function is allowed ;
consequently the unknown ADQL functions will be translated into SQL as they are in ADQL. consequently the unknown ADQL functions will be translated into SQL as they are in ADQL.
</p> </p>
<p><em>By default, no unknown function is allowed.</em></p> <p><em>By default, no unknown function is allowed.</em></p>
...@@ -821,4 +835,4 @@ ...@@ -821,4 +835,4 @@
document.getElementById("nbTotal").textContent = nb; document.getElementById("nbTotal").textContent = nb;
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
This diff is collapsed.
########################################################## ################################################################################
# MINIMUM TAP CONFIGURATION FILE # # MINIMUM TAP CONFIGURATION FILE #
# # # #
# TAP Version: 2.1 # # TAP Version: 2.1 #
# Date: 02 Aug. 2017 # # Date: 22 Feb. 2018 #
# Author: Gregory Mantelet (ARI) # # Author: Gregory Mantelet (ARI) #
# # # #
########################################################## ################################################################################
############ ############
# DATABASE # # DATABASE #
...@@ -14,17 +14,25 @@ ...@@ -14,17 +14,25 @@
# Method to use in order to create database connections. # Method to use in order to create database connections.
# #
# Only two values are supported: # Only two values are supported:
# * jndi: database connections will be supplied by a Datasource whose the JNDI name must be given. This method may propose connection pooling in function of the datasource configuration. # * jndi: database connections will be supplied by a Datasource whose the
# * jdbc: the library will create itself connections when they will be needed thanks to the below JDBC parameters. This method does not propose any connection pooling. # JNDI name must be given. This method may propose connection
# pooling in function of the datasource configuration.
# * jdbc: the library will create itself connections when they will be
# needed thanks to the below JDBC parameters. This method does not
# propose any connection pooling.
# #
# Allowed values: jndi, jdbc. # Allowed values: jndi, jdbc.
database_access = database_access =
# The translator to use in order to translate ADQL to a SQL compatible with the used DBMS and its spatial extension. # The translator to use in order to translate ADQL to a SQL compatible with the
# used DBMS and its spatial extension.
# #
# The TAP library supports only Postgresql (no spatial extension), PostgreSQL+PgSphere, SQLServer (no spatial extension) and MySQL (no spatial extension) for the moment. But you can provide your own SQL translator # The TAP library supports only Postgresql (no spatial extension),
# (even if it does not have spatial features), by providing the name of a class (within brackets: {...}) that implements ADQLTranslator (for instance: {apackage.MyADQLTranslator}) # PostgreSQL+PgSphere, SQLServer (no spatial extension) and MySQL (no spatial
# and which have at least an empty constructor. # extension) for the moment. But you can provide your own SQL translator (even
# if it does not have spatial features), by providing the name of a class
# (within brackets: {...}) that implements ADQLTranslator (for instance:
# {apackage.MyADQLTranslator}) and which have at least an empty constructor.
# #
# Allowed values: postgres, pgsphere, sqlserver, mysql, a class name # Allowed values: postgres, pgsphere, sqlserver, mysql, a class name
sql_translator = postgres sql_translator = postgres
...@@ -33,23 +41,27 @@ sql_translator = postgres ...@@ -33,23 +41,27 @@ sql_translator = postgres
# IF DATABASE ACCESS = JNDI # # IF DATABASE ACCESS = JNDI #
############################# #############################
# JNDI name of the datasource. # JNDI name of the datasource pointing toward the database to use.
# # It should be defined in the web application (e.g. in the META-INF/context.xml
# It should be defined in the web application (e.g. in the META-INF/context.xml file in tomcat). # file in tomcat).
datasource_jndi_name = datasource_jndi_name =
############################# #############################
# IF DATABASE ACCESS = JDBC # # IF DATABASE ACCESS = JDBC #
############################# #############################
# It must be a JDBC driver URL. # JDBC driver URL pointing toward the database to use.
# #
# Note: The username, password or other parameters may be included in it, but in this case, the corresponding properties should leave empty or not provided at all. # Note: The username, password or other parameters may be included in it, but
# in this case, the corresponding properties should leave empty or not
# provided at all.
jdbc_url = jdbc_url =
# JDBC driver path. # JDBC driver path.
# #
# By default, it is guessed in function of the database name provided in the jdbc_url property. It MUST be provided if another DBMS is used or if the JDBC driver path does not match the following ones: # By default, it is guessed in function of the database name provided in the
# jdbc_url property. It MUST be provided if another DBMS is used or if the
# JDBC driver path does not match the following ones:
# * Oracle : oracle.jdbc.OracleDriver # * Oracle : oracle.jdbc.OracleDriver
# * PostgreSQL: org.postgresql.Driver # * PostgreSQL: org.postgresql.Driver
# * MySQL : com.mysql.jdbc.Driver # * MySQL : com.mysql.jdbc.Driver
...@@ -57,14 +69,17 @@ jdbc_url = ...@@ -57,14 +69,17 @@ jdbc_url =
# * H2 : org.h2.Driver # * H2 : org.h2.Driver
jdbc_driver = jdbc_driver =
# Mandatory if the username is not already provided in jdbc_url # [Mandatory if the username is not already provided in jdbc_url]
#
# Username used to access to the database. # Username used to access to the database.
db_user = db_user =
# Mandatory if the password is not already provided in jdbc_url # [Mandatory if the password is not already provided in jdbc_url]
#
# Password used by db_username to access to the database. # Password used by db_username to access to the database.
# #
# Note: No password encryption can be done in this configuration file for the moment. # Note: No password encryption can be done in this configuration file for the
# moment.
db_password = db_password =
############ ############
...@@ -73,26 +88,42 @@ db_password = ...@@ -73,26 +88,42 @@ db_password =
# Metadata fetching method. # Metadata fetching method.
# #
# The value of this key defines the way the library will get the list of all schemas, tables and columns to publish and all their metadata (e.g. utype, description, type, ...). # The value of this key defines the way the library will get the list of all
# schemas, tables and columns to publish and all their metadata (e.g. utype,
# description, type, ...).
# #
# In its current state, the library proposes three methods: # In its current state, the library proposes three methods:
# 1/ Parse a TableSet XML document and load its content into the database schema TAP_SCHEMA (note: this schema is first erased and rebuilt by the library). # 1/ Parse a TableSet XML document and load its content into the database
# schema TAP_SCHEMA (note: this schema is first erased and rebuilt by the
# library).
# 2/ Get all metadata from the database schema TAP_SCHEMA. # 2/ Get all metadata from the database schema TAP_SCHEMA.
# 3/ Build yourself the metadata of your service by creating an extension of tap.metadata.TAPMetadata. This extension must have either an empty constructor # 3/ Build yourself the metadata of your service by creating an extension of
# or a constructor with exactly 3 parameters of type UWSFileManager, TAPFactory and TAPLog ; if both constructor are provided, only the one with parameters will be used. # tap.metadata.TAPMetadata. This extension must have either an empty
# constructor or a constructor with exactly 3 parameters of type
# UWSFileManager, TAPFactory and TAPLog ; if both constructor are
# provided, only the one with parameters will be used.
# #
# For the two first methods, it is also possible to specify an extension of tap.metadata.TAPMetadata which will wrap a default TAPMetadata objects created using the specified # For the two first methods, it is also possible to specify an extension of
# methods (i.e. XML tableset or TAP_SCHEMA). In this way, it is possible to get the "default" metadata from an XML file or the database # tap.metadata.TAPMetadata which will wrap a default TAPMetadata objects created
# and then add/remove/modify some of them, or to change the output of the 'tables' resource. The extension of tap.metadata.TAPMetadata must have at least # using the specified methods (i.e. XML tableset or TAP_SCHEMA). In this way, it
# one constructor with the following parameters: (TAPMetadata) or (TAPMetadata, UWSFileManager, TAPFactory, TAPLog). # is possible to get the "default" metadata from an XML file or the database
# and then add/remove/modify some of them, or to change the output of the
# 'tables' resource. The extension of tap.metadata.TAPMetadata must have at
# least one constructor with the following parameters: (TAPMetadata) or
# (TAPMetadata, UWSFileManager, TAPFactory, TAPLog).
# #
# Allowed values: xml, xml {myTAPMetadata}, db, db {myTAPMetadata} or a full class name (between {}). # Allowed values: xml, xml {myTAPMetadata}, db, db {myTAPMetadata}
# or a full class name (between {}).
metadata = metadata =
# Mandatory if the value of "metadata" is "xml". # [Mandatory if the value of "metadata" is "xml".]
#
# Local file path to the TableSet XML document. # Local file path to the TableSet XML document.
#
# The XML document must implement the schema TableSet defined by VODataService. # The XML document must implement the schema TableSet defined by VODataService.
# The file path must be either an absolute local file path or a file path relative to WebContent (i.e. the web application directory in which there are WEB-INF and META-INF). # The file path must be either an absolute local file path or a file path
# relative to WebContent (i.e. the web application directory in which there are
# WEB-INF and META-INF).
metadata_file = metadata_file =
######### #########
...@@ -100,14 +131,19 @@ metadata_file = ...@@ -100,14 +131,19 @@ metadata_file =
######### #########
# Type of the file manager. # Type of the file manager.
# #
# Accepted values are: local (to manage files on the local system). You can also add another way to manage files by providing # Accepted values are: local (to manage files on the local system). You can also
# the name (within brackets: {...}) of a class implementing TAPFileManager and having at least one constructor with only a # add another way to manage files by providing the name (within brackets: {...})
# java.util.Properties parameter. # of a class implementing TAPFileManager and having at least one constructor
# # with only a java.util.Properties parameter.
#
# Allowed values: local, a class name. # Allowed values: local, a class name.
file_manager = local file_manager = local
# Local file path of the directory in which all TAP files (logs, errors, job results, backup, ...) must be. # Local file path of the directory in which all TAP files (logs, errors, job
# The file path must be either an absolute local directory path or a directory path relative to WebContent (i.e. the web application directory in which there are WEB-INF and META-INF). # results, backup, ...) must be.
#
# The file path must be either an absolute local directory path or a directory
# path relative to WebContent (i.e. the web application directory in which there
# are WEB-INF and META-INF).
file_root_path = file_root_path =
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment