public class GenericDigitalObject extends Object implements DigitalObject
| Constructor and Description |
|---|
GenericDigitalObject(String id)
Creates a DigitalObject with the specified identifier and no metadata
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the object
|
Payload |
createLinkedPayload(String pid,
String linkPath)
Creates a new linked payload on the object
|
Payload |
createStoredPayload(String pid,
InputStream in)
Creates a new stored payload on the object
|
String |
getId()
Gets the unique identifier for this object
|
Map<String,Payload> |
getManifest()
Get the manifest of the DigitalObject
|
Properties |
getMetadata()
Instantiates a properties object from the object's metadata payload.
|
Payload |
getPayload(String pid)
Gets the payload with the specified identifier
|
Set<String> |
getPayloadIdList()
Gets the payloads related to this object
|
String |
getSourceId()
Gets the Source related to this object
|
void |
removePayload(String pid)
Remove a payload from the object
|
void |
setId(String oid)
Sets the unique identifier for this object
|
void |
setSourceId(String pid)
Sets the Source related to this object
|
String |
toString()
Get the id of the DigitalObject
|
Payload |
updatePayload(String pid,
InputStream in)
Updates a payload's contents
|
public GenericDigitalObject(String id)
id - unique identifierpublic Map<String,Payload> getManifest()
public String getId()
getId in interface DigitalObjectpublic void setId(String oid)
setId in interface DigitalObjecta - String identifierpublic String getSourceId()
getSourceId in interface DigitalObjectpublic void setSourceId(String pid)
setSourceId in interface DigitalObjecta - payload idpublic Properties getMetadata() throws StorageException
getMetadata in interface DigitalObjectStorageExceptionpublic Set<String> getPayloadIdList()
getPayloadIdList in interface DigitalObjectpublic Payload createStoredPayload(String pid, InputStream in) throws StorageException
createStoredPayload in interface DigitalObjectpid - A string identifierin - An inputStream to the new payload's contentsStorageException - if there was an error creating the payload or
the ID already exists.public Payload createLinkedPayload(String pid, String linkPath) throws StorageException
createLinkedPayload in interface DigitalObjectpid - A string identifierlinkPath - A string showing the path to the linked fileStorageException - if there was an error creating the payload or
the ID already exists.public Payload getPayload(String pid) throws StorageException
getPayload in interface DigitalObjectpid - payload identifierStorageException - if there was an error instantiating the payload
or the ID does not exist.public void removePayload(String pid) throws StorageException
removePayload in interface DigitalObjecta - payload identifierStorageException - if there was an error removing the payloadpublic Payload updatePayload(String pid, InputStream in) throws StorageException
updatePayload in interface DigitalObjectpid - A string identifierin - An InputStream to the new contetntsStorageException - if there was an error updating the payload or
the ID doesn't exist.public void close()
throws StorageException
close in interface DigitalObjectStorageException - if there was an error closing the objectCopyright © 2009-2013. All Rights Reserved.