Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (57 sloc) 2.1 KB
This is a gem for storing files on The Internet Archive, .
Copyright (c) 2009 Papyromancer. See LICENSE for details.
Use cases
* create a payload
- add files
- specify payload metadata
* transfer payload from one place to another
- check availability on destination
- create repository on destination
- transfer bundle (files and metadata files)
- verify transfer succeeded
A Payload contains PayloadFiles and has associated freeform metadata describing
the Payload as a whole.
A PayloadFile describes a single file within a payload, along with its freeform
A repository contains many payloads. It can be a RemoteRepository or a Local
A PayloadInstance is a realization of a payload -- perhaps a directory on disk,
or its instance on
An ArchiveOrgFormatPayloadInstance is in format; it can be local or
* Payload -- specifies [PayloadItem]s to include and the associated metadata
* PayloadItem -- a file within a payload
* GenericPayloadInstance
- add items
- list items
- metadata_store
- load
- save
* PayloadInstance::GenericRemote
- local_payload_instance
- fetch_from_remote
- send_to_remote
* PayloadInstance::GenericLocalDir --
- root_path -- directory containing payload
- metadata_file_path --
- listing_file_path -- file on disk
- contents_file_paths -- paths to the actual PayloadFiles on disk
* ArchiveOrg::RemotePayloadInstance -- the instantiation of a given payload on the servers.
* ArchiveOrg::LocalDirPayloadInstance --
- metadata_store -- _meta.xml file on disk
- listing_store -- _files.xml file on disk
- files -- the actual PayloadFiles on disk
* ArchiveOrg::PayloadMetadataXml
- format XML stream for metadata
* ArchiveOrg::PayloadListingXml
- format XML stream for file listing
* TmpDirPayloadInstance
Specifically locates payload instance in the tmp dir
* PayloadTransferStrategy
Figures out how to transfer data from one payload instance to another