|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.storage.lowlevel.DefaultLowlevelStorage
public class DefaultLowlevelStorage
| Field Summary | |
|---|---|
static String |
DATASTREAM_REGISTRY_TABLE
|
static String |
DATASTREAM_STORE_BASE
|
static String |
FILESYSTEM
|
static String |
OBJECT_REGISTRY_TABLE
|
static String |
OBJECT_STORE_BASE
|
static String |
PATH_ALGORITHM
|
static String |
PATH_REGISTRY
|
static String |
REGISTRY_NAME
|
| Constructor Summary | |
|---|---|
DefaultLowlevelStorage(Map<String,Object> configuration)
|
|
| Method Summary | |
|---|---|
long |
addDatastream(String pid,
InputStream content)
Sets the content of a new datastream version. |
void |
addObject(String pid,
InputStream content)
Adds a new object. |
void |
auditDatastream()
Performs a consistency check against the datastream index if such an index exists. |
void |
auditObject()
Performs a consistency check against the object index if such an index exists. |
long |
getDatastreamSize(String dsKey)
Return the size of a datastream in bytes |
Iterator<String> |
listDatastreams()
Lists all stored datastreams in no particular order. |
Iterator<String> |
listObjects()
Lists all stored objects in no particular order. |
void |
rebuildDatastream()
Reconstructs the datastream index if such an index exists. |
void |
rebuildObject()
Reconstructs the object index if such an index exists. |
void |
removeDatastream(String pid)
Removes the content of an existing datastream version. |
void |
removeObject(String pid)
Removes an object. |
long |
replaceDatastream(String pid,
InputStream content)
Sets the content of an existing datastream version. |
void |
replaceObject(String pid,
InputStream content)
Replaces an existing object. |
InputStream |
retrieveDatastream(String pid)
Gets the content of an existing datastream version. |
InputStream |
retrieveObject(String pid)
Gets an existing object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String REGISTRY_NAME
public static final String OBJECT_REGISTRY_TABLE
public static final String DATASTREAM_REGISTRY_TABLE
public static final String OBJECT_STORE_BASE
public static final String DATASTREAM_STORE_BASE
public static final String FILESYSTEM
public static final String PATH_ALGORITHM
public static final String PATH_REGISTRY
| Constructor Detail |
|---|
public DefaultLowlevelStorage(Map<String,Object> configuration)
throws LowlevelStorageException
LowlevelStorageException| Method Detail |
|---|
public void addObject(String pid,
InputStream content)
throws LowlevelStorageException
ILowlevelStorage
addObject in interface ILowlevelStoragepid - the pid of the object.content - the serialized object.
LowlevelStorageException - if the object already exists or
cannot be added for any other reason.
public void replaceObject(String pid,
InputStream content)
throws LowlevelStorageException
ILowlevelStorage
replaceObject in interface ILowlevelStoragepid - the pid of the object.content - the serialized object.
LowlevelStorageException - if the object does not already exist
or cannot be replaced for any other reason.
public InputStream retrieveObject(String pid)
throws LowlevelStorageException
ILowlevelStorage
retrieveObject in interface ILowlevelStoragepid - the pid of the object.
LowlevelStorageException - if the object does not exist or
cannot be read for any other reason.
public void removeObject(String pid)
throws LowlevelStorageException
ILowlevelStorage
removeObject in interface ILowlevelStoragepid - the pid of the object.
LowlevelStorageException - if the object does not exist or
cannot be removed for any other reason.
public void rebuildObject()
throws LowlevelStorageException
ILowlevelStorage
rebuildObject in interface ILowlevelStorageLowlevelStorageException - if an error occurs that prevents the
index from being rebuilt.
public void auditObject()
throws LowlevelStorageException
ILowlevelStorage
auditObject in interface ILowlevelStorageLowlevelStorageException - if an error occurs that prevents the
consistency check from taking place.
public long addDatastream(String pid,
InputStream content)
throws LowlevelStorageException
ILowlevelStorage
addDatastream in interface ILowlevelStoragepid - the $pid "+" $dsId "+" $dsVersionId string that uniquely
identifies the datastream version.content - the content.
LowlevelStorageException - if the datastream version already
exists or cannot be added for any other reason.
public long replaceDatastream(String pid,
InputStream content)
throws LowlevelStorageException
ILowlevelStorage
replaceDatastream in interface ILowlevelStoragepid - the $pid "+" $dsId "+" $dsVersionId string that uniquely
identifies the datastream version.content - the content.
LowlevelStorageException - if the datastream version does not
already exist or cannot be replaced for any other reason.
public InputStream retrieveDatastream(String pid)
throws LowlevelStorageException
ILowlevelStorage
retrieveDatastream in interface ILowlevelStoragepid - the $pid "+" $dsId "+" $dsVersionId string that uniquely
identifies the datastream version.
LowlevelStorageException - if the datastream version does not
exist or cannot be read for any other reason.
public void removeDatastream(String pid)
throws LowlevelStorageException
ILowlevelStorage
removeDatastream in interface ILowlevelStoragepid - the $pid "+" $dsId "+" $dsVersionId string that uniquely
identifies the datastream version.
LowlevelStorageException - if the datastream version does not
exist or cannot be removed for any other reason.
public void rebuildDatastream()
throws LowlevelStorageException
ILowlevelStorage
rebuildDatastream in interface ILowlevelStorageLowlevelStorageException - if an error occurs that prevents the
public void auditDatastream()
throws LowlevelStorageException
ILowlevelStorage
auditDatastream in interface ILowlevelStorageLowlevelStorageException - if an error occurs that prevents the
consistency check from taking place.public Iterator<String> listObjects()
IListable
listObjects in interface IListablepublic Iterator<String> listDatastreams()
IListable
listDatastreams in interface IListable
public long getDatastreamSize(String dsKey)
throws LowlevelStorageException
ISizable
getDatastreamSize in interface ISizableLowlevelStorageException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||