Exemplo n.º 1
0
 def __parseTaskNode(self, taskNode):
     subject = taskNode.getAttribute('subject')
     id = taskNode.getAttribute('id')
     description = self.__parseDescription(taskNode)
     startDate = date.parseDate(taskNode.getAttribute('startdate'))
     dueDate = date.parseDate(taskNode.getAttribute('duedate'))
     completionDate = date.parseDate(taskNode.getAttribute('completiondate'))
     budget = date.parseTimeDelta(taskNode.getAttribute('budget'))
     priority = self.__parseInteger(taskNode.getAttribute('priority'))
     lastModificationTime = \
         self.__parseDateTime(taskNode.getAttribute('lastModificationTime'))
     hourlyFee = self.__parseFloat(taskNode.getAttribute('hourlyFee'))
     fixedFee = self.__parseFloat(taskNode.getAttribute('fixedFee'))
     reminder = self.__parseDateTime(taskNode.getAttribute('reminder'))
     attachments = self.__parseAttachmentNodes(taskNode.childNodes)
     shouldMarkCompletedWhenAllChildrenCompleted = \
         self.__parseBoolean(taskNode.getAttribute('shouldMarkCompletedWhenAllChildrenCompleted'))
     if self.__tskversion <= 13:
         categories = self.__parseCategoryNodesWithinTaskNode(taskNode.childNodes)
     else:
         categories = []
     children = self.__parseTaskNodes(taskNode.childNodes)
     efforts = self.__parseEffortNodes(taskNode.childNodes)
     parent = task.Task(subject, description, id_=id, startDate=startDate, 
         dueDate=dueDate, completionDate=completionDate, budget=budget, 
         priority=priority, lastModificationTime=lastModificationTime, 
         hourlyFee=hourlyFee, fixedFee=fixedFee, reminder=reminder, 
         categories=categories, attachments=attachments, children=children,
         efforts=efforts,
         shouldMarkCompletedWhenAllChildrenCompleted=\
             shouldMarkCompletedWhenAllChildrenCompleted)
     return parent        
Exemplo n.º 2
0
 def get(self):
     return date.parseTimeDelta(self._entry.GetValue())