Exemple #1
0
    def setGeneralInformation(self, aString):
        m = GENERAL_INFORMATION_PATTERN.match(aString)

        if m:
            self.seqlHeader_raw = m.group('seqlHeader_raw')
            self.seqlHeader = safeStrip(self.seqlHeader_raw)
            self.applicant_raw = m.group('applicant_raw')
            self.applicant_val = m.group('applicant')
            applicantLines = self.applicant_val.splitlines()
            self.applicant = [
                a.strip() for a in applicantLines if a.strip() != ''
            ]
            self.title_raw = m.group('title_raw')
            self.title = su.inOneLine(safeStrip(m.group('title')))
            self.reference_raw = m.group('reference_raw')
            self.reference = safeStrip(m.group('reference'))
            self.applicationNumber_raw = m.group('applicationNumber_raw')
            self.applicationNumber = safeStrip(m.group('applicationNumber'))
            self.filingDate = safeStrip(m.group('filingDate'))
            self.filingDate_raw = m.group('filingDate_raw')
            self.priorities_raw = m.group('priorities_raw')
            self.priorities = su.parsePriorities(self.priorities_raw)
            self.quantity_raw = m.group('quantity_raw')
            self.quantity = safeStrip(m.group('quantity'))
            self.software_raw = m.group('software_raw')
            self.software = safeStrip(m.group('software'))
            self.isSeql = True

        else:
            print 'File', self.filePath
            print 'SequenceListing: No match for general information pattern.'
Exemple #2
0
 def setGeneralInformation(self, aString):
     m = GENERAL_INFORMATION_PATTERN.match(aString)
       
     if m:
         self.seqlHeader_raw = m.group('seqlHeader_raw')
         self.seqlHeader = safeStrip(self.seqlHeader_raw)
         self.applicant_raw = m.group('applicant_raw')
         self.applicant_val = m.group('applicant')
         applicantLines = self.applicant_val.splitlines()
         self.applicant = [a.strip() for a in applicantLines if a.strip() != ''] 
         self.title_raw = m.group('title_raw')
         self.title = su.inOneLine(safeStrip(m.group('title')))
         self.reference_raw = m.group('reference_raw')
         self.reference = safeStrip(m.group('reference'))
         self.applicationNumber_raw = m.group('applicationNumber_raw')
         self.applicationNumber = safeStrip(m.group('applicationNumber'))
         self.filingDate = safeStrip(m.group('filingDate'))
         self.filingDate_raw = m.group('filingDate_raw')
         self.priorities_raw = m.group('priorities_raw')
         self.priorities = su.parsePriorities(self.priorities_raw)
         self.quantity_raw = m.group('quantity_raw')
         self.quantity = safeStrip(m.group('quantity'))
         self.software_raw = m.group('software_raw')
         self.software = safeStrip(m.group('software'))
         self.isSeql = True
         
     else:
         print 'File', self.filePath
         print 'SequenceListing: No match for general information pattern.'
 def test_parsePriorities(self):
     ins = '<150>  61536558 - prio1\r\n\r\n<151>  2001-01-01\r\n\r\n'
     exp = [('61536558 - prio1', '2001-01-01')]
     self.assertEqual(exp, seqlutils.parsePriorities(ins))
 def test_parsePriorities(self):
     ins = '<150>  61536558 - prio1\r\n\r\n<151>  2001-01-01\r\n\r\n'
     exp = [('61536558 - prio1', '2001-01-01')]
     self.assertEqual(exp, seqlutils.parsePriorities(ins))