clients/irodsPublishCollection.py
def validate(self, repoKeys = []):
        '''
        Checks whether collection is not empty and is not a nested collection.
        repoKeys is a set of keys in te iRODS metadata that indicate, when present,
        that the data have already been published.
        '''
        errorMsg = []
        if self.coll.subcollections != []:
            errorMsg.append('PUBLISH ERROR: Collection contains subcollections.')
        if self.coll.data_objects == []:
            errorMsg.append('PUBLISH ERROR: Collection does not contain data.')
        if len(set(self.coll.metadata.keys()).intersection(repoKeys)) > 0:
            errorMsg.append('PUBLISH ERROR: Data is already published.')
            for item in self.coll.metadata.items():
                errorMsg.append(item.name+': '+item.value)

        return errorMsg

        Checks whether collection is not empty and is not a nested collection.
        repoKeys is a set of keys in te iRODS metadata that indicate, when present,
        that the data have already been published.
        
Checks whether collection is not empty and is not a nested collection.
repoKeys is a set of keys in te iRODS metadata that indicate, when present,
that the data have already been published.
Checks whether collection is not empty and is not a nested collection . repoKeys is a set of keys in te iRODS metadata that indicate when present that the data have already been published .
def validate(self, repoKeys = []):
        errorMsg = []
        if self.coll.subcollections != []:
            errorMsg.append('PUBLISH ERROR: Collection contains subcollections.')
        if self.coll.data_objects == []:
            errorMsg.append('PUBLISH ERROR: Collection does not contain data.')
        if len(set(self.coll.metadata.keys()).intersection(repoKeys)) > 0:
            errorMsg.append('PUBLISH ERROR: Data is already published.')
            for item in self.coll.metadata.items():
                errorMsg.append(item.name+': '+item.value)
        return errorMsg
def validate ( self , repoKeys = [ ] ) : errorMsg = [ ] if self . coll . subcollections != [ ] : errorMsg . append ( 'PUBLISH ERROR: Collection contains subcollections.' ) if self . coll . data_objects == [ ] : errorMsg . append ( 'PUBLISH ERROR: Collection does not contain data.' ) if len ( set ( self . coll . metadata . keys ( ) ) . intersection ( repoKeys ) ) > 0 : errorMsg . append ( 'PUBLISH ERROR: Data is already published.' ) for item in self . coll . metadata . items ( ) : errorMsg . append ( item . name + ': ' + item . value ) return errorMsg
Checks whether collection is not empty and is not a nested collection.
Checks whether collection is not empty and is not a nested collection .
'''
        Checks whether collection is not empty and is not a nested collection.
        repoKeys is a set of keys in te iRODS metadata that indicate, when present,
        that the data have already been published.
        '''
self
repoKeys