Ejemplo n.º 1
0
 def __init__(self, name,
              display_file, original_file=None, thumbnail_file=None,
              description=None,
              location=None,
              date=datetime.datetime.now(),
              original_size=(-1, -1),
              display_size=(-1, -1),
              thumbnail_size=(-1, -1),
              parent=None):
     Persistent.__init__(self)
     PersistentLocationAware.__init__(self)
     self.__name__ = name
     self.__parent__ = parent
     self.display_file = display_file
     self.original_file = original_file
     self.thumbnail_file = thumbnail_file
     self.description = description
     self.location = location
     self.date = date
     self.original_width = original_size[0]
     self.original_height = original_size[1]
     self.display_width = display_size[0]
     self.display_height = display_size[1]
     self.thumbnail_width = thumbnail_size[0]
     self.thumbnail_height = thumbnail_size[1]
Ejemplo n.º 2
0
 def __init__(self,
              name,
              big_image_view,
              regular_image_view,
              small_image_view,
              description=None,
              location=None,
              date=datetime.datetime.now(),
              parent=None):
     Persistent.__init__(self)
     PersistentLocationAware.__init__(self, name, parent)
     if isinstance(big_image_view, GalleryImageFile):
         self.big_image_view = GalleryImageView(big_image_view)
     else:
         assert isinstance(big_image_view, GalleryImageView)
         self.big_image_view = big_image_view
     if isinstance(regular_image_view, GalleryImageFile):
         self.regular_image_view = GalleryImageView(regular_image_view)
     else:
         assert isinstance(regular_image_view, GalleryImageView)
         self.regular_image_view = regular_image_view
     if isinstance(small_image_view, GalleryImageFile):
         self.small_image_view = GalleryImageView(small_image_view)
     else:
         assert isinstance(small_image_view, GalleryImageView)
         self.small_image_view = small_image_view
     self.description = description
     self.location = location
     self.date = date
Ejemplo n.º 3
0
 def __init__(self,
              name,
              display_file,
              original_file=None,
              thumbnail_file=None,
              description=None,
              location=None,
              date=datetime.datetime.now(),
              original_size=(-1, -1),
              display_size=(-1, -1),
              thumbnail_size=(-1, -1),
              parent=None):
     Persistent.__init__(self)
     PersistentLocationAware.__init__(self)
     self.__name__ = name
     self.__parent__ = parent
     self.display_file = display_file
     self.original_file = original_file
     self.thumbnail_file = thumbnail_file
     self.description = description
     self.location = location
     self.date = date
     self.original_width = original_size[0]
     self.original_height = original_size[1]
     self.display_width = display_size[0]
     self.display_height = display_size[1]
     self.thumbnail_width = thumbnail_size[0]
     self.thumbnail_height = thumbnail_size[1]
Ejemplo n.º 4
0
 def __init__(self, **data):
     """
     constructor of Superclass
     """
     Persistent.__init__(self)
     ISuperclass['objectID'].readonly = False
     self.objectID = generateOid(self)
     self.ikName = self.objectID
     for (name, value) in data.items():
         if name in ISuperclass.names():
             setattr(self, name, value)
     ISuperclass['objectID'].readonly = True
     self.ikAuthor = u""
     self.dbgLevel = NOTSET
     self.history = RingBuffer(20)
     self.inpEQueue = Queue()
     self.outEQueue = Queue()
     self.outEReceiver = None
     self.workflows = {}
     self.wf_worklist = []
     interaction = queryInteraction()
     if interaction is not None:
         for participation in interaction.participations:
             #principalid = participation.principal.id
             principal_title = participation.principal.title
             self.ikAuthor += unicode(principal_title)
     self.myFactory = str(self.__class__).split("'")[1]
     self.ikRevision = __version__
Ejemplo n.º 5
0
 def __init__(self, parent, name, data={}):
     Persistent.__init__(self)
     # import ipdb; ipdb.set_trace()
     self.__parent__ = parent
     self.__name__ = name
     self.__parent__[self.__name__] = self
     self.data = data
Ejemplo n.º 6
0
    def __init__(self, content_id, data=None, **kwargs):

        if not data:
            data = {}

        Persistent.__init__(self)
        Base.__init__(self, content_id, data=data)
Ejemplo n.º 7
0
    def __init__(self, crumb_name, owner, id):
        Persistent.__init__(self)
        self.owner = owner
        self.timestamp = datetime.now()
        self.id = id

        # Name used in breadcrumps
        self.crumb_name = crumb_name
Ejemplo n.º 8
0
 def __init__(self):
     Persistent.__init__(self)
     UserMixin.__init__(self)
     self.uid = WORLD_UID
     self.username = '******'
     self.email = ''
     self._password = ''
     self._set_defaults()
Ejemplo n.º 9
0
    def __init__(self, crumb_name, owner, id):
        Persistent.__init__(self)
        self.owner = owner
        self.timestamp = datetime.now()
        self.id = id

        # Name used in breadcrumps
        self.crumb_name = crumb_name
Ejemplo n.º 10
0
 def __init__(self, username, email, password):
     Persistent.__init__(self)
     UserMixin.__init__(self)
     self.username = username
     self.email = email
     self.password = password
     self._set_defaults()
     self.uid = db['player_uid'].get_next_id()
Ejemplo n.º 11
0
 def __init__(self, name, contacts):
     Persistent.__init__(self)
     self.key           = contacts.maxKey() + 1
     self.__parent__    = contacts
     self.__name__      = self.key
     for heading in contacts.Headings:
         self.__setattr__(heading, "")
     self.name          = name
     contacts[self.key] = self
Ejemplo n.º 12
0
 def __init__(self, name, users):
     Persistent.__init__(self)
     self.key = users.maxKey() + 1
     self.__parent__ = users
     self.__name__ = self.key
     self.name = name
     self._passHash = ""
     self._groups = PersistentList()
     self.contact = None
     users[self.key] = self
Ejemplo n.º 13
0
	def __init__(self, id = None):
		Persistent.__init__(self)
		if id is not None:
			self.ID = id
		else:
			self.ID = uuid.uuid4()
		self.Name = ""
		self.Attributes = PersistentMapping()
		self.TitleAttr = None
		self.Graphics = None
Ejemplo n.º 14
0
 def __init__(self, id=None):
     Persistent.__init__(self)
     if id is not None:
         self.ID = id
     else:
         self.ID = uuid.uuid4()
     self.Name = ""
     self.Attributes = PersistentMapping()
     self.TitleAttr = None
     self.Graphics = None
Ejemplo n.º 15
0
	def __init__(self, id = None):
		Persistent.__init__(self)
		if id is not None:
			self.ID = id
		else:
			self.ID = uuid.uuid4()
		self.TemplateName = ""
		self.Attributes = PersistentMapping()
		self.TitleAttr = None
		self.Graphics = None
		self.IsReflection = False
		self.Tag = None
Ejemplo n.º 16
0
 def __init__(self, id=None):
     Persistent.__init__(self)
     if id is not None:
         self.ID = id
     else:
         self.ID = uuid.uuid4()
     self.TemplateName = ""
     self.Attributes = PersistentMapping()
     self.TitleAttr = None
     self.Graphics = None
     self.IsReflection = False
     self.Tag = None
Ejemplo n.º 17
0
 def __init__( self, name, owner, conference, modificationDate=None, createdInLocalServer=True, showRoom=False ):
     Persistent.__init__(self)
     self._name = name
     self._owner = owner
     self._creationDate = nowutc()
     self._conferences = PersistentMapping()
     self._conferences[conference.getId()] = conference
     self._modificationDate = modificationDate
     self._createdInLocalServer = createdInLocalServer
     self._showRoom = showRoom
     #the id will be assigned just before being stored in the DB.
     #If we try to create a counter now it will fail if it's the first chatroom
     #in the conference, since no indexes have been created yet
     self._id = None
Ejemplo n.º 18
0
 def __init__( self, name, owner, conference, modificationDate=None, createdInLocalServer=True, showRoom=False ):
     Persistent.__init__(self)
     self._name = name
     self._owner = owner
     self._creationDate = nowutc()
     self._conferences = PersistentMapping()
     self._conferences[conference.getId()] = conference
     self._modificationDate = modificationDate
     self._createdInLocalServer = createdInLocalServer
     self._showRoom = showRoom
     #the id will be assigned just before being stored in the DB.
     #If we try to create a counter now it will fail if it's the first chatroom
     #in the conference, since no indexes have been created yet
     self._id = None
Ejemplo n.º 19
0
 def __init__(
     self,
     transition_function=None,
     initial_state=0,
     data=None, transition_table=None):
     """Initialize with transition rules for each state, and optionally
     include the initial state (default 0) or data (default None).
     """
     Persistent.__init__(self)
     if transition_function != None:
         self.transition_function = transition_function
     self.__transition_table = transition_table
     self.__data = data
     self.__state = initial_state
    def __init__(self):
        Persistent.__init__(self)
        # mapping of front end transaction identifiers to
        # backend transaction state machines
        #
        # perhaps this should be volitile?
        self.__front_end_to_back = {}

        # mapping of front end transaction identifiers to an input
        # for that transaction's state machine
        self.dirty_transaction_set = {}
        # set of front end transaction identified that are dirty, but
        # but are considered impossible to syncronize and are thus being
        # held instead of subjected to failed attempt after failed
        # attempt to syncrhonize
        self.held_transaction_set = set()
Ejemplo n.º 21
0
 def __init__(self, name, big_image_view, regular_image_view,
              small_image_view, description=None, location=None,
              date=datetime.datetime.now(), parent=None):
     Persistent.__init__(self)
     PersistentLocationAware.__init__(self, name, parent)
     if isinstance(big_image_view, GalleryImageFile):
         self.big_image_view = GalleryImageView(big_image_view)
     else:
         assert isinstance(big_image_view, GalleryImageView)
         self.big_image_view = big_image_view
     if isinstance(regular_image_view, GalleryImageFile):
         self.regular_image_view = GalleryImageView(regular_image_view)
     else:
         assert isinstance(regular_image_view, GalleryImageView)
         self.regular_image_view = regular_image_view
     if isinstance(small_image_view, GalleryImageFile):
         self.small_image_view = GalleryImageView(small_image_view)
     else:
         assert isinstance(small_image_view, GalleryImageView)
         self.small_image_view = small_image_view
     self.description = description
     self.location = location
     self.date = date
Ejemplo n.º 22
0
    def __init__(self, settings = {}, initialValuesGenerator = None):
        ''' Init. settings provide many means to customize the spatial tree.
            E.g. setting leaf_capacity and near_minimum_overlap_factor to "good"
            values can help to reduce the possibility of write conflict errors.
            
            Below is a list of the currently available properties. For more info
            about these and other properties see the rtree docs and/or code.
            
                writethrough
                buffering_capacity
                pagesize
                leaf_capacity
                near_minimum_overlap_factor
                type
                variant
                dimension
                index_capacity
                index_pool_capacity
                point_pool_capacity
                region_pool_capacity
                tight_mbr
                fill_factor
                split_distribution_factor
                tpr_horizon
                reinsert_factor
                
            If you supply an initialValuesGenerator you can build a spatial index
            from initial values. This is much faster than doing repeated insert()s.
        '''
        Persistent.__init__( self )
        self.family = settings.pop( 'family', self.default_family )
        self.settings = PersistentDict( settings )
        self.pageData = self.family.IO.BTree()             # here we save the actual rtree data in
        self.idToCoordinates = self.family.IO.BTree()      # we need to know the coordinates for each objectid to be able to delete it

        # this creates the tree and creates header and root pages
        self._getTree( initialValuesGenerator )
Ejemplo n.º 23
0
 def __init__(self):
     Persistent.__init__(self)
     Contained.__init__(self)
     self.uids = OOBTree()
     self.data = OOBTree()
Ejemplo n.º 24
0
 def __init__(self):
     Persistent.__init__(self)
     Contained.__init__(self)
     self.uids = OOBTree()
     self.data = OOBTree()
Ejemplo n.º 25
0
 def __init__(self):
     Persistent.__init__(self)
     self._items = PersistentList()
Ejemplo n.º 26
0
	def __init__(self):
		Persistent.__init__(self)
		self.objects = PersistentMapping()
		self.templates = PersistentMapping()
		self.shapes = PersistentMapping()
		self.Tag = None
Ejemplo n.º 27
0
 def __init__(self, **kwargs):
     Persistent.__init__(self)
     components.Content.__init__(self, **kwargs)
Ejemplo n.º 28
0
 def __init__(self):
     self._data = OOBTree()
     Persistent.__init__(self)
     self.__len = Length()
Ejemplo n.º 29
0
 def __init__(self, **kwargs):
     Persistent.__init__(self)
     Model.__init__(self, **kwargs)
Ejemplo n.º 30
0
 def __init__(self, name):
     Persistent.__init__(self)
     self.__name__ = name
     self.id = name
     self.name = name
Ejemplo n.º 31
0
 def __init__(self, **kwargs):
     Persistent.__init__(self)
     components.Content.__init__(self, **kwargs)
Ejemplo n.º 32
0
 def __init__(self, *args, **kw):
     Persistent.__init__(self)
     InterfaceClass.__init__(self, *args, **kw)
     
     self.dependents = FlexibleWeakKeyDictionary()
Ejemplo n.º 33
0
 def __init__(self):
     Persistent.__init__(self)
     Contained.__init__(self)
     self.task_id = celery.utils.uuid()
Ejemplo n.º 34
0
 def __init__(self, name, parent):
     Persistent.__init__(self)
     #resId = findUniqueId(parent, name)
     self.__parent__ = parent
     #self.__name__   = resId
     self.name = name
Ejemplo n.º 35
0
 def __init__(self, name, description, long_description, parent=None):
     Persistent.__init__(self)
     PersistentLocationAware.__init__(self, name, parent)
     self.description = description
     self.long_description = long_description
Ejemplo n.º 36
0
 def __init__(self, name, description, long_description, parent=None):
     Persistent.__init__(self)
     PersistentLocationAware.__init__(self, name, parent)
     self.description = description
     self.long_description = long_description
Ejemplo n.º 37
0
 def __init__(self, name, parent):
     Persistent.__init__(self)
     #resId = findUniqueId(parent, name)
     self.__parent__ = parent
     #self.__name__   = resId
     self.name       = name
Ejemplo n.º 38
0
	def __init__(self, name):
		Persistent.__init__(self)
		self.ID = name
Ejemplo n.º 39
0
 def __init__(self, title):
     Persistent.__init__(self)
     self.title = title
Ejemplo n.º 40
0
 def __init__(self):
     Persistent.__init__(self)
     self.objects = PersistentMapping()
     self.templates = PersistentMapping()
     self.shapes = PersistentMapping()
     self.Tag = None
Ejemplo n.º 41
0
	def __init__(self):
		Persistent.__init__(self)
		self.objects = PersistentMapping()
		self.links = PersistentMapping()
		self.graph_data = PersistentMapping()
		self.Tag = None
Ejemplo n.º 42
0
 def __init__(self):
     Persistent.__init__(self)
     Contained.__init__(self)
     self.task_id = celery.utils.uuid()
Ejemplo n.º 43
0
 def __init__(self, email, message):
     Persistent.__init__(self)
     self.email = unicode(email)
     self.message = unicode(message)
Ejemplo n.º 44
0
 def __init__(self):
     Persistent.__init__(self)
     self.objects = PersistentMapping()
     self.links = PersistentMapping()
     self.graph_data = PersistentMapping()
     self.Tag = None
Ejemplo n.º 45
0
 def __init__(self, *args, **kw):
     Persistent.__init__(self)
     Schedule.__init__(self, *args, **kw)
     self.exceptions = PersistentDict()
Ejemplo n.º 46
0
 def __init__(self, *args, **kw):
     Persistent.__init__(self)
     Schedule.__init__(self, *args, **kw)
     self.exceptions = PersistentDict()
Ejemplo n.º 47
0
    def __init__(self, *args, **kw):
        Persistent.__init__(self)
        InterfaceClass.__init__(self, *args, **kw)

        self.dependents = PersistentDict()
Ejemplo n.º 48
0
 def __init__(self, name):
     Persistent.__init__(self)
     self.ID = name