示例#1
0
    repo = Repository(fedora_url,
                      username=fedora_username,
                      password=fedora_password)

    #Pidman Client
    global client
    client = PidmanRestClient(db_baseurl, db_username, db_password)
    connection = client._get_connection()

    current_page = 1
    count = 0
    max = 10000

    # search for existing arks by domain where type='ark', domain='LSDI'
    search_results = client.search_pids(type='ark',
                                        domain='Rushdie Collection',
                                        count=max)
    total_pages = search_results['page_count']
    page_link_1 = search_results['first_page_link']
    page_link = page_link_1[0:-1]

    print "\n=> Processing page[%d] that contains [%d] of a total of [%d] pages ..." % (
        current_page, max, total_pages)
    page_results = search_results['results']
    count = process_page(current_page, page_results)
    current_page = current_page + 1
    while (current_page <= total_pages):
        search_results = client.search_pids(type='ark',
                                            domain='Rushdie Collection',
                                            page=current_page,
                                            count=max)
  global repo
  repo = Repository(fedora_url,
                  username=fedora_username, password=fedora_password)
  

  #Pidman Client
  global client        
  client = PidmanRestClient(db_baseurl, db_username, db_password)
  connection = client._get_connection()
  
  current_page = 1
  count = 0
  max = 10000
    
  # search for existing arks by domain where type='ark', domain='LSDI'
  search_results = client.search_pids(type='ark', domain='Rushdie Collection', count=max)
  total_pages = search_results['page_count']
  page_link_1 = search_results['first_page_link']
  page_link = page_link_1[0:-1]
  
  print "\n=> Processing page[%d] that contains [%d] of a total of [%d] pages ..." %(current_page, max, total_pages)
  page_results = search_results['results']
  count = process_page(current_page, page_results)
  current_page = current_page + 1  
  while (current_page <= total_pages):
    search_results = client.search_pids(type='ark', domain='Rushdie Collection', page=current_page, count=max)
    page_results = search_results['results']    
    print "\n=> Processing page[%d] of [%d] that contains [%d] arks." \
          %(current_page, total_pages, max)
    upd_count = process_page(current_page, page_results)
    count = count + upd_count    
      db_baseurl = 'https://testpid.library.emory.edu/'
       
  else:
    print '\nError: argument list incomplete. See usage example below.'
    usage()
    sys.exit()
  
        
  global client        
  client = PidmanRestClient(db_baseurl, db_username, db_password)
  
  current_page = 1
  count = 0
  max = 50000
    
  search_results = client.search_pids(type='purl', domain=domain, count=max)
  total_pages = search_results['page_count']
  
  page_results = search_results['results']
  print "\n=> Processing page[%d] that contains [%d] of a total of [%d] pages..." %(current_page, max, total_pages)
  
  count = process_page(current_page, page_results)

  current_page = current_page + 1  
  while (current_page <= total_pages):
    #search_results = client.search_pids(type='purl', domain='General purchased collections', page=current_page, count=max)
    search_results = client.search_pids(type='purl', domain=domain, page=current_page, count=max)
    page_results = search_results['results']
    print "\n=> Processing page[%d] of [%d] that contains [%d] pids." \
          %(current_page, total_pages, max)
    upd_count = process_page(current_page, page_results)
示例#4
0
        validate(old_fedora_base, new_fedora_base)
    else:
        print '\nError: argument list incomplete. See usage example below.'
        usage()
        sys.exit()

    global client
    client = PidmanRestClient(db_baseurl, db_username, db_password)
    connection = client._get_connection()

    current_page = 1
    count = 0
    max = 220000

    # search for existing arks by domain where type='ark', domain='LSDI'
    search_results = client.search_pids(type='ark', domain='LSDI', count=max)
    total_pages = search_results['page_count']
    page_link_1 = search_results['first_page_link']
    page_link = page_link_1[0:-1]

    print "\n=> Processing page[%d] that contains [%d] of a total of [%d] pages ..." % (
        current_page, max, total_pages)
    page_results = search_results['results']
    count = process_page(current_page, page_results)
    current_page = current_page + 1
    while (current_page <= total_pages):
        search_results = client.search_pids(type='ark',
                                            domain='LSDI',
                                            page=current_page,
                                            count=max)
        page_results = search_results['results']
 else:
   print '\nError: argument list incomplete. See usage example below.'
   usage()
   sys.exit()
 
       
 global client        
 client = PidmanRestClient(db_baseurl, db_username, db_password)
 connection = client._get_connection()
 
 current_page = 1
 count = 0
 max = 220000
   
 # search for existing arks by domain where type='ark', domain='LSDI'
 search_results = client.search_pids(type='ark', domain='LSDI', count=max)
 total_pages = search_results['page_count']
 page_link_1 = search_results['first_page_link']
 page_link = page_link_1[0:-1]
 
 print "\n=> Processing page[%d] that contains [%d] of a total of [%d] pages ..." %(current_page, max, total_pages)
 page_results = search_results['results']
 count = process_page(current_page, page_results)
 current_page = current_page + 1  
 while (current_page <= total_pages):
   search_results = client.search_pids(type='ark', domain='LSDI', page=current_page, count=max)
   page_results = search_results['results']    
   print "\n=> Processing page[%d] of [%d] that contains [%d] arks." \
         %(current_page, total_pages, max)
   upd_count = process_page(current_page, page_results)
   count = count + upd_count    
示例#6
0
        else:  # use the test pid manager if not specified
            db_baseurl = 'https://testpid.library.emory.edu/'

    else:
        print '\nError: argument list incomplete. See usage example below.'
        usage()
        sys.exit()

    global client
    client = PidmanRestClient(db_baseurl, db_username, db_password)

    current_page = 1
    count = 0
    max = 50000

    search_results = client.search_pids(type='purl', domain=domain, count=max)
    total_pages = search_results['page_count']

    page_results = search_results['results']
    print "\n=> Processing page[%d] that contains [%d] of a total of [%d] pages..." % (
        current_page, max, total_pages)

    count = process_page(current_page, page_results)

    current_page = current_page + 1
    while (current_page <= total_pages):
        #search_results = client.search_pids(type='purl', domain='General purchased collections', page=current_page, count=max)
        search_results = client.search_pids(type='purl',
                                            domain=domain,
                                            page=current_page,
                                            count=max)