Exemplo n.º 1
0
 def setRepeatEvery(self, repeatEvery):
     if repeatEvery is None:
         self.repeatEvery = None
     else:
         assert_arg_type(repeatEvery, str)
         assert_arg_value(repeatEvery, self.REPEAT_EVERY_DAY, self.REPEAT_EVERY_WEEK)
         self.repeatEvery = repeatEvery
Exemplo n.º 2
0
 def setShape(self, shape):
     if shape is None:
         self.shape = None
     else:
         assert_arg_type(shape, AreaShape)
         # the encoded data must always be a type 'str'
         self.shape = str(shape.dbEncode())
Exemplo n.º 3
0
 def setShape(self, shape):
     if shape is None:
         self.shape = None
     else:
         assert_arg_type(shape, AreaShape)
         # the encoded data must always be a type 'str'
         self.shape = str(shape.dbEncode())
Exemplo n.º 4
0
    def add_filter_object(self, qObj):
        assert_arg_type(qObj, Q)

        if not self.where_node:
            self.where_node = qObj
        else:
            self.where_node = self.where_node & qObj
Exemplo n.º 5
0
 def setRepeatEvery(self, repeatEvery):
     if repeatEvery is None:
         self.repeatEvery = None
     else:
         assert_arg_type(repeatEvery, str)
         assert_arg_value(repeatEvery, self.REPEAT_EVERY_DAY,
                          self.REPEAT_EVERY_WEEK)
         self.repeatEvery = repeatEvery
Exemplo n.º 6
0
 def __init__(self, x, y):
     assert_arg_type(x, float)
     assert_arg_type(y, float)
     self._x = x
     self._y = y
Exemplo n.º 7
0
 def __init__(self, lat, long):
     assert_arg_type(lat, float)
     assert_arg_type(long, float)
     self.lat = lat
     self.long = long
Exemplo n.º 8
0
 def setCategory(self, cat):
     assert_arg_type(cat, str)
     assert_arg_value(cat, self.CATEGORY_DEFAULT, self.CATEGORY_ORDERING)
     self.category = cat
Exemplo n.º 9
0
 def removeArea(self, area):
     assert_arg_type(area, Area)
     self.areaCollection.removeObj(area)
Exemplo n.º 10
0
 def setAreaCollection(self, areac):
     assert_arg_type(areac, DBCollection)
     assert_arg_value(areac.domain, AREA_DOMAIN)
     self.areaCollection = areac
     self._updateAreaLevel(self.level)
Exemplo n.º 11
0
 def addDateTime(self, dateTime):
     assert_arg_type(dateTime, datetime)
     self.dateTimeTriggers.append(dateTime.strftime("%Y-%m-%d %H:%M:%S"))
Exemplo n.º 12
0
 def setName(self, firstName, lastName):
     assert_arg_type(firstName, str)
     assert_arg_type(lastName, str)
     self.firstName = firstName
     self.lastName = lastName
Exemplo n.º 13
0
 def setLevel(self, level):
     assert_arg_type(level, int)
     # TODO: check max level
     self.level = str(level)
Exemplo n.º 14
0
 def setType(self, type):
     assert_arg_type(type, str)
     assert_arg_value(type, self.TYPE_INTEREST, self.TYPE_NON_INTEREST)
     self.type = type
Exemplo n.º 15
0
 def addAnnotation(self, ann):
     assert_arg_type(ann, Annotation)
     self.annotations.addObj(ann)
Exemplo n.º 16
0
 def setFbId(self, fbId):
     assert_arg_type(fbId, str)
     self.fbId = fbId
Exemplo n.º 17
0
 def setData(self, data):
     if isinstance(data, str):
         self.data = data
     else:
         assert_arg_type(data, DataField)
         self.data = str(data.dbEncode())
Exemplo n.º 18
0
 def addAnnotation(self, ann):
     assert_arg_type(ann, Annotation)
     self.annotations.addObj(ann)
Exemplo n.º 19
0
 def setEmail(self, email):
     assert_arg_type(email, str)
     self.email = email
Exemplo n.º 20
0
 def setEmail(self, email):
     assert_arg_type(email, str)
     self.email = email
Exemplo n.º 21
0
 def setFbId(self, fbId):
     assert_arg_type(fbId, str)
     self.fbId = fbId
Exemplo n.º 22
0
 def addArea(self, area):
     assert_arg_type(area, Area)
     area.setLevel(self.level)
     self.areaCollection.addObj(area)
Exemplo n.º 23
0
 def setAreaCollection(self, areac):
     assert_arg_type(areac, DBCollection)
     assert_arg_value(areac.domain, AREA_DOMAIN)
     self.areaCollection = areac
     self._updateAreaLevel(self.level)
Exemplo n.º 24
0
 def setLevel(self, level):
     assert_arg_type(level, int)
     self.level = level
     self._updateAreaLevel(level)
Exemplo n.º 25
0
 def addArea(self, area):
     assert_arg_type(area, Area)
     area.setLevel(self.level)
     self.areaCollection.addObj(area)
Exemplo n.º 26
0
 def __init__(self, x, y):
     assert_arg_type(x, float)
     assert_arg_type(y, float)
     self._x = x
     self._y = y
Exemplo n.º 27
0
 def removeArea(self, area):
     assert_arg_type(area, Area)
     self.areaCollection.removeObj(area)
Exemplo n.º 28
0
 def addDateTime(self, dateTime):
     assert_arg_type(dateTime, datetime)
     self.dateTimeTriggers.append(dateTime.strftime("%Y-%m-%d %H:%M:%S"))
Exemplo n.º 29
0
 def setLevel(self, level):
     assert_arg_type(level, int)
     self.level = level
     self._updateAreaLevel(level)
Exemplo n.º 30
0
 def addAnnouncement(self, ann):
     assert_arg_type(ann, Announcement)
     self.announcements.addObj(ann)
Exemplo n.º 31
0
 def setCategory(self, category):
     assert_arg_type(category, str)
     assert_arg_value(category, self.CATEGORY_DEFAULT, self.CATEGORY_ORDERING)
     self.category = category
Exemplo n.º 32
0
 def __init__(self, lat, long):
     assert_arg_type(lat, float)
     assert_arg_type(long, float)
     self.lat = lat
     self.long = long
Exemplo n.º 33
0
 def setType(self, type):
     assert_arg_type(type, str)
     assert_arg_value(type, self.TYPE_INTEREST, self.TYPE_NON_INTEREST)
     self.type = type
Exemplo n.º 34
0
 def setTimestamp(self, timestamp):
     assert_arg_type(timestamp, int)
     self.timestamp = timestamp
Exemplo n.º 35
0
 def setTimestamp(self, timestamp):
     assert_arg_type(timestamp, int)
     self.timestamp = timestamp
Exemplo n.º 36
0
 def setData(self, data):
     if isinstance(data, str):
         self.data = data
     else:
         assert_arg_type(data, DataField)
         self.data = str(data.dbEncode())
Exemplo n.º 37
0
 def setRelation(self, relation):
     assert_arg_type(relation, str)
     assert_arg_value(relation, self.RELATION_PUBLIC, self.RELATION_PRIVATE)
     self.relation = relation
Exemplo n.º 38
0
 def setLevel(self, level):
     assert_arg_type(level, int)
     # TODO: check max level
     self.level = str(level)
Exemplo n.º 39
0
 def setName(self, firstName, lastName):
     assert_arg_type(firstName, str)
     assert_arg_type(lastName, str)
     self.firstName = firstName
     self.lastName = lastName
Exemplo n.º 40
0
 def addAnnouncement(self, ann):
     assert_arg_type(ann, Announcement)
     self.announcements.addObj(ann)
Exemplo n.º 41
0
 def setRelation(self, relation):
     assert_arg_type(relation, str)
     assert_arg_value(relation, self.RELATION_PUBLIC, self.RELATION_PRIVATE)
     self.relation = relation