Language

class pyvo.io.vosi.tapregext.Language(config=None, pos=None, **kwargs)[source]

Bases: Element

Attributes Summary

description

languagefeaturelists

name

versions

Methods Summary

describe()

Prints out a human readable description

get_feature(ivoid, form)

returns the LanguageFeature with ivoid and form if present.

get_feature_list(ivoid)

returns a list of features groupd with the features id ivoid.

get_udf(function_name)

returns a LanguageFeature corresponding to an ADQL user defined function on the server, on None if the UDF is not available.

parse(iterator, config)

For internal use.

Attributes Documentation

description
languagefeaturelists
name
versions

Methods Documentation

describe()[source]

Prints out a human readable description

get_feature(ivoid, form)[source]

returns the LanguageFeature with ivoid and form if present.

We return None rather than raising an error because we expect the normal pattern of usage here will be “if feature is present”, and with None-s this is simpler to write than with exceptions.

Since it’s hard to predict the form of UDFs, for those rather use the get_udf method.

ivoid (regrettably) has to be compared case-insensitively; form is compared case-sensitively.

Parameters
ivoidstr

The IVOA identifier of the feature group the form is in

formstr

The form of the feature requested

Returns
A LanguageFeature or None.
get_feature_list(ivoid)[source]

returns a list of features groupd with the features id ivoid.

Parameters
ivoidthe ivoid of a TAPRegExt feature list. It is compared

case-insensitively against the service’s ivoids.

Returns
A (possibly empty) list of LanguageFeature elements
get_udf(function_name)[source]

returns a LanguageFeature corresponding to an ADQL user defined function on the server, on None if the UDF is not available.

This is a bit heuristic in that it tries to parse the form, which is specified only so-so.

Parameters
function_namestr

A function name. This is matched against the server’s function names case-insensitively, as guided by ADQL’s case insensitivity.

Returns:

A LanguageFeature instance or None.

parse(iterator, config)[source]

For internal use. Parse the XML content of the children of the element. Override this method and do after-parse checks after calling super().parse, if you need to.

Parameters
iteratorxml iterator

An iterator over XML elements as returned by get_xml_iterator.

configdict

The configuration dictionary that affects how certain elements are read.