tardis.apps.oaipmh package

Submodules

tardis.apps.oaipmh.server module

class tardis.apps.oaipmh.server.ProxyingMetadataRegistry(providers)

Bases: oaipmh.metadata.MetadataRegistry

A registry that only writes, and does so by proxying to Providers.

hasReader(metadata_prefix)
hasWriter(metadata_prefix)
readMetadata(metadata_prefix, element)
registerReader(metadata_prefix, reader)
registerWriter(metadata_prefix, writer)
writeMetadata(metadata_prefix, element, metadata)

Write metadata as XML.

element - ElementTree element to write under metadata - metadata object to write

class tardis.apps.oaipmh.server.ProxyingServer(providers)

Bases: oaipmh.interfaces.IOAI

getRecord(metadataPrefix, identifier)

Get a record for a metadataPrefix and identifier.

Raises:
  • oaipmh.error.CannotDisseminateFormatError – if no provider returns a result, but at least one provider responds with oaipmh.error.CannotDisseminateFormatError (meaning the identifier exists)
  • oaipmh.error.IdDoesNotExistError – if all providers fail with oaipmh.error.IdDoesNotExistError
Returns:

first successful provider response

Return type:

response

identify()

Retrieve information about the repository.

Returns:an oaipmh.common.Identify object describing the repository.
Return type:oaipmh.common.Identify
listIdentifiers(metadataPrefix, **kwargs)

Lists identifiers from all providers as a single set.

Raises:
  • error.CannotDisseminateFormatError – if metadataPrefix is not supported by the repository.
  • error.NoSetHierarchyError – if a set is provided, as the repository does not support sets.
Returns:

a set.Set of headers.

Return type:

set

listMetadataFormats(**kwargs)

List metadata formats from all providers in a single set.

Raises:
  • error.IdDoesNotExistError – if record with identifier does not exist.
  • error.NoMetadataFormatsError – if no formats are available for the indicated record, but it does exist.
Returns:

a frozenset of metadataPrefix, schema, metadataNamespace tuples (each entry in the tuple is a string).

Return type:

frozenset

listRecords(metadataPrefix, **kwargs)

Lists records from all providers as a single set.

Raises:
  • error.CannotDisseminateFormatError – if metadataPrefix is not supported by the repository.
  • error.NoSetHierarchyError – if a set is provided, as the repository does not support sets.
Returns:

a set.Set of header, metadata, about tuples.

Return type:

set

listSets()

List sets.

Raises:oaipmh.error.NoSetHierarchyError – because set hierarchies are currrently not implemented
tardis.apps.oaipmh.server.get_server(current_site)

tardis.apps.oaipmh.urls module

tardis.apps.oaipmh.views module

tardis.apps.oaipmh.views.endpoint(request)

Module contents