Changeset 1552 for TI02-CSML


Ignore:
Timestamp:
05/10/06 14:30:43 (13 years ago)
Author:
domlowe
Message:

added prefix csml. to csmllibs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/csmllibs/csmlfiles.py

    r1493 r1552  
    2424    def onetomany(self): 
    2525        ''' onetomany means one file per directory/subdirectory is the representative file ''' 
    26         tree = csmllibs.csmldirectory.DirectoryTree() 
     26        tree = csml.csmllibs.csmldirectory.DirectoryTree() 
    2727        tree.setTopDirectory(self.topdir) 
    2828        tree.readDirectory() 
    2929        subdirs = tree.getSubDirectories() 
    30         ffmap = csmllibs.csmlfeaturefilemap.FeatureFileMap() 
     30        ffmap = csml.csmllibs.csmlfeaturefilemap.FeatureFileMap() 
    3131         
    3232        for dir in subdirs: 
     
    3535                        continue 
    3636                #create representative file 
    37                 repfile=csmllibs.csmlfeaturefilemap.representativeFile(file) 
     37                repfile=csml.csmllibs.csmlfeaturefilemap.representativeFile(file) 
    3838                repfile.setFeatureType(self.ft) 
    3939                try: 
     
    5151 
    5252                for f in otherfiles: 
    53                         relfile = csmllibs.csmlfeaturefilemap.relatedFile(f) 
     53                        relfile = csml.csmllibs.csmlfeaturefilemap.relatedFile(f) 
    5454                        relfile.setFeatureType(self.ft) 
    5555                        repfile.addRelatedFile(relfile) 
     
    6161        """ onetoone means each feature is self contained within any individual file 
    6262        """ 
    63         tree = csmllibs.csmldirectory.DirectoryTree() 
     63        tree = csml.csmllibs.csmldirectory.DirectoryTree() 
    6464        tree.setTopDirectory(self.topdir) 
    6565        tree.readDirectory() 
    6666        subdirs = tree.getSubDirectories() 
    67         ffmap = csmllibs.csmlfeaturefilemap.FeatureFileMap() 
     67        ffmap = csml.csmllibs.csmlfeaturefilemap.FeatureFileMap() 
    6868        for dir in subdirs:      
    6969                files=tree.getCSMLSupportedFilesInSubDir(dir) 
    7070                for f in files: 
    71                         repfile=csmllibs.csmlfeaturefilemap.representativeFile(f) 
     71                        repfile=csml.csmllibs.csmlfeaturefilemap.representativeFile(f) 
    7272                        repfile.setFeatureType(self.ft) 
    7373                        ffmap.addRepresentativeFile(repfile) 
     
    7878        assumes no file in toplevel directory, and then lots of subdirectories at next level containing files 
    7979        """ 
    80         tree = csmllibs.csmldirectory.DirectoryTree() 
     80        tree = csml.csmllibs.csmldirectory.DirectoryTree() 
    8181        tree.setTopDirectory(self.topdir) 
    8282        tree.readDirectory() 
     
    8585        allfiles= tree.getAllCSMLSupportedFiles() 
    8686        print allfiles 
    87         ffmap = csmllibs.csmlfeaturefilemap.FeatureFileMap() 
     87        ffmap = csml.csmllibs.csmlfeaturefilemap.FeatureFileMap() 
    8888         
    8989        #create representative file from first file 
    90         repfile=csmllibs.csmlfeaturefilemap.representativeFile(allfiles[0]) 
     90        repfile=csml.csmllibs.csmlfeaturefilemap.representativeFile(allfiles[0]) 
    9191        repfile.setFeatureType(self.ft) 
    9292        #create related files from all other files 
    9393        for f in allfiles[1:]: 
    94             relfile = csmllibs.csmlfeaturefilemap.relatedFile(f) 
     94            relfile = csml.csmllibs.csmlfeaturefilemap.relatedFile(f) 
    9595            relfile.setFeatureType(self.ft) 
    9696            repfile.addRelatedFile(relfile) 
     
    103103    def mixedft(self): 
    104104        ''' allows the use of a dictonary object to store feature file map info not well tested ''' 
    105         tree = csmllibs.csmldirectory.DirectoryTree() 
     105        tree = csml.csmllibs.csmldirectory.DirectoryTree() 
    106106        tree.setTopDirectory(self.topdir) 
    107107        tree.readDirectory() 
    108108        subdirs = tree.getSubDirectories() 
    109         ffmap = csmllibs.csmlfeaturefilemap.FeatureFileMap() 
     109        ffmap = csml.csmllibs.csmlfeaturefilemap.FeatureFileMap() 
    110110        for dir in subdirs:      
    111111                files=tree.getCSMLSupportedFilesInSubDir(dir) 
    112112                for f in files: 
    113                         repfile=csmllibs.csmlfeaturefilemap.representativeFile(f) 
     113                        repfile=csml.csmllibs.csmlfeaturefilemap.representativeFile(f) 
    114114                        #look up feature type in dictionary 
    115115                        ft=self.ftdictionary[f] 
Note: See TracChangeset for help on using the changeset viewer.