Changeset 4286 for exist/trunk


Ignore:
Timestamp:
06/10/08 15:03:54 (11 years ago)
Author:
cbyrom
Message:

Add new db structure for deployment atoms + add subtype term ID to atom.

Location:
exist/trunk/python/ndgUtils
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/python/ndgUtils/eXistConnector.py

    r4240 r4286  
    5151    GRANULE_COLLECTION_PATH = "data_granules/" 
    5252    DEPLOYMENT_COLLECTION_PATH = "deployment_data/" 
     53    DEPLOYMENTS_COLLECTION_PATH = "deployments/" 
    5354    DE_COLLECTION_PATH = "data_entities/" 
    5455    NDG_A_COLLECTION_PATH = "/db/ndg_A_metadata/" 
  • exist/trunk/python/ndgUtils/models/Atom.py

    r4282 r4286  
    187187 
    188188        # some data have further subtypes specified 
    189         self.subtype = None 
     189        self.subtypeID = None # this should be the termID 
     190        self.subtype = None # and this should be the fully formed vocab URL 
    190191         
    191192        self.ndgObject = ndgObject 
     
    272273        elif self.atomTypeID == VTD.GRANULE_TERM: 
    273274            collectionPath += eXistConnector.GRANULE_COLLECTION_PATH 
     275        elif self.atomTypeID == VTD.ACTIVITY_DEPLOYMENT_TERM: 
     276            collectionPath += eXistConnector.DEPLOYMENTS_COLLECTION_PATH 
    274277        else: 
    275278            collectionPath += eXistConnector.DEPLOYMENT_COLLECTION_PATH 
     
    297300            root.append(category.toXML()) 
    298301 
    299         if self.subtype: 
     302        if self.subtypeID: 
    300303            logging.info("Adding atom subtype info to XML output") 
    301304            # NB subtypes not all defined, so leave this out for the moment 
    302             category.label = self.subtype 
     305            category.label = self.subtypeID 
    303306            # look up the appropriate vocab term data 
    304             category.scheme = self.subtype# self.VTD.getTermCurrentVocabURL(self.subtype) 
     307            category.scheme = self.VTD.getTermCurrentVocabURL(self.subtypeID) 
    305308            category.term = self.ATOM_SUBTYPE 
    306309            root.append(category.toXML()) 
     
    644647            elif cat.term == self.ATOM_SUBTYPE: 
    645648                logging.debug("Found atom subtype data") 
    646                 self.subtype = cat.label 
     649                self.subtypeID = cat.label 
     650                self.subtype = cat.scheme 
    647651                continue 
    648652 
Note: See TracChangeset for help on using the changeset viewer.