Changeset 6312 for TI01-discovery


Ignore:
Timestamp:
15/01/10 14:09:48 (9 years ago)
Author:
sdonegan
Message:

added method to extract datasetID ..doh

Location:
TI01-discovery/branches/ingestion-MEDIN/ingestAutomation-upgrade/OAIBatch
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/branches/ingestion-MEDIN/ingestAutomation-upgrade/OAIBatch/ExtractISO.py

    r6310 r6312  
    3535                                         
    3636                #get all the required information from the chosen xpath definition class 
     37                self.datasetID = self.getElementVal(self.isoModel.datasetID()) 
     38                 
    3739                self.revisionDate = self.getElementVal(self.isoModel.metadataRevisionDate()) 
    3840                 
  • TI01-discovery/branches/ingestion-MEDIN/ingestAutomation-upgrade/OAIBatch/difConvertedto_ISO19139.py

    r6310 r6312  
    1414                 
    1515                logging.info("Initiated ISO data model: GCMD converted to ISO19139 MEDIN v? profile") 
     16         
     17        ''' 
     18        Method to extract the dataset ID from the xml 
     19        ''' 
     20        def datasetID(self): 
     21                 
     22                datasetID = (self.dataSetName.__name__,{1:{'xpath':'gmd:fileIdentifier/gco:CharacterString'}}) 
     23                 
     24                return datasetID 
    1625         
    1726        def dataSetName(self): 
  • TI01-discovery/branches/ingestion-MEDIN/ingestAutomation-upgrade/OAIBatch/testISO.py

    r6310 r6312  
    1919 
    2020 
     21 
     22print "\nTesting for datasetID..." 
     23for i in isoData.datasetID: 
     24        print "keywords: " + i 
     25 
    2126print "\nTesting for keywords..." 
    2227for i in isoData.keywords: 
    23         print "keywords: " + i 
     28        print "datasetID: " + i 
    2429         
    2530print "\nTesting for revision date (List)..." 
Note: See TracChangeset for help on using the changeset viewer.