def _create_atom_id(resource_path, authority_name=None, date_string=None):
 if (authority_name is None):
  authority_name = config.get('ckan.feeds.authority_name', '').strip()
  if (not authority_name):
   site_url = config.get('ckan.site_url', '').strip()
   authority_name = urlparse.urlparse(site_url).netloc
 if (not authority_name):
  log.warning('No authority_name available for feed generation.  Generated feed will be invalid.')
 if (date_string is None):
  date_string = config.get('ckan.feeds.date', '')
 if (not date_string):
  log.warning('No date_string available for feed generation.  Please set the "ckan.feeds.date" config value.')
  site_url = config.get('ckan.site_url', '')
  return '/'.join([site_url, resource_path])
 tagging_entity = ','.join([authority_name, date_string])
 return ':'.join(['tag', tagging_entity, resource_path])

def _create_atom_id ( resource_path , authority_name = None , date_string = None ) : if ( authority_name is None ) : authority_name = config . get ( 'ckan.feeds.authority_name' , '' ) . strip ( ) if ( not authority_name ) : site_url = config . get ( 'ckan.site_url' , '' ) . strip ( ) authority_name = urlparse . urlparse ( site_url ) . netloc if ( not authority_name ) : log . warning ( 'No authority_name available for feed generation.  Generated feed will be invalid.' ) if ( date_string is None ) : date_string = config . get ( 'ckan.feeds.date' , '' ) if ( not date_string ) : log . warning ( 'No date_string available for feed generation.  Please set the "ckan.feeds.date" config value.' ) site_url = config . get ( 'ckan.site_url' , '' ) return '/' . join ( [ site_url , resource_path ] ) tagging_entity = ',' . join ( [ authority_name , date_string ] ) return ':' . join ( [ 'tag' , tagging_entity , resource_path ] )
helper method that creates an atom id for a feed or entry .