Ignore:
Timestamp:
30/04/09 16:21:02 (11 years ago)
Author:
cbyrom
Message:

Add help page to application + tidy up codebase remove uneccessary code
and fixing name references, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/dal/editorfileclient.py

    r5240 r5242  
    2525        @keyword configFile: myConfig object to use to set up client 
    2626        ''' 
    27         logging.info("Initialising EditorFileClient object") 
     27        logging.debug("Initialising EditorFileClient object") 
    2828        self.cf = configFile 
    2929        if configFile: 
     
    3636        # - primarily for testing purposes 
    3737        self.pic = None 
    38         logging.info("EditorFileClient initialised") 
     38        logging.debug("EditorFileClient initialised") 
    3939         
    4040 
     
    120120        pic = None 
    121121        if os.path.isfile(fileName): 
    122             logging.debug("- config data already exists for this vocab list - load this now") 
     122            logging.debug("- data already exists - load this now") 
    123123            pic = self.__loadProviderInfoFile(fileName) 
    124124             
    125125        else: 
    126             logging.debug(" - no data found for this list - setting up a new data collection") 
     126            logging.debug(" - no data found - setting up a new data collection") 
    127127            pic = ProviderInfoCollection(fileName)  
    128128 
     
    138138        @return ProviderInfoCollection created 
    139139        ''' 
    140         logging.info("Creating or updating provider info collection file") 
     140        logging.debug("Creating or updating provider info collection file") 
    141141         
    142142        fileName = self.__generateFileName() 
    143143        if os.path.isfile(fileName): 
    144             logging.info("- found existing file - creating backup") 
     144            logging.debug("- found existing file - creating backup") 
    145145            logging.debug("- this will be a backup file") 
    146146             
    147147            backupFileName = self.__generateFileName(isBackup = True) 
    148             logging.info("- backup change request collection file, '%s'" %backupFileName) 
     148            logging.debug("- backup provider info collection file, '%s'" %backupFileName) 
    149149             
    150150            shutil.copy(fileName, backupFileName) 
     
    156156            pic.version = str(int(pic.version) + 1) 
    157157 
    158         logging.info("- create provider info collection file, '%s'" %fileName) 
     158        logging.debug("- create provider info collection file, '%s'" %fileName) 
    159159        createFile(fileName, pic.toXMLString()) 
    160160        return pic 
     
    165165        Create a new provider info record 
    166166        @param providerInfo: ProviderInfo object with which to create the new 
    167         change request record 
     167        provider info record 
    168168        @raise ValueError if provider with same name already exists 
    169169        @return ProviderInfo, fileName: object with any new data from the creation in + filename 
    170170        ''' 
    171171        self.pic, fileName = self.__getProviderInfoData() 
    172         logging.info("Creating new provider info in file, '%s'" %fileName) 
     172        logging.debug("Creating new provider info in file, '%s'" %fileName) 
    173173         
    174174        # check provider with the same name doesn't already exist 
     
    183183        self.pic = self.__createOrUpdatePICollection(self.pic) 
    184184         
    185         logging.info("New provider info created in XML file") 
     185        logging.debug("New provider info created in XML file") 
    186186        return providerInfo, fileName 
    187187     
     
    194194        @return ProviderInfo, fileName: object with any new data from the creation in 
    195195        ''' 
    196         logging.info("Updating provider info in XML file") 
     196        logging.debug("Updating provider info in XML file") 
    197197 
    198198        if not providerInfo.name: 
     
    204204        self.pic = self.__createOrUpdatePICollection(self.pic) 
    205205 
    206         logging.info("Change request updated in file") 
     206        logging.debug("Provider info updated in file") 
    207207        return providerInfo 
    208208 
     
    214214        @return True if successful, False otherwise 
    215215        ''' 
    216         logging.info("Deleting provider info in provider info collection") 
     216        logging.debug("Deleting provider info in provider info collection") 
    217217        self.pic, fileName = self.__getProviderInfoData() 
    218218         
    219219        self.pic.removeProviderInfo(providerName) 
    220220        self.pic = self.__createOrUpdatePICollection(self.pic) 
    221         logging.info("Delete complete successfully") 
     221        logging.debug("Delete complete successfully") 
    222222        return True 
    223223 
     
    229229        @return ProviderInfo: object with requested data - or None if no data found 
    230230        '''  
    231         logging.info("Retrieving provider info with name, '%s'" %(providerInfoName)) 
     231        logging.debug("Retrieving provider info with name, '%s'" %(providerInfoName)) 
    232232        pi = None 
    233233        self.pic, fileName = self.__getProviderInfoData() 
     
    235235        try: 
    236236            pi = self.pic.getProviderInfoByName(providerInfoName) 
    237             logging.info("- returning provider info details") 
     237            logging.debug("- returning provider info details") 
    238238        except ValueError: 
    239             logging.info("- no data found with specified name - returning None") 
     239            logging.debug("- no data found with specified name - returning None") 
    240240             
    241241        return pi 
     
    247247        @return ProviderInfo list: list of ProviderInfo objects representing all provider info data 
    248248        '''  
    249         logging.info("Retrieving all provider info data") 
     249        logging.debug("Retrieving all provider info data") 
    250250        self.pic, fileName = self.__getProviderInfoData() 
    251251             
     
    268268            pi = self.pic.getProviderInfoByName(providerInfoName) 
    269269            ri = pi.getRepositoryInfoByName(repositoryInfoName) 
    270             logging.info("- returning repository info details") 
     270            logging.debug("- returning repository info details") 
    271271        except ValueError: 
    272             logging.info("- no data found with specified name - returning None") 
     272            logging.debug("- no data found with specified name - returning None") 
    273273        return ri 
    274274 
Note: See TracChangeset for help on using the changeset viewer.