Package gavo :: Package protocols :: Module tap
[frames] | no frames]

Module tap

source code

TAP: schema maintenance, job/parameter definition incl. upload and UWS actions.

Classes
  TAPError
here for backward compatibility.
  TAPTransitions
The transition function for TAP jobs.
  LangParameter
  MaxrecParameter
  LocalFile
A sentinel class representing a file within a job work directory (as resulting from an upload).
  UploadParameter
  TAPJob
  Plan
A container for the XML namespace for query plans.
  PlanAction
retrieve a query plan.
  TAPUWS
The UWS responsible for processing async TAP requests.
  TAPCore
A core for the TAP renderer.
Functions
 
getSupportedLanguages()
returns a list of tuples for the supported languages.
source code
 
getSupportedOutputFormats()
yields tuples for the supported output formats.
source code
 
publishToTAP(rd, connection)
publishes info for all ADQL-enabled tables of rd to the TAP_SCHEMA.
source code
 
unpublishFromTAP(rd, connection)
removes all information originating from rd from TAP_SCHEMA.
source code
 
getAccessibleTables()
returns a list of qualified table names for the TAP-published tables.
source code
 
getUploadGrammar(*args) source code
 
parseUploadString(uploadString)
iterates over pairs of tableName, uploadSource from a TAP upload string.
source code
Variables
  RD_ID = '__system__/tap'
  EST_TIME_PER_JOB = datetime.timedelta(0, 600)
  FORMAT_CODES = {'application/fits': ('fits', 'application/fits...
  SUPPORTED_LANGUAGES = {'ADQL': {'description': 'The Astronomic...
  UPLOAD_METHODS = {'upload-ftp': 'ftp URL', 'upload-http': 'htt...
  WORKER_SYSTEM = <gavo.protocols.tap.TAPUWS object>
  __package__ = 'gavo.protocols'
Function Details

getSupportedLanguages()

source code 

returns a list of tuples for the supported languages.

This is tap.SUPPORTED_LANGUAGES in a format suitable for the TAP capabilities element.

Each tuple returned is made up of (name, description, [(version, ivo-id)...]).

getSupportedOutputFormats()

source code 

yields tuples for the supported output formats.

This is tap.OUTPUT_FORMATS in a format suitable for the TAP capabilities element.

Each tuple is made up of (mime, aliases, description, ivoId).

getUploadGrammar(*args)

source code 
Decorators:
  • @utils.memoized

Variables Details

FORMAT_CODES

Value:
{'application/fits': ('fits',
                      'application/fits',
                      'FITS binary table',
                      None),
 'application/json': ('json', 'application/json', 'JSON', None),
 'application/x-votable+xml': ('votable',
                               'application/x-votable+xml',
                               'VOTable, binary',
...

SUPPORTED_LANGUAGES

Value:
{'ADQL': {'description': 'The Astronomical Data Query Language is the \
standard IVOA dialect of SQL; it contains a very general SELECT statem\
ent as well as some extensions for spherical geometry and higher mathe\
matics.',
          'versions': {'2.0': 'ivo://ivoa.net/std/ADQL#v2.0',
                       '2.1': 'ivo://ivoa.net/std/ADQL#v2.1'}}}

UPLOAD_METHODS

Value:
{'upload-ftp': 'ftp URL',
 'upload-http': 'http URL',
 'upload-https': 'https URL',
 'upload-inline': 'POST inline upload'}