1
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2 1
"""
3
=============
4
TAP plus
5
=============
6

7
@author: Javier Durtan
8
@contact: javier.duran@sciops.esa.int
9

10
European Space Astronomy Centre (ESAC)
11
European Space Agency (ESA)
12

13
Created on 28 sep. 2018
14

15

16
"""
17

18

19 1
class TapGroup(object):
20
    """TAP group object
21
    """
22

23 1
    def __init__(self, attrs):
24
        """Constructor
25
        """
26 0
        self.attributes = attrs
27 0
        self.id = attrs.getValue("id")
28 0
        self.owner = attrs.getValue("owner")
29 0
        self.users = []
30 0
        self.title = None
31 0
        self.description = None
32

33 1
    def __str__(self):
34 0
        users = ""
35 0
        for u in self.users:
36 0
            users = users + "\n\t\t" + u.name + "(" + u.id + ")"
37 0
        return "Group: " + str(self.title) + \
38
            "\n\tDescription: " + str(self.description) + \
39
            "\n\tOwner: " + str(self.owner) + \
40
            "\n\tUsers: " + users

Read our documentation on viewing source code .

Loading