E. TAP Configuration File

A single file to create and configure a whole TAP service.

The TAP configuration file is an easy alternative to the "normal" way of creating a TAP service using this library. Usually an HttpServlet, an implementation of ServiceConnection and TAPFactory must be written. However, even if not complicated, this work may become a little long, repetitive and not always intuitive. Hence the usage of a text file providing the required values or parameters to set a TAP service.

Once written, a such file will be then read by HttpServlet already provided by this library: ConfigurableTAPServlet. Similarly, a ServiceConnection and a TAPFactory are already implemented: resp. ConfigurableServiceConnection and ConfigurableTAPFactory.

Consequently, using a configuration file, the only thing to do is to declare a new servlet in WEB-INF/web.xml. This servlet must be obviously: tap.config.ConfigurableServiceConnection. The corresponding XML entry is then:

	...
	<servlet>
        <display-name>tap</display-name>
        <servlet-name>MyTAP</servlet-name>
        <servlet-class>tap.config.ConfigurableTAPServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>MyTAP</servlet-name>
        <url-pattern>/tap/*</url-pattern>
    </servlet-mapping>
	...

The above XML entry is only an example. Only the servlet-class tag must always have the same value. It is up to you to set the other tags as you wish.

UML of tap.config.*

Servlet parameter

No special location is imposed for the TAP configuration file. It can be anywhere in the local file system. Once you know its exact location, you should specify it inside WEB-INF/web.xml by setting the property tapconf with the path of the file. The given path may be either absolute or relative to the web application directory. Below is an example on how to set it in your WEB-INF/web.xml:

	...
	<servlet>
        <display-name>tap</display-name>
        <servlet-name>MyTAP</servlet-name>
        <servlet-class>tap.config.ConfigurableTAPServlet</servlet-class>
		<init-param>
            <param-name>tapconf</param-name>
            <param-value>WEB-INF/tap.properties</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>MyTAP</servlet-name>
        <url-pattern>/tap/*</url-pattern>
    </servlet-mapping>
	...

Search pathes

This servlet parameter is however optional. If not specified, the configuration file must be named tap.properties and must be in one of the following directories:

Missing file

If the file specified in the servlet parameter tapconf can not be found, the library will consider that no file has been specified and will search in the classpath and the web application directory ONLY IF the given path is a relative one.

In all cases, if the properties file can not be found, the web application won't start, a ServletException is thrown and at each attempt to access the service an HTTP-500 page with the exception stack trace is returned.

A property of the configuration file may be a a time (in milliseconds), a size (in row or bytes), a file path, a string (free text), an item of a set enumeration or a Java Class name. General rules must be respected for each of these types, and particularly, some special values may be sometimes set. Below are briefly detailed each of these types.

Integer

Any integer value negative or positive. However only the positive values are taken into account. A negative value meaning then "no restriction"/"unlimited". So, the minimum positive value is 0 and the maximum one is 231-1 (=2147483647).

Special value: any negative value ; it then means "no restriction"/"unlimited".

Time

This time is always expressed an integer value expressed in milliseconds, unless otherwise indicated in the property description.

Special value: any negative value ; it then means "no restriction"/"unlimited".

Size

This integer value can be expressed either in rows or bytes. If both units are possible, a letter (R or B) may follow to indicate which must be considered. If no unit is specified, by default B (bytes) is considered, unless otherwise indicated in the property description.

Special value: any negative value ; it then means "no restriction"/"unlimited".

File path

A file path may be relative or absolute. If relative, the directory of the web application will be taken as root. If absolute, the path may be provided as an URI (e.g. file:///somewhere/in/the/local/file/system) or as a standard file path (e.g. /somewhere/in/the/local/file/system). Some properties like home_page may allow more file path specification options (e.g. a URL).

String

No special restriction for this type of property. You should however know that property values are not multi-line. But if you want a value including line-returns, you have to escape them ; thus \n will be a return-line. The same can be also done for \t equivalent to a tab.

Enumeration item

A complete list of all possible values is specified in the property description. This value is not case sensitive.

Java Class name

For some properties a custom implementation may be provided. Thus, a Java Class must be written and specified in a way inside the TAP configuration file. This way is to merely provide the full Java Class name between braces (i.e. {}). For instance: {tap.formatter.HTMLFormat}. The braces are very important ; if omitted the library is unable to determine whether the value is a class path or a normal value. Obviously this class name is case sensitive and the full package name must always be specified.

List properties

Some properties may be lists of values, like output_formats, geometries and udfs. For such lists, the following values may exist: ALL, NONE and ANY. Generally just one or 2 of these values are allowed. These special values, when allowed, are always explained in the property description.

All properties listed in the below table are all the possible TAP configuration properties. Some of them are mandatory. If one of these mandatory properties is missing, the TAP Service will not able to start: an error will be displayed immediately in the application server log and a HTTP 503 error will be sent when accessing the TAP URL.

Any property key not listed in this table will be ignored without error or warning message.

Any incorrect property value will generate an error message and will stop the start process. A trace will be kept the service log.

In order to help you more, here are two configuration file patterns. They list some or all properties, with the description reported in the below table. No value (except the default one for optional properties) is set:

Legend

M means that the property is mandatory. If nothing is written for the second column, the property is optional.

means that the property is new.

/ mandatory properties -

new properties -

Property Type Description Example
General
home_page text

This property lets set a custom home page. 4 different kinds of value are accepted:

  • nothing (default): the default home page provided by the library (just a simple HTML page displaying a list of all available TAP resources).
  • name or relative path of a file: this method MUST be chosen if the new home page is a JSP file. This file MUST be inside the directory WebContent of your web application.
  • a URI starting with file://: in this method the local file pointed by the URI will be merely returned when the home page will be requested.
  • a URL: here, a redirection toward this URL will be made at each request on the home page
  • a class name: the class name of an extension of tap.resource.HomePage which must replace the default home page resource. This class MUST have at least one constructor with exactly one parameter not NULL of type tap.resource.TAP.

By default, the default home page provided by the library is used.

  • my_tap_homepage.jsp
  • jsp/my_tap_homepage.jsp
  • file:///home/foo/customHomePage.html
  • http://...
  • {aPackage.NewHomePage}
home_page_mime_type text

MIME type of the service home page.

This property is used only if the specified "home_page" is a local file path (i.e. if "home_page=file://...").

If no value is provided "text/html" will be set by default.

Default: text/html

  • text/html (default)
  • text/plain
  • application/xml
Provider
provider_name text Name of the provider of the TAP Service.
service_description text Description of the TAP Service.
Database (only if tap_factory = ø)
database_access text

Method to use in order to create database connections.

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.
  • 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.
  • jdbc
  • jndi
sql_translator text

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), MySQL (no spatial extension) and H2 (no spatial 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.

  • postgres
  • pgsphere
  • sqlserver
  • mysql
  • {apackage.MyADQLTranslator}
sync_fetch_size integer

Size of result blocks to fetch from the database when a ADQL query is executed in Synchronous mode.

Rather than fetching a query result in a whole, it may be possible to specify to the database that results may be retrieved by blocks whose the size can be specified with this property. If supported by the DBMS and the JDBC driver, this feature may help sparing memory and avoid too much waiting time from the TAP /sync users (and thus, avoiding some HTTP client timeouts).

A negative or null value means that the default value of the JDBC driver will be used. Generally, it means that the database must wait to have collected all data before sending them to the library.

Default: sync_fetch_size=1000

  • 1000 (default)
  • 0 (wait for the the whole result)
  • 100000
async_fetch_size integer

Size of result blocks to fetch from the database when an ADQL query is executed in Asynchronous mode.

Rather than fetching a query result in a whole, it may be possible to specify to the database that results may be retrieved by blocks whose the size can be specified with this property. If supported by the DBMS and the JDBC driver, this feature may help sparing memory.

A negative or null value means that the default value of the JDBC driver will be used. Generally, it means that the database must wait to have collected all data before sending them to the library.

Default: async_fetch_size=10000

  • 10000 (default)
  • 0 (wait for the the whole result)
  • 1000000
fix_on_fail boolean

If enabled, this option lets automatically try fixing a query whose parsing failed because of a token error. This is particularly useful in the following cases:

  • when a column/table identifier/alias has an incorrect syntax (e.g. _RAJ2000, 2mass)
  • if the name of an ADQL function is used as a column/table identifier/alias (e.g. distance, point, min)
  • if the name of a reserved SQL keyword is used as a column/table identifier/alias (e.g. public, date, year, user)

In all these cases, the name/identifier/alias will be surrounded between double quotes if the option fix_on_fail is enabled.

This feature is also able to fix some incorrect Unicode characters (e.g. LaTeX alternatives for underscores, spaces and double/single quotes, copy-pasted from a PDF into a TAP query field).

Warning: since this option alters the query provided by the query, it is possible that, after fix attempt, the query parses and runs but might generate an output different from what was expected. So, if this option is enabled, it should made be clear to the user that the TAP server might alter the query to make it work.

Note: when an input query is fixed and run successfully, the fixed ADQL query is reported in an INFO element named QUERY_AFTER_AUTO_FIX inside the output VOTable.

Default: fix_on_fail=false

  • false (default)
  • true
⤷ JNDI datasource (only if database_access=jndi)
datasource_jndi_name text

JNDI name of the datasource. It should be defined in the web application (e.g. in the META-INF/context.xml file in tomcat).

  • jdbc/postgres
  • jdbc/mydatasource
  • mydatasource
⤷ JDBC parameters (only if database_access=jdbc)
jdbc_driver text

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:

  • Oracle : oracle.jdbc.OracleDriver
  • PostgreSQL: org.postgresql.Driver
  • MySQL : com.mysql.jdbc.Driver
  • SQLite : org.sqlite.JDBC
  • H2 : org.h2.Driver
oracle.jdbc.driver.OracleDriver
jdbc_url text

It must be a JDBC driver URL.

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:postgresql:mydb
  • jdbc:postgresql://myserver:1234/mydb
  • jdbc:sqlite:Database.db
db_username text

Mandatory if the username is not already provided in jdbc_url

Username used to access to the database.

db_password text

Mandatory if the password is not already provided in jdbc_url

Password used by db_username to access to the database.

Warning: No password encryption can be done in this configuration file for the moment.

Metadata
metadata text

Define the way the library must 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:

  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.
  3. Build yourself the metadata of your service by creating an extension of 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 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 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).

  • xml
  • xml {myTAPMetadata}
  • db
  • db {myTAPMetadata}
  • {apackage.MyTAPMetadata}
metadata_file text

Mandatory if the value of "metadata" is "xml".

Local file path to the TableSet XML document.

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).

  • /home/foo/my_metadata.xml
  • my_metadata.xml
  • WEB-INF/my_metadata.xml
TAP_SCHEMA... text

Only used if metadata = db.

Mapping between TAP_SCHEMA ADQL names and their names in the database.

Any property named exactly (case sensitive) like TAP_SCHEMA items will be considered as a mapping between its ADQL name and its DB name.

The property value MUST be NOT qualified. Just the item name is required. The value will be used as provided (with the same case).

Note: The column dbName in the database TAP_SCHEMA declaring the standard TAP_SCHEMA entries (e.g. TAP_SCHEMA.schemas.dbName) is now ignored. Thus, only the mapping defined here, in the configuration file, is taken into account.

  • TAP_SCHEMA = myTAPSchema
  • TAP_SCHEMA.tables = tap_tables
  • TAP_SCHEMA.columns.column_name = name
  • ...
Files
file_manager text

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 the name (within brackets: {...}) of a class implementing UWSFileManager and having at least one constructor with only a java.util.Properties parameter.

  • local
  • {apackage.MyTAPFileManager}
file_root_path text

Local file path of the directory in which all TAP files (logs, errors, job 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).

  • /home/my_home_dir/tapFiles
  • tapFiles
  • WEB-INF/tapFiles
directory_per_user boolean

Tells whether a directory should be created for each user. If yes, the user directory will be named with the user ID. In this directory, there will be error files, job results and it may be the backup file of the user.

Default: true

  • true (default)
  • false
group_user_directories boolean

Tells whether user directories must be grouped. If yes, directories are grouped by the first letter found in the user ID.

Default: false

  • true
  • false (default)
default_retention_period integer

The default period (in seconds) to keep query results. The prefix "default" means here that this value is put by default by the TAP Service if the client does not provide a value for it.

The default period MUST be less or equals to the maximum retention period. If this rule is not respected, the default retention period is set immediately to the maximum retention period.

A negative or null value means there is no restriction on the default retention period: job results will be kept forever. Float values are not allowed.

By default query results are kept forever: default_retention_period=0.

86400 (1 day)
max_retention_period integer

The maximum period (in seconds) to keep query results. The prefix "max" means here that the client can not set a retention period greater than this one.

The maximum period MUST be greater or equals to the default retention period. If this rule is not respected, the default retention period is set immediately to the maximum retention period.

A negative or null value means there is no restriction on the maximum retention period: the job results will be kept forever. Float values are not allowed.

Default: max_retention_period=0 (results kept for ever)

604800 (1 week)
Log files
logger text

Only two possibilities are already implemented.

  • default: default logger provided by the library. Any logged message will be appended in the file 'service.log' inside the root directory of this service (cf property file_root_path).
  • slf4j: wrapper for SLF4J. All log messages will be forwarded to SLF4J. It is up to the implementor to add the suitable JAR files in the Java class-path.

    Exactly two JAR files are expected by SLF4J to work as expected:

    • slf4j-api-{version}.jar (the main API)
    • and the slf4j-{binding}-{version}.jar

    Depending on the chosen SLF4J binding, you may also add another JAR file (e.g. Log4J, LogBack, ...) in the Java class-path.

    A configuration file might also be needed. There, it will be possible to configure the following loggers:

    • "tap.service" (general/root purpose log),
    • "tap.service.UWS" (UWS actions),
    • "tap.service.HTTP" (HTTP requests and responses),
    • "tap.service.JOB" (UWS's jobs actions),
    • "tap.service.THREAD" (job's thread actions),
    • "tap.service.TAP" (TAP actions),
    • and "tap.service.DB" (DB actions)
  • {...}: a custom logger. A class name MUST be provided (between {...}). The specified class must reference an implementation of tap.log.TAPLog. This implementation must have at least one constructor with a single parameter of type uws.service.file.UWSFileManager.

Default: default (i.e. tap.log.DefaultTAPLog)

  • default
  • slf4j
  • {aPackage.MyLogger}
min_log_level text

Minimum level that a message must have in order to be logged by the default logger.

5 possible values:

  • DEBUG: every messages are logged.
  • INFO: every messages EXCEPT DEBUG are logged.
  • WARNING: every messages EXCEPT DEBUG and INFO are logged.
  • ERROR: only ERROR and FATAL messages are logged.
  • FATAL: only FATAL messages are logged.

Note: This property is ignored if logger != default.

Default: DEBUG (every messages are logged)

  • DEBUG
  • INFO
  • WANRING
  • ERROR
  • FATAL
log_rotation text

Frequency of the log file rotation performed by the default logger. That's to say, logs will be written in a new file after this period. This avoid having too big log files. Old log files are renamed so that highlighting its logging period.

The frequency string must respect the following syntax:

  • 'D' hh mm: daily schedule at hh:mm
  • 'W' dd hh mm: weekly schedule at the given day of the week (1:sunday, 2:monday, ..., 7:saturday) at hh:mm
  • 'M' dd hh mm: monthly schedule at the given day of the month at hh:mm
  • 'h' mm: hourly schedule at the given minute
  • 'm': scheduled every minute (for completness :-))

Where: hh = integer between 0 and 23, mm = integer between 0 and 59, dd (for 'W') = integer between 1 and 7 (1:sunday, 2:monday, ..., 7:saturday), dd (for 'M') = integer between 1 and 31.

Warning: The frequency type is case sensitive! Then you should particularly pay attention at the case when using the frequency types 'M' (monthly) and 'm' (every minute).

Note: This property is ignored if logger != default.

Default: D 0 0 (daily at midnight)

  • D 6 30
  • W 2 6 30
  • M 2 6 30
  • h 10
  • m
UWS Backup (only if tap_factory = ø)
backup_frequency text or integer

Frequency at which the UWS service (that's to say, all its users and jobs) must be backuped.

Allowed values are: never (no backup will never be done), user_action (each time a user does a writing action, like creating or execution a job), a time (must be positive and not null) in milliseconds.

The value user_action can be used ONLY IF backup_by_user=true.

Default: backup_frequency=never (no backup)

  • never (default)
  • user_action
  • 3600000 (1 hour)
backup_by_user text

Tells whether the backup must be one file for every user (false), or one file for each user (true). This second option should be chosen if your TAP Service is organizing its files by user directories ; see the property directory_per_user.

This option can be enabled ONLY IF a user identification method is provided ; see property user_identifier.

Default: false

  • false (default)
  • true
Asynchronous jobs management
max_async_jobs integer

Maximum number of asynchronous jobs that can run simultaneously.

A negative or null value means there is no restriction on the number of running asynchronous jobs.

Default: max_async_jobs=0 (no restriction)

  • 0 (default)
  • 10
Query Execution
default_execution_duration integer

Default time (in milliseconds) for query execution. The prefix "default" means here that the execution duration will be this one if the client does not set one.

The default duration MUST be less or equals to the maximum execution duration. If this rule is not respected, the default execution duration is set immediately to the maximum execution duration.

A negative or null value means there is no restriction on the default execution duration: the execution could never end. Float values are not allowed.

Default: default_execution_duration=0 (no restriction)

600000 (10 minutes)
max_execution_duration integer

Maximum time (in milliseconds) for query execution. The prefix "max" means here that the client can not set a time greater than this one.

The maximum duration MUST be greater or equals to the default execution duration. If this rule is not respected, the default execution duration is set immediately to the maximum execution duration.

A negative or null value means there is no restriction on the maximum execution duration: the execution could never end. Float values are not allowed.

Default: max_execution_duration=0 (no restriction)

3600000 (1 hour)
Output
output_formats text

Comma separated list of output formats for query results.

Allowed values are: votable (or 'vot'), fits, text, csv, tsv, json and html.

The VOTable format may be more detailed with the following syntax: (serialization,version):mime_type:short_mime_type. The MIME type part and the parameters part may be omitted (e.g. votable:application/xml:votable , votable(td,1.3)]). Empty string values are allowed for each values (e.g. votable():: , votable(td)::votable).

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`.

It is also possible to define a custom Separated Value format, different from CSV and TSV, thanks to the following syntax: sv(separator):mime_type:short_mime_type. 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.

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.

The special value ALL will select all formats provided by the library. It is equivalent to the following:

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

Default: ALL

  • votable
  • vot
  • vot(td,1.2)::votable
  • json,html ,csv, text
  • sv(|):text/psv:psv
  • sv([])
  • {apackage.FooOutputFormat}
output_default_limit text

Default limit for the result output. The prefix "default" means here that this value will be set if the client does not provide one.

This limit can be expressed in only one unit: rows.

A negative value means there is no restriction on this limit. Float values are not allowed.

Obviously this limit MUST be less or equal than output_max_limit.

Default: output_default_limit=-1 (no restriction)

  • -1 (default)
  • 20
  • 20r
  • 20R
output_max_limit text

Maximum limit for the result output. The prefix "max" means here that the client can not set a limit greater than this one.

This limit can be expressed in only one unit: rows.

A negative value means there is no restriction on this limit. Float values are not allowed.

Obviously this limit MUST be greater or equal than output_default_limit.

Default: output_max_limit=-1 (no restriction)

  • -1 (default)
  • 1000
  • 10000r
  • 10000R
Upload
upload_enabled boolean

Tells whether the Upload must be enabled. If enabled, files can be uploaded in the file_root_path, the corresponding tables can be added inside the UPLOAD_SCHEMA of the database, queried and then deleted.

Note: Before being stored in the directory file_root_path, it is first uploaded in the temporary directory (defined in the JVM ; generally /tmp on Unix system and c:\temp ; it can be changed at start of the JVM with the property java.io.tmpdir). When the upload is complete, the file is finally moved in file_root_path.

By default, the Upload is disabled: upload_enabled=false.

  • false (default)
  • true
upload_default_db_limit text

Default limit for the number of uploaded records that can be inserted inside the database.

This property is DEPRECATED. You should use upload_max_db_limit instead. If it is set anyway, its value will be used as value for upload_max_db_limit ONLY IF this latter is not set.

Default: upload_default_db_limit=-1 (i.e. unlimited)

  • -1 (default)
  • 20
  • 20r
  • 20R
  • 200kB
upload_max_db_limit text

Maximum limit for the number of uploaded records that can be inserted inside the database.

This limit can be expressed with 2 types: rows or bytes. For rows, you just have to suffix the value by a "r" (upper- or lower-case), with nothing (by default, nothing will mean "rows"). For bytes, you have to suffix the numeric value by "B", "kB", "MB" or "GB". Here, unit is case sensitive. No other storage unit is allowed.

A negative value means there is no restriction on this limit. Float values are not allowed.

Important note: the specified limit will be checked at a different step of a query processing in function of its unit. If expressed in bytes, the file size will be checked when uploading the file on disk. Thus, when the uploading file starts to exceed the set limit, it will be no longer uploaded and the whole request will be immediately rejected. On the contrary, if the limit is expressed in rows, it will be tested only when ingesting the whole uploaded file (whatever is its size) in the database ; so, after it has been uploaded. As soon as, the rows insertion in the database exceeds the limit, the query is rejected. Consequently, a very huge file could potentially be completely uploaded before being rejected if this property is expressed in rows. Then, it is very important to set the property upload_max_request_size limiting the size of a whole HTTP request in order to better preserve your machine from running out of disk space.

Default: upload_max_db_limit=1000000r (i.e. 1 million rows)

  • 1000000r (default)
  • -1 (unlimited)
  • 10000
  • 10000r
  • 10000R
  • 1MB
upload_max_file_size text

Maximum allowed size for the uploaded file.

This property is DEPRECATED. You should use upload_max_db_limit with a value expressed in bytes if you wanted to limit the size of each uploaded file, or upload_max_request_size if your goal was to limit the input HTTP request size. If it is set anyway, its value will be used as value for upload_max_request_size ONLY IF this latter is not set.

Default: upload_max_file_size=-1 (i.e. unlimited)

  • -1 (default)
  • 2147483647B
  • 2MB
upload_max_request_size text

Maximum allowed size for a whole HTTP multipart request (i.e. request with uploads).

This limit MUST be expressed in bytes. Thus, you have to suffix the numeric value by "B", "kB", "MB" or "GB". Here, unit is case sensitive. No other storage unit is allowed.

A negative value means there is no restriction on this limit. Float values are not allowed.

Warning: It is highly recommended to set this property in order to prevent exceeding the disk storage space/quota (especially if upload_max_db_limit is not set or is set in rows).

Default: upload_max_request_size=250MB

  • 250MB (default)
  • -1 (unlimited)
User identification
user_identifier text

Class to use in order to identify a user of the TAP service. The same instance of this class will be used for every request sent to the service.

The value of this property MUST be a class name (with brackets: {...}) of a class implementing the interface uws.service.UserIdentifier. This class MUST have one of its constructors with no parameter.

By default, no identification is performed ; all users are then anonymous and their jobs can be seen by everybody.

{apackage.FooUserIdentifier}
ADQL restrictions
coordinate_systems text

Comma-separated list of all allowed coordinate systems.

Each item of the list be a kind of regular expression respecting the following syntax: Frame RefPos Flavor. In other words, it must be a string of exactly 3 parts. Each of this part is a single value, a list of allowed values or a * meaning all values. A list of values must be indicated between parenthesis and values must be separated by a pipe.

Allowed values for Frame are: ICRS, FK4, FK5, J2000, ECLIPTIC, GALACTIC and UNKNOWNFRAME.

Allowed values for RefPos are: BARYCENTER, GEOCENTER, HELIOCENTER, LSR, TOPOCENTER, RELOCATABLE and UNKNOWNREFPOS.

Allowed values for Flavor are: CARTESIAN2, CARTESIAN3 and SPHERICAL2.

If the special value NONE 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.

By default, any coordinate system is allowed.

  • ø (default)
  • NONE
  • ICRS * *
  • ICRS * *, ECLIPTIC * (CARTESIAN2 | SPHERICAL2)
geometries text

Comma-separated list of all allowed geometries.

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 NONE is given, no ADQL function will be allowed.

By default, all ADQL geometrical functions are allowed.

  • ø (default)
  • NONE
  • CONTAINS, intersects, Point, Box, CIRCLE
udfs text

Comma-separated list of all allowed UDFs (User Defined Functions).

Each item of the list must have the following syntax: [fct_signature], [fct_signature, className] or [fct_signature, className, description]. fct_function is the function signature. Its syntax is the same as in TAPRegExt. className is the name of a class extending UserDefinedFunction. An instance of this class will replace any reference of a UDF written in an ADQL function with the associated signature. A class name must be specified if the function to represent has a signature (and more particularly a name) different in ADQL and in SQL. description is the human description of the function to be displayed in the /capabilities of the TAP service. It must be written between double quotes.

If the list is empty (no item), all unknown functions are forbidden. And if the special value ANY is given, any unknown function is allowed ; consequently the unknown ADQL functions will be translated into SQL as they are in ADQL.

By default, no unknown function is allowed.

  • ø (default)
  • ANY
  • [trim(txt String) -> String], [random() -> DOUBLE]
  • [newFct(x double)->double, {apackage.MyNewFunction}]
  • [ivo_healpix_index(hpxOrder integer, ra double, dec double) -> bigint, {adql.query.operand.function.healpix.HealpixIndex}, "Compute the index of the \"Healpix cell\" containing the specified position at the given Healpix order."]
  • [random() -> DOUBLE,,"Generate a random number."]
Additional TAP Resources
capabilities_stylesheet text

URL of the XSLT stylesheet to link with the XML output of /capabilities.

By default, no XSLT stylesheet is defined.

  • http://mytap.com/myCapabilities.xslt
tables_stylesheet text

URL of the XSLT stylesheet to link with the XML output of /tables.

By default, no XSLT stylesheet is defined.

  • http://mytap.com/myTables.xslt
examples text

This property lets add an /examples endpoint by specifying an XHTML-RDFa document listing TAP query examples using the syntax specified by TAPNotes 1.0 or DALI 1.0.

3 different kinds of value are accepted:

  • nothing (default): no /examples endpoint.
  • name or relative path of a file: this method MUST be chosen if the endpoint content is a JSP file. This file MUST be inside the directory WebContent of your web application.
  • a URI starting with file://: in this method the local file pointed by the URI will be merely returned when the endpoint will be requested.
  • a URL: here, a redirection toward this URL will be made at each request on the endpoint

Note: If you want a custom /examples endpoint (i.e. you do not) want to forward/redirect to a file/URL), you can create a class which implements TAPResource AND VOSIResource. The function getName() must return examples. Then, just append the classpath to the property additional_resources of the TAP configuration file.

By default, the TAP service does not have any /examples endpoint.

  • my_examples.jsp
  • jsp/my_examples.jsp
  • file:///home/foo/my_examples.html
  • http://...
additional_resources text

Comma-separated list of additional TAP resources/end-point.

By default, the following standard TAP resources are already existing: /sync, /async, /tables, /capabilities and /availability. With this property, you can add a custom resource to your TAP service (e.g. /adqlValidator, /admin).

Each item of the list MUST be the name of a class implementing tap.resource.TAPResource. This class MUST have at least one constructor with exactly one parameter of type tap.resource.TAP.

The string returned by tap.resource.TAPResource.getName() will be the resource name, following the root TAP service URL (e.g. if getName() returns "foo", then its access URL will "{tapRoot}/foo"). Then, it is possible to replace TAP resources already existing by using the same name (e.g. if getName() returns "sync", the /sync resource won't be anymore the default Sync resource of this library but your new resource).

By default, this list is empty ; only the standard TAP resources exist.

{aPackage.QuickADQLValidator}
Custom TAP Factory
tap_factory text

Class to use in replacement of the default TAPFactory.

This property must be a class name (given between {...}). It must reference an implementation of TAPFactory. This implementation must have at least one constructor with exactly one parameter of type ServiceConnection.

It is recommended to extend an existing implementation such as: tap.AbstractTAPFactory or tap.config.ConfigurableTAPFactory.

By default, the default TAPFactory (tap.config.ConfigurableTAPFactory) is used and may use all properties related to the backup management, the database access, the TAP_SCHEMA mapping and the ADQL translation.

{aPackage.MyTAPFactory}