Ignore:
Timestamp:
29/09/08 09:49:12 (11 years ago)
Author:
cbyrom
Message:

Extend Person object to include comparison method for object equality
checks + add enum style 'type' constants and update references to use
these to make code clearer + add addAuthors() method to ensure Person
data is added and updated correctly + add string cast to eXistInterface
method to avoid problems sending DOS characters to eXist + add extra
logging and checks for setting up eXist connection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/python/ndgUtils/models/MolesEntity.py

    r4236 r4240  
    144144         
    145145        for vals in partyVals: 
    146             rp = Person(tagName = 'responsibleParty', namespace = 'moles') 
     146            rp = Person(personType = Person.RESPONSIBLE_PARTY_TYPE) 
    147147            rp.fromString(vals) 
    148148            self.responsibleParties.append(rp) 
     
    271271        for authorElement in authorElements: 
    272272            logging.debug("Adding atom author data") 
    273             author = Person(tagName = 'responsibleParty', namespace = 'moles') 
     273            author = Person(personType = Person.RESPONSIBLE_PARTY_TYPE) 
    274274            author.fromETElement(authorElement) 
    275275            self.responsibleParties.append(author) 
Note: See TracChangeset for help on using the changeset viewer.