def split(self, document_name=''):
        split_method = False
        if self.doccode_type == '1':
            # Default Storing Documents based on self.split_string
            if self.split_string:
                split_list = self.split_string.split(',')
                split_method = []
                for pair in split_list:
                    s, e = pair.split(':')
                    split_method.append(document_name[int(s):int(e)])
                split_method.append(document_name)

        if self.doccode_type == '2':
            split_method = [
                document_name[0:4],
                document_name[5:9],
                document_name[10:13],
                document_name[14:18],
                document_name
            ]
        if self.doccode_type == '3':
            # Split document_name as per Project Gutenberg method for 'eBook number' not, eText
            # http://www.gutenberg.org/dirs/00README.TXT
            split_method = []
            for i in range(len(document_name)):
                split_method.append(document_name[i-1:i])
            split_method.append(document_name)
        if not split_method:
            split_method = ['Split_errors', ]  # folder name for improper doccdes!!!!!
            log.error('doc_codes.models.DocumentTypeRule.split Splitting Errors exist for code: %s' % document_name)
        #print "Spliting method: ", split_method
        return split_method
Method to generate folder hierarchy to search for document depending on name.
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/core/models.py/DocumentTypeRule.split