Esempio n. 1
0
from fakeclient import FakeCreaterClient
from datetime import datetime
from oaipmh import metadata

registry = metadata.MetadataRegistry()
registry.registerReader('oai_dc', metadata.oai_dc_reader)
# tied to the server at EUR..
client = FakeCreaterClient('http://ep.eur.nl/oai/request',
                           '/home/faassen/tmp/fake3', registry)

#print "GetRecord"
#header, metadata, about = client.getRecord(
#    metadataPrefix='oai_dc', identifier='hdl:1765/315')
#print "identifier:", header.identifier()
#print "datestamp:", header.datestamp()
#print "setSpec:", header.setSpec()
#print "isDeleted:", header.isDeleted()
#print

print "Identify"
identify = client.identify()
print "repositoryName:", identify.repositoryName()
print "baseURL:", identify.baseURL()
print "protocolVerson:", identify.protocolVersion()
print "adminEmails:", identify.adminEmails()
print "earliestDatestamp:", identify.earliestDatestamp()
print "deletedRecords:", identify.deletedRecord()
print "granularity:", identify.granularity()
print "compression:", identify.compression()
print
Esempio n. 2
0
from fakeclient import FakeCreaterClient

# tied to the server at EUR..
client = FakeCreaterClient('http://dspace.ubib.eur.nl/oai/',
                           '/home/faassen/py/oai/tests/fake2')

print "GetRecord"
header, metadata, about = client.getRecord(metadataPrefix='oai_dc',
                                           identifier='hdl:1765/315')
print "identifier:", header.identifier()
print "datestamp:", header.datestamp()
print "setSpec:", header.setSpec()
print "isDeleted:", header.isDeleted()
print

print "Identify"
identify = client.identify()
print "repositoryName:", identify.repositoryName()
print "baseURL:", identify.baseURL()
print "protocolVerson:", identify.protocolVersion()
print "adminEmails:", identify.adminEmails()
print "earliestDatestamp:", identify.earliestDatestamp()
print "deletedRecords:", identify.deletedRecord()
print "granularity:", identify.granularity()
print "compression:", identify.compression()
print

print "ListIdentifiers"
headers = client.listIdentifiers(from_=datetime(2003, 04, 10),
                                 metadataPrefix='oai_dc')
for header in headers:
Esempio n. 3
0
from fakeclient import FakeCreaterClient

# tied to the server at EUR..
client = FakeCreaterClient("http://dspace.ubib.eur.nl/oai/", "/home/faassen/py/oai/tests/fake2")

print "GetRecord"
header, metadata, about = client.getRecord(metadataPrefix="oai_dc", identifier="hdl:1765/315")
print "identifier:", header.identifier()
print "datestamp:", header.datestamp()
print "setSpec:", header.setSpec()
print "isDeleted:", header.isDeleted()
print

print "Identify"
identify = client.identify()
print "repositoryName:", identify.repositoryName()
print "baseURL:", identify.baseURL()
print "protocolVerson:", identify.protocolVersion()
print "adminEmails:", identify.adminEmails()
print "earliestDatestamp:", identify.earliestDatestamp()
print "deletedRecords:", identify.deletedRecord()
print "granularity:", identify.granularity()
print "compression:", identify.compression()
print

print "ListIdentifiers"
headers = client.listIdentifiers(from_=datetime(2003, 04, 10), metadataPrefix="oai_dc")
for header in headers:
    print "identifier:", header.identifier()
    print "datestamp:", header.datestamp()
    print "setSpec:", header.setSpec()
Esempio n. 4
0
from fakeclient import FakeCreaterClient
from datetime import datetime
from oaipmh import metadata

registry = metadata.MetadataRegistry()
registry.registerReader('oai_dc', metadata.oai_dc_reader)
# tied to the server at EUR..
client = FakeCreaterClient(
    'http://ep.eur.nl/oai/request',
    '/home/faassen/tmp/fake3',
    registry
    )

#print "GetRecord"
#header, metadata, about = client.getRecord(
#    metadataPrefix='oai_dc', identifier='hdl:1765/315')
#print "identifier:", header.identifier()
#print "datestamp:", header.datestamp()
#print "setSpec:", header.setSpec()
#print "isDeleted:", header.isDeleted()
#print

print "Identify"
identify = client.identify()
print "repositoryName:", identify.repositoryName()
print "baseURL:", identify.baseURL()
print "protocolVerson:", identify.protocolVersion()
print "adminEmails:", identify.adminEmails()
print "earliestDatestamp:", identify.earliestDatestamp()
print "deletedRecords:", identify.deletedRecord()
print "granularity:", identify.granularity()