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 __init__(self, inStr): self.genInfoPatternFound = False self.applicant = [] self.title = '-' self.reference = '-' self.applicationNumber = '-' self.filingDate = '-' self.priority = [] # a list of tuples (applNumber, filingDate) self.quantity = 0 self.software = '-' m = generalInformationPattern.match(inStr) if m: applicantLines = m.group('applicant').splitlines() self.applicant = [a.strip() for a in applicantLines if a.strip() != ''] self.title = su.inOneLine(safeStrip(m.group('title'))) self.reference = safeStrip(m.group('reference')) self.applicationNumber = safeStrip(m.group('applicationNumber')) self.filingDate = safeStrip(m.group('filingDate')) pg = m.group('priority') # if pg.endswith('<'): # pg = pg[:1] # print 'pg' # print pg if pg: self.priority = self.parsePriority(safeStrip(pg[:-1])) self.quantity = safeStrip(m.group('quantity')) self.software = safeStrip(m.group('software')) self.genInfoPatternFound = True
def __init__(self, inStr): self.genInfoPatternFound = False self.seqlHeader = '-' self.applicant = [] self.title = '-' self.reference = '-' self.applicationNumber = '-' self.filingDate = '-' self.priority = [] # a list of tuples (applNumber, filingDate) self.quantity = 0 self.software = '-' m = generalInformationPattern.match(inStr) if m: self.seqlHeader = safeStrip(m.group('header')) applicantLines = m.group('applicant').splitlines() self.applicant = [a.strip() for a in applicantLines if a.strip() != ''] self.title = su.inOneLine(safeStrip(m.group('title'))) self.reference = safeStrip(m.group('reference')) self.applicationNumber = safeStrip(m.group('applicationNumber')) self.filingDate = safeStrip(m.group('filingDate')) pg = m.group('priority') # if pg.endswith('<'): # pg = pg[:1] # print 'pg' # print pg if pg: self.priority = self.parsePriorities(safeStrip(pg[:-1])) self.quantity = safeStrip(m.group('quantity')) self.software = safeStrip(m.group('software')) self.genInfoPatternFound = True
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 __init__(self, fm): self.featureHeader_raw = fm.group('featureHeader_raw') self.featureHeader = safeStrip(fm.group('featureHeader')) self.key_raw = fm.group('key_raw') self.key = safeStrip(fm.group('key')) self.location_raw = fm.group('location_raw') self.location = safeStrip(fm.group('location')) self.description_raw = fm.group('description_raw') self.description = su.inOneLine(safeStrip(fm.group('description'))) self.translation = su.DEFAULT_STRING
def __init__(self, m): # print '\tf inStr xx%sxx' %inStr # TODO: code needed for 220 missing self.featureHeader = '-' self.key = '-' self.location = '-' self.description = '-' self.featureHeader = safeStrip(m.group('featureHeader')) if m.group('key'): self.key = safeStrip(m.group('key')) if m.group('location'): self.location = safeStrip(m.group('location')) if m.group('description'): self.description = safeStrip(m.group('description')) if self.description: self.description = su.inOneLine(self.description)
def __init__(self, m): # print '\tf inStr xx%sxx' %inStr # TODO: code needed for 220 missing self.featureHeader = '-' self.key = '-' self.location = '-' self.description = su.DEFAULT_STRING self.translation = su.DEFAULT_STRING self.featureHeader = safeStrip(m.group('featureHeader')) if m.group('key'): self.key = safeStrip(m.group('key')) if m.group('location'): self.location = safeStrip(m.group('location')) if m.group('description'): self.description = safeStrip(m.group('description')) if self.description: self.description = su.inOneLine(self.description)