def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) if self[self.primarykey] is None or \ len(str(self[self.primarykey])) < 2: self[self.primarykey] = '%s_%s' % ( self.label, self.getHashValue(str(self.BaseAttributes))) pass
def __init__(self, name=None, code=None, **kwargs): BaseEntity.__init__(self, **kwargs) if name is not None: self['NAME'] = name if code is not None: self['CODE'] = code pass
def __init__(self, address='', **kwargs): BaseEntity.__init__(self, **kwargs) address = str(address).replace(' ', '') if len(address) > 1: self['ADDRESS'] = address # self.__split_levels__() pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) # if self[self.primarykey] is None: # self[self.primarykey] = '%s_%s' % ( # self.label, # self.getHashValue(str(self.BaseAttributes)) # ) pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) # self['HASH_ID'] = hash(str(self.BaseAttributes)) self[self.primarykey] = '%s_%s' % ( self.label, self.getHashValue(str(self.BaseAttributes))) # if 'URL' in self.BaseAttributes.keys(): # self['URL'] = self.parser_url( # self['URL']) pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) if self[self.primarykey] is None: if self['NAME'] is not None and \ len(str(self['NAME'])) > 1: self[self.primarykey] = '%s_%s' % ( self.label, self.getHashValue(self['NAME']) ) pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) # self['HASH_ID'] = hash(str(self.BaseAttributes)) # if 'URL' in self.BaseAttributes.keys(): # self['URL'] = self.format_url(self['URL']) if self['URL'] is None: self['URL'] = '%s_%s' % ( self.label, self.getHashValue(str(self.BaseAttributes)) ) pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) if 'URL' in self.BaseAttributes.keys(): self['URL'] = self.parser_url(self['URL']) if self['URL'] is None: if len(self['NAME']) < 2: self['NAME'] = None else: self['URL'] = '%s_%s' % (self.label, self.getHashValue(self['NAME'])) pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) if 'CASE_IDENTITY' in self.BaseAttributes.keys(): self.CASE_IDENTITY = self.BaseAttributes.pop('CASE_IDENTITY') else: self.CASE_IDENTITY = None if self[self.primarykey] is None or \ len(str(self[self.primarykey])) < 2: self[self.primarykey] = '%s_%s' % ( self.label, self.getHashValue(str(self.BaseAttributes))) pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) # self['HASH_ID'] = hash(str(self.BaseAttributes)) if 'URL' in self.BaseAttributes.keys(): self['URL'] = self.parser_url(self['URL']) if self['URL'] is None: if len(self['NAME']) < 2: self['NAME'] = None else: self['URL'] = 'Possession_%s' % self.getHashValue( self['NAME']) pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) if 'URL' in self.BaseAttributes.keys(): self['URL'] = self.parser_url( self['URL']) if self[self.primarykey] is None or \ len(self[self.primarykey]) < 2: self[self.primarykey] = '%s_%s' % ( self.label, self.getHashValue(str(self.BaseAttributes)) ) pass
def __init__(self, **kwargs): BaseEntity.__init__(self) if len(kwargs): sks = self.synonyms.keys() cad = self.chineseAttributeDict() for k, v in zip(kwargs.keys(), kwargs.values()): if k in cad.keys(): self[cad[k]] = v elif k in sks: self[cad[self.synonyms[k]]] = v else: warnings.warn('Undefined key for dict of applets.') self[k] = v pass
def __init__(self, NAME=None, SEX=None, EDUCATION=None, URL=None, **kwargs): BaseEntity.__init__(self, **kwargs) if NAME is not None: self[self.get_englishAttribute_by_chinese('姓名')] = NAME if SEX is not None: self[self.get_englishAttribute_by_chinese('性别')] = SEX if EDUCATION is not None: self[self.get_englishAttribute_by_chinese('学历')] = EDUCATION if URL is not None: self[self.get_englishAttribute_by_chinese('链接')] = URL if 'URL' in self.BaseAttributes.keys(): self['URL'] = self.parser_url(self['URL']) pass
def __init__(self, **kwargs): BaseEntity.__init__(self) if len(kwargs): sks = self.synonyms.keys() cad = self.chineseAttributeDict() for k, v in zip(kwargs.keys(), kwargs.values()): if k in cad.keys(): self[cad[k]] = v elif k in sks: self[cad[self.synonyms[k]]] = v else: warnings.warn('Undefined key for dict of random-check.') self[k] = v # self['HASH_ID'] = hash(str(self.BaseAttributes)) # if 'URL' in self.BaseAttributes.keys(): # self['URL'] = self.parser_url( # self['URL']) pass
def __init__(self, **kwargs): BaseEntity.__init__(self) if len(kwargs): sks = self.synonyms.keys() cad = self.chineseAttributeDict() for k, v in zip(kwargs.keys(), kwargs.values()): if k in cad.keys(): self[cad[k]] = v elif k in sks: self[cad[self.synonyms[k]]] = v else: # warnings.warn('Undefined key for dict of ruling text.') self[k] = v # if 'URL' in self.BaseAttributes.keys(): # self['URL'] = self.parser_url( # self['URL']) if self[self.primarykey] is None or \ len(str(self[self.primarykey])) < 2: self[self.primarykey] = '%s_%s' % ( self.label, self.getHashValue(str(self.BaseAttributes))) pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) # self['HASH_ID'] = hash(str(self.BaseAttributes)) if 'URL' in self.BaseAttributes.keys(): self['URL'] = self.format_url(self['URL']) pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) # self['HASH_ID'] = hash(str(self.BaseAttributes)) self[self.primarykey] = '%s_%s' % ( self.label, self.getHashValue(str(self.BaseAttributes))) pass
def __init__(self, **kwargs): BaseEntity.__init__(self, **kwargs) pass
def __init__(self, email=None, **kwargs): BaseEntity.__init__(self, **kwargs) if email is not None and len(email) > 1: self['EMAIL'] = email self.__split_levels__() pass
def __init__(self, telephone=None, **kwargs): BaseEntity.__init__(self, **kwargs) if telephone is not None and len(str(telephone)) > 1: self['TELEPHONE'] = telephone pass