Changeset 5018 for ndgCommon


Ignore:
Timestamp:
23/02/09 16:40:31 (11 years ago)
Author:
cbyrom
Message:

Generecise method for adding new entries to atom feeds - to allow
re-use between new feeds for citations and comments + add new
setting up structure and contents to handle new feed to collect
trackback citation info.

Location:
ndgCommon/trunk/ndg/common/src/clients/xmldb/eXist
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/src/clients/xmldb/eXist/dbconstants.py

    r4983 r5018  
    3535# collection for storing misc files - e.g. the org data snippets 
    3636RESOURCES_COLLECTION_PATH = ATOM_COLLECTION_PATH + "resources" 
     37CITATIONS_COLLECTION_PATH = ATOM_COLLECTION_PATH + "citations" 
    3738CORRECTIONS_COLLECTION_PATH = ATOM_COLLECTION_PATH + "corrections" 
    3839EXIST_CONFIG_PATH = "/db/system/config/" 
  • ndgCommon/trunk/ndg/common/src/clients/xmldb/eXist/feedclient.py

    r4994 r5018  
    3030    PROVIDERLEVEL_ATOM_FEED_TITLE = TOPLEVEL_ATOM_FEED_TITLE + PROVIDER_SUFFIX 
    3131    PROVIDERLEVEL_DIF_FEED_TITLE = TOPLEVEL_DIF_FEED_TITLE + PROVIDER_SUFFIX 
     32    CITATIONS_FEED_TITLE = 'Citations data received by Trackback mechanism' 
    3233    CORRECTIONS_FEED_TITLE = 'Corrections data submitted by atom editor users' 
    3334    DIF_ENTRY_TITLE = 'DIF Record' 
     
    116117        self.createAtomFeed(dc.CORRECTIONS_COLLECTION_PATH, 
    117118                            self.CORRECTIONS_FEED_TITLE) 
     119 
     120        self.createAtomFeed(dc.CITATIONS_COLLECTION_PATH, 
     121                            self.CITATIONS_FEED_TITLE) 
    118122 
    119123 
     
    216220         
    217221 
    218     def createCorrectionsFeedEntry(self, title, summary): 
     222    def createGenericFeedEntry(self, title, summary, path): 
    219223        ''' 
    220224        Add an entry to the corrections collection (which should already have a 
     
    230234</entry>' %(title, summary) 
    231235        logging.info("Adding corrections data to atom feed") 
    232         self.__postEditAtomFeed(dc.CORRECTIONS_COLLECTION_PATH, entryXML) 
     236        self.__postEditAtomFeed(path, entryXML) 
    233237        logging.info("Successfully added new feed entry") 
Note: See TracChangeset for help on using the changeset viewer.