Example #1
0
class PETData(EntityType):
    voxel_res_x = Float(required=True, indexed=True)
    voxel_res_y = Float(required=True, indexed=True)
    voxel_res_z = Float(required=True, indexed=True)
    tr = Float()
    te = Float(required=True, indexed=True)
    scene_description = String()
Example #2
0
class TimeZone(EntityType):
    """
    Entity type for timezone of geonames.
    See timeZones.txt
    """
    code = String(maxsize=1024, indexed=True, required=True)
    gmt = Float()
    dst = Float()
    raw_offset = Float()
Example #3
0
class MateriauxParure(EntityType):
    type_mesure = String(vocabulary=_TYPES_MESURE,
                         fulltextindexed=True)
    quantite = Float()
    unite = String(maxsize=255, fulltextindexed=True)
    provenance_mesure = String(maxsize=255, fulltextindexed=True)
    conversion=Float()
    materiaux_achete = Boolean(required=True, default=False)
    materiaux = SubjectRelation('Materiaux', cardinality='1*',  inlined=True)
    usage = String(maxsize=255, fulltextindexed=True)
Example #4
0
class FabriqueAvecMat(EntityType):
    type_mesure = String(vocabulary=_TYPES_MESURE,
                         fulltextindexed=True)
    quantite = Float()
    unite = String(maxsize=255, fulltextindexed=True)
    provenance_mesure = String(maxsize=255, fulltextindexed=True)
    conversion = Float()
    usage = String(fulltextindexed=True)
    achat_matiere = SubjectRelation('AchatMateriaux', cardinality='1*',
                                    constraints = [RQLVocabularyConstraint('T1 achat O, AF avec_mat S, T2 achat AF, T1 compte C1, T2 compte C2, C1 identity C2')]
                                    )
Example #5
0
class AchatMateriaux(EntityType):
    date_achat = Date()
    type_mesure = String(vocabulary=_TYPES_MESURE,
                         fulltextindexed=True)
    quantite = Float()
    quantite_plusieurs = Boolean(default=False, required=True, description='True if quantite is "plusieurs"')
    unite = String(maxsize=255, fulltextindexed=True)
    provenance_mesure = String(maxsize=255, fulltextindexed=True)
    conversion = Float()
    materiaux = SubjectRelation('Materiaux', cardinality='1*', inlined=True)
    remarques = RichString(fulltextindexed=True, default_format='text/rest')
Example #6
0
class FMRIData(EntityType):
    shape_x = Float()
    shape_y = Float()
    shape_z = Float()
    voxel_res_x = Float(required=True)
    voxel_res_y = Float(required=True)
    voxel_res_z = Float(required=True)
    fov_x = Float()
    fov_y = Float()
    tr = Float()
    te = Float()
    field = String(maxsize=10, indexed=True)
Example #7
0
class Personne(EntityType):
    nom = String(fulltextindexed=True, required=True, maxsize=64)
    prenom = String(fulltextindexed=True, maxsize=64)
    sexe = String(maxsize=1,
                  default='M',
                  __permissions__={
                      'read': (
                          'managers',
                          'users',
                          'guests',
                      ),
                      'add': ('managers', 'users'),
                      'update': ('managers', )
                  })
    promo = String(vocabulary=('bon', 'pasbon'))
    titre = String(fulltextindexed=True, maxsize=128)
    ass = String(maxsize=128)
    web = String(maxsize=128)
    tel = Int()
    fax = Int()
    datenaiss = Datetime()
    tzdatenaiss = TZDatetime()
    test = Boolean()
    description = String()
    salary = Float()
    travaille = SubjectRelation('Societe')
Example #8
0
class Person(EntityType):
    __unique_together__ = [('nom', 'prenom')]
    nom = String(maxsize=64, fulltextindexed=True, required=True)
    prenom = String(maxsize=64, fulltextindexed=True)
    sexe = String(maxsize=1, default='M')
    promo = String(vocabulary=('bon', 'pasbon'))
    titre = String(maxsize=128, fulltextindexed=True)
    adel = String(maxsize=128)
    ass = String(maxsize=128)
    web = String(maxsize=128)
    tel = Int(__permissions__={
        'read': (),
        'add': ('managers', ),
        'update': ('managers', )
    })
    fax = Int()
    datenaiss = Date()
    test = Boolean()
    salary = Float()
    travaille = SubjectRelation('Societe',
                                __permissions__={
                                    'read': (),
                                    'add': (),
                                    'delete': ('managers', ),
                                })

    evaluee = SubjectRelation('Note')
Example #9
0
class Affaire(WorkflowableEntityType):
    __permissions__ = {
        'read': ('managers', ERQLExpression('X owned_by U'),
                 ERQLExpression('X concerne S?, S owned_by U')),
        'add': ('managers', ERQLExpression('X concerne S, S owned_by U')),
        'update':
        ('managers', 'owners',
         ERQLExpression('X in_state S, S name in ("pitetre", "en cours")')),
        'delete':
        ('managers', 'owners', ERQLExpression('X concerne S, S owned_by U')),
    }

    ref = String(fulltextindexed=True,
                 indexed=True,
                 constraints=[SizeConstraint(16)])
    sujet = String(fulltextindexed=True, constraints=[SizeConstraint(256)])
    descr = RichString(fulltextindexed=True,
                       description=_('more detailed description'))

    duration = Int()
    invoiced = Float()
    opt_attr = Bytes()

    depends_on = SubjectRelation('Affaire')
    require_permission = SubjectRelation('CWPermission')
    concerne = SubjectRelation(('Societe', 'Note'))
    todo_by = SubjectRelation('Personne', cardinality='?*')
    documented_by = SubjectRelation('Card')
Example #10
0
class Location(EntityType):
    """
    Entity type for location of Geonames.
    See cities1000.zip, cities5000.zip, cities15000.zip and allCountries.txt
    """
    name = String(maxsize=1024, indexed=True, fulltextindexed=True)
    geonameid = Int(indexed=True)
    asciiname = String(maxsize=200, fulltextindexed=True)
    alternatenames = String(fulltextindexed=True)
    latitude = Float(indexed=True)
    longitude = Float(indexed=True)
    feature_class = String(maxsize=1, indexed=True)
    alternate_country_code = String(maxsize=60)
    admin_code_3 = String(maxsize=20)
    admin_code_4 = String(maxsize=20)
    population = BigInt(indexed=True)
    elevation = Int(indexed=True)
    gtopo30 = Int(indexed=True)
    timezone = SubjectRelation('TimeZone', cardinality='?*', inlined=True)
Example #11
0
class DMRIData(EntityType):
    voxel_res_x = Float(required=True, indexed=False)
    voxel_res_y = Float(required=True, indexed=False)
    voxel_res_z = Float(required=True, indexed=False)
    fov_x = Float(indexed=False)
    fov_y = Float(indexed=False)
    tr = Float()
    te = Float(required=True, indexed=False)
    shape_x = Int(indexed=False)
    shape_y = Int(indexed=False)
    shape_z = Int(indexed=False)
    field = String(maxsize=10, indexed=False)
Example #12
0
class Societe(WorkflowableEntityType):
    __permissions__ = {
        'read': ('managers', 'users', 'guests'),
        'update': ('managers', 'owners'),
        'delete': ('managers', 'owners'),
        'add': ('managers', 'users',)
        }
    nom  = String(maxsize=64, fulltextindexed=True)
    web  = String(maxsize=128)
    tel  = Float()
    fax  = Int()
    rncs = String(maxsize=128)
    ad1  = String(maxsize=128)
    ad2  = String(maxsize=128)
    ad3  = String(maxsize=128)
    cp   = String(maxsize=12)
    ville= String(maxsize=32)
Example #13
0
class MRIData(EntityType):
    sequence = String(maxsize=128, indexed=True)
    shape_x = Int(indexed=False)
    shape_y = Int(indexed=False)
    shape_z = Int(indexed=False)
    shape_t = Int(indexed=False)
    voxel_res_x = Float(indexed=False)
    voxel_res_y = Float(indexed=False)
    voxel_res_z = Float(indexed=False)
    fov_x = Float(indexed=False)
    fov_y = Float(indexed=False)
    tr = Float()
    te = Float(indexed=False)
    field = String(maxsize=10, indexed=False)
    affine = Bytes()
Example #14
0
class Prix(EntityType):
    monnaie = SubjectRelation('Monnaie', cardinality='1*', inlined=True)
    livres = Int()
    sous = Int()
    deniers = Float()
    florins = Float()
    florin_ad = Float(description="nombre de deniers(?) dans un 'florin'")
    gros = Float()
    sous_florins = Int()
    denier_florins = Float()
    monnaie_or = Float()
    conversion = Float()
    source = String(vocabulary=[_('direct'),
                                _('conv_transaction'),
                                _('conv_compte'),
                                _('conv_voisin'),
                                _('conv_voisin 2'),
                                _('conv_externe'),
                                _('no_transaction'),])

    changes = SubjectRelation('Change', cardinality='**')
Example #15
0
class Assessment(EntityType):
    """ Store information about a visit """
    identifier = String(required=True, maxsize=256, unique=True)
    age_of_subject = Float(indexed=True)
    timepoint = String(maxsize=64, indexed=True)
Example #16
0
class ScoreValue(EntityType):
    text = String(maxsize=2048, fulltextindexed=True)
    value = Float(indexed=True)
    datetime = Date()
Example #17
0
class Company(EntityType):
    score100 = Float(
        formula='Any AVG(NN) WHERE X employees E, N concerns E, N note100 NN')
Example #18
0
class Monnaie(EntityType):
    nom = String(maxsize=255, required=True, fulltextindexed=True)
    type = String(required=True, vocabulary=['Livre/Sous/Denier', 'Florin/Gros', 'Or'])
    nb_gros = Float()
Example #19
0
class Foo(EntityType):
    i = Int(required=True, metadata={'name': String()})
    f = Float()
    d = Datetime()
Example #20
0
class AchatPretPorter(EntityType):
    date_achat = Date()
    quantite = Float()
    quantite_plusieurs = Boolean(default=False, required=True, description='True if quantite is "plusieurs"')
    parure = SubjectRelation('Parure', cardinality='1*', inlined=True)
    remarques = RichString(fulltextindexed=True, default_format='text/rest')
Example #21
0
class PersonAttrAdd3(EntityType):
    nom = String()
    prenom = String()
    age = Int()
    salaire = Float()
    is_spouse_of = SubjectRelation('PersonAttrAdd')
Example #22
0
class PersonAttrAdd2(EntityType):
    nom = String()
    prenom = String()
    salaire = Float()
    is_friend_of = SubjectRelation('PersonAttrAdd')
Example #23
0
class PersonAttrMod(EntityType):
    nom = String()
    prenom = Float()