public class DSBitStoreService extends Object implements BitStoreService
| Modifier and Type | Field and Description |
|---|---|
protected String |
REGISTERED_FLAG |
| Constructor and Description |
|---|
DSBitStoreService() |
| Modifier and Type | Method and Description |
|---|---|
Map |
about(Bitstream bitstream,
Map attrs)
Obtain technical metadata about an asset in the asset store.
|
String |
generateId()
Return an identifier unique to this asset store instance
|
InputStream |
get(Bitstream bitstream)
Retrieve the bits for the asset with ID.
|
File |
getBaseDir() |
protected File |
getFile(Bitstream bitstream)
Return the file corresponding to a bitstream.
|
protected String |
getIntermediatePath(String iInternalId)
Return the intermediate path derived from the internal_id.
|
void |
init()
Initialize the asset store
|
boolean |
isRegisteredBitstream(String internalId) |
void |
put(Bitstream bitstream,
InputStream in)
Store a stream of bits.
|
void |
remove(Bitstream bitstream)
Remove an asset from the asset store.
|
void |
setBaseDir(File baseDir) |
protected final String REGISTERED_FLAG
public void init()
init in interface BitStoreServicepublic String generateId()
generateId in interface BitStoreServicepublic InputStream get(Bitstream bitstream) throws IOException
get in interface BitStoreServicebitstream - The ID of the asset to retrieveIOException - If a problem occurs while retrieving the bitspublic void put(Bitstream bitstream, InputStream in) throws IOException
If this method returns successfully, the bits have been stored. If an exception is thrown, the bits have not been stored.
put in interface BitStoreServicein - The stream of bits to storebitstream - The bitstream objectIOException - If a problem occurs while storing the bitspublic Map about(Bitstream bitstream, Map attrs) throws IOException
about in interface BitStoreServicebitstream - The asset to describeattrs - A Map whose keys consist of desired metadata fieldsIOException - If a problem occurs while obtaining metadatapublic void remove(Bitstream bitstream) throws IOException
remove in interface BitStoreServicebitstream - The asset to deleteIOException - If a problem occurs while removing the assetprotected File getFile(Bitstream bitstream) throws IOException
null.bitstream - the database table row for the bitstream. Can be
nullnullIOException - If a problem occurs while determining the fileprotected String getIntermediatePath(String iInternalId)
iInternalId - The internal_idpublic boolean isRegisteredBitstream(String internalId)
public File getBaseDir()
public void setBaseDir(File baseDir)
Copyright © 2022 LYRASIS. All rights reserved.