Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
API:EPrints/Storage
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==DESCRIPTION== Unless you are directly manipulating how data streams are stored you should use the methods for retrieving and writing data available from [[API:EPrints/DataObj/File|EPrints::DataObj::File]]. This module is the storage control layer which uses [[API:EPrints/Plugin/Storage|EPrints::Plugin::Storage]] plugins to support various storage back-ends. It enables the storage, retrieval and deletion of data streams. The maximum size of a stream is dependent on the back-end storage mechanism. Storage works on [[API:EPrints/DataObj/File|EPrints::DataObj::File]] objects, which record the size of the data stream and where it has been stored. Unless a specific storage back-end is used, where a file is stored depends on the storage policy which is located in ''lib/storage/default.xml'': <source lang="xml"><store xmlns="http://eprints.org/ep3/storage" xmlns:epc="http://eprints.org/ep3/control"> <epc:choose> <epc:when test="datasetid = 'document'"> <plugin name="Local"/> </epc:when> <epc:otherwise> <plugin name="Local"/> </epc:otherwise> </epc:choose> </store></source> The storage policy is a EP-script file that resolves to a list of one or more "plugin" elements. When storing, all matching plugins will be given the data stream to store (i.e. multiple copies). When retrieving, the first plugin to be successfully opened for reading will be used. The item context used when the storage policy is evaluated is the [[API:EPrints/DataObj/File|EPrints::DataObj::File]]. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_callbacks --> ===Callbacks=== Writing to and retrieving from data streams makes use of callback functions. This allows data to be streamed (to avoid memory overheads) and for flexibility in where data is going. For details on the callback API see [[API:EPrints/DataObj/File#get_file|EPrints::DataObj::File/get_file]] and [[API:EPrints/DataObj/File#set_file|EPrints::DataObj::File/set_file]] for retrieving and writing respectively. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_methods -->
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)