コード例 #1
0
ファイル: entities.py プロジェクト: maryemsalim/genologics
class Automation(Entity):
    """Automation, holding Automation configurations"""
    _URI = 'configuration/automations'
    _TAG = 'automation'

    process_types = NestedEntityListDescriptor('process-type', Processtype,
                                               'process-types')
    string = NestedStringDescriptor('string')
    name = StringAttributeDescriptor('name')
    context = NestedStringDescriptor('context')
コード例 #2
0
class Researcher(Entity):
    "Person; client scientist or lab personnel. Associated with a lab."

    _URI = 'researchers'
    _PREFIX = 'res'

    first_name = StringDescriptor('first-name')
    last_name = StringDescriptor('last-name')
    phone = StringDescriptor('phone')
    fax = StringDescriptor('fax')
    email = StringDescriptor('email')
    initials = StringDescriptor('initials')
    lab = EntityDescriptor('lab', Lab)
    udf = UdfDictionaryDescriptor()
    udt = UdtDictionaryDescriptor()
    externalids = ExternalidListDescriptor()

    # credentials XXX
    username = NestedStringDescriptor('username', 'credentials')
    account_locked = NestedBooleanDescriptor('account-locked', 'credentials')

    @property
    def name(self):
        return "%s %s" % (self.first_name, self.last_name)