PEATDB/Record.py
def hasStructure(self):
        """Determine if this record has a structure"""
        import types
        if not hasattr(self,'Structure') or self.Structure == None:
            return 'not available'
        if self.has_key('structuretype'):
            return self.structuretype
        #we need to get rid of this guessing bit.
        if type(self.Structure) is types.ListType and len(self.Structure)>25:
            return 'available'
        elif type(self.Structure) is types.StringType:
            return self.Structure
        elif type(self.Structure) is types.DictType:
            if self.Structure is types.DictType:
                return 'PEAT Model'
            else:
                return 'not available'
        else:
                return 'not available'
        return None
Determine if this record has a structure
Determine if this record has a structure
Determine if this record has a structure
def hasStructure(self):
        import types
        if not hasattr(self,'Structure') or self.Structure == None:
            return 'not available'
        if self.has_key('structuretype'):
            return self.structuretype
        if type(self.Structure) is types.ListType and len(self.Structure)>25:
            return 'available'
        elif type(self.Structure) is types.StringType:
            return self.Structure
        elif type(self.Structure) is types.DictType:
            if self.Structure is types.DictType:
                return 'PEAT Model'
            else:
                return 'not available'
        else:
                return 'not available'
        return None
def hasStructure ( self ) : import types if not hasattr ( self , 'Structure' ) or self . Structure == None : return 'not available' if self . has_key ( 'structuretype' ) : return self . structuretype if type ( self . Structure ) is types . ListType and len ( self . Structure ) > 25 : return 'available' elif type ( self . Structure ) is types . StringType : return self . Structure elif type ( self . Structure ) is types . DictType : if self . Structure is types . DictType : return 'PEAT Model' else : return 'not available' else : return 'not available' return None
Determine if this record has a structure
Determine if this record has a structure
"""Determine if this record has a structure""" #we need to get rid of this guessing bit.
self