#NEWLINE# def __init__( self , initializer = None , fingerprint_type = None , hash_type = None , hash_value = None , age = None ) : #NEWLINE# #INDENT# if fingerprint_type : #NEWLINE# #INDENT# initializer = HashFileStore . PATH . Add ( fingerprint_type ) . Add ( hash_type ) . Add ( initializer ) #NEWLINE# #UNINDENT# super ( FileStoreHash , self ) . __init__ ( initializer = initializer , age = age ) #NEWLINE# relative_name = self . RelativeName ( HashFileStore . PATH ) #NEWLINE# if ( not relative_name ) : #NEWLINE# #INDENT# raise ValueError ( ( 'URN %s is not a hash file store urn. Hash file store urn should start with %s.' % ( str ( self ) , str ( HashFileStore . PATH ) ) ) ) #NEWLINE# #UNINDENT# relative_path = relative_name . split ( '/' ) #NEWLINE# if ( ( len ( relative_path ) != 3 ) or ( relative_path [ 0 ] not in HashFileStore . HASH_TYPES ) or ( relative_path [ 1 ] not in HashFileStore . HASH_TYPES [ relative_path [ 0 ] ] ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'URN %s is not a hash file store urn. Hash file store urn should look like: aff4:/files/hash/[fingerprint_type]/[hash_type]/[hash_value].' % str ( self ) ) ) #NEWLINE# #UNINDENT# ( self . fingerprint_type , self . hash_type , self . hash_value ) = relative_path