Ignore:
Timestamp:
01/10/08 13:35:41 (11 years ago)
Author:
cbyrom
Message:

Extend idget function to cope with MDIP records and implement usage of this

  • to remove the need for the DIF and MDIP models - delete these from the codebase.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch/Utilities.py

    r4027 r4258  
    142142def idget(xml,dataType='DIF'): 
    143143    ''' Given an xml document (string), parse it using ElementTree and  
    144     find the identifier within it. Supports dataTypes of 'DIF' ... 
    145     (actually only DIF for now). 
     144    find the identifier within it. Supports dataTypes of 'DIF' and 'MDIP'... 
    146145    ''' 
    147146    et=loadET(xml) 
     
    149148    if dataType=='DIF': 
    150149        return helper.getText(et,'Entry_ID') 
     150    elif dataType == 'MDIP': 
     151        return helper.getText(self.tree,'DatasetIdentifier') 
    151152    else: 
    152153        raise TypeError,'idget does not support datatype [%s]'%dataType 
Note: See TracChangeset for help on using the changeset viewer.