Ignore:
Timestamp:
15/12/08 09:30:43 (11 years ago)
Author:
cbyrom
Message:

Improve input parameter checking + improve scoping of methods + add more structure to validator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/python/ndgUtils/lib/granulite.py

    r4591 r4627  
    119119        else: 
    120120            # create a skeleton granule 
    121             self._initialiseGranule() 
     121            self.__initialiseGranule() 
    122122 
    123123        self.useCSMLID = useCSMLID 
     
    128128 
    129129         
    130     def _getSectionName(self, str): 
     130    def __getSectionName(self, str): 
    131131        ''' 
    132132        Checks an input string to see if it contains a section title; if so 
     
    186186                continue 
    187187             
    188             section = self._getSectionName(line) 
     188            section = self.__getSectionName(line) 
    189189 
    190190            # if a section name is returned, we're at a new section of the file - so change the dictionary key 
     
    347347      
    348348     
    349     def _addGranuleToDataEntityRecords(self): 
     349    def __addGranuleToDataEntityRecords(self): 
    350350        ''' 
    351351        Augment any data entity records, specified in the granulite, with a reference to 
     
    380380        ''' 
    381381        logging.debug("Retrieving data entity atom - to attach granule to") 
    382         doc = self._eXist.getAtom('dataent_' + dataEntityID) 
     382#        doc = self._eXist.getAtom('dataent_' + dataEntityID) 
     383        doc = self._eXist.getAtom(dataEntityID) 
    383384        logging.debug("DE retrieved - now adding link to granule") 
    384385        de = Atom.Atom(xmlString=str(doc)) 
     
    398399 
    399400 
    400     def _initialiseGranule(self): 
     401    def __initialiseGranule(self): 
    401402        ''' 
    402403        Create an Atom object ready to populate with data 
     
    561562 
    562563        # now add the granule data to the data entity in eXist 
    563         self._addGranuleToDataEntityRecords() 
     564        self.__addGranuleToDataEntityRecords() 
    564565         
    565566        logging.info("granulite processing complete") 
Note: See TracChangeset for help on using the changeset viewer.