<s> from fakeclient import FakeCreaterClient <EOL> from datetime import datetime <EOL> from oaipmh import metadata <EOL> registry = metadata . MetadataRegistry ( ) <EOL> registry . registerReader ( '<STR_LIT>' , metadata . oai_dc_reader ) <EOL> client = FakeCreaterClient ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> registry <EOL> ) <EOL> print "<STR_LIT>" <EOL> identify = client . identify ( ) <EOL> print "<STR_LIT>" , identify . repositoryName ( ) <EOL> print "<STR_LIT>" , identify . baseURL ( ) <EOL> print "<STR_LIT>" , identify . protocolVersion ( ) <EOL> print "<STR_LIT>" , identify . adminEmails ( ) <EOL> print "<STR_LIT>" , identify . earliestDatestamp ( ) <EOL> print "<STR_LIT>" , identify . deletedRecord ( ) <EOL> print "<STR_LIT>" , identify . granularity ( ) <EOL> print "<STR_LIT>" , identify . compression ( ) <EOL> print <EOL> print "<STR_LIT>" <EOL> headers = client . listIdentifiers ( from_ = datetime ( <NUM_LIT> , <NUM_LIT:0> <NUM_LIT:2> , <NUM_LIT:8> ) , <EOL> metadataPrefix = '<STR_LIT>' ) <EOL> for header in headers : <EOL> print "<STR_LIT>" , header . identifier ( ) <EOL> print "<STR_LIT>" , header . datestamp ( ) <EOL> print "<STR_LIT>" , header . setSpec ( ) <EOL> print "<STR_LIT>" , header . isDeleted ( ) <EOL> print <EOL> print "<STR_LIT>" <EOL> for prefix , schema , ns in client . listMetadataFormats ( ) : <EOL> print "<STR_LIT>" , prefix <EOL> print "<STR_LIT>" , schema <EOL> print "<STR_LIT>" , ns <EOL> print <EOL> print "<STR_LIT>" <EOL> for header , metadata , about in client . listRecords ( <EOL> from_ = datetime ( <NUM_LIT> , <NUM_LIT:0> <NUM_LIT:2> , <NUM_LIT:8> ) , metadataPrefix = '<STR_LIT>' ) : <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" , header . identifier ( ) <EOL> print "<STR_LIT>" , header . datestamp ( ) <EOL> print "<STR_LIT>" , header . setSpec ( ) <EOL> print "<STR_LIT>" , header . isDeleted ( ) <EOL> print "<STR_LIT>" <EOL> print about <EOL> print <EOL> print "<STR_LIT>" <EOL> for setSpec , setName , setDescription in client . listSets ( ) : <EOL> print "<STR_LIT>" , setSpec <EOL> print "<STR_LIT>" , setName <EOL> print "<STR_LIT>" , setDescription <EOL> print <EOL> client . save ( ) </s>
