1 """
2 A grammar taking its rows from a VOTable.
3 """
4
5
6
7
8
9
10
11
12
13
14 import gzip
15
16 from gavo import base
17 from gavo import votable
18 from gavo.base import valuemappers
19 from gavo.grammars import common
20
21
23 """An iterator returning rows of the first table within a VOTable.
24 """
25 - def __init__(self, grammar, sourceToken, **kwargs):
32
41
43 return "VOTable file %s"%self.sourceToken
44
45
47 """A grammar parsing from VOTables.
48
49 Currently, the PARAM fields are ignored, only the data rows are
50 returned.
51
52 voTableGrammars result in typed records, i.e., values normally come
53 in the types they are supposed to have.
54 """
55 name_ = "voTableGrammar"
56 _gunzip = base.BooleanAttribute("gunzip", description="Unzip sources"
57 " while reading?", default=False)
58
59 rowIterator = VOTableRowIterator
60