public class GenericDigitalObject extends java.lang.Object implements DigitalObject
| Constructor and Description |
|---|
GenericDigitalObject(java.lang.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(java.lang.String pid,
java.lang.String linkPath)
Creates a new linked payload on the object
|
Payload |
createStoredPayload(java.lang.String pid,
java.io.InputStream in)
Creates a new stored payload on the object
|
java.lang.String |
getId()
Gets the unique identifier for this object
|
java.util.Map<java.lang.String,Payload> |
getManifest()
Get the manifest of the DigitalObject
|
java.util.Properties |
getMetadata()
Instantiates a properties object from the object's metadata payload.
|
Payload |
getPayload(java.lang.String pid)
Gets the payload with the specified identifier
|
java.util.Set<java.lang.String> |
getPayloadIdList()
Gets the payloads related to this object
|
java.lang.String |
getSourceId()
Gets the Source related to this object
|
void |
removePayload(java.lang.String pid)
Remove a payload from the object
|
void |
setId(java.lang.String oid)
Sets the unique identifier for this object
|
void |
setSourceId(java.lang.String pid)
Sets the Source related to this object
|
java.lang.String |
toString()
Get the id of the DigitalObject
|
Payload |
updatePayload(java.lang.String pid,
java.io.InputStream in)
Updates a payload's contents
|
public GenericDigitalObject(java.lang.String id)
id - unique identifierpublic java.util.Map<java.lang.String,Payload> getManifest()
public java.lang.String getId()
getId in interface DigitalObjectpublic void setId(java.lang.String oid)
setId in interface DigitalObjecta - String identifierpublic java.lang.String getSourceId()
getSourceId in interface DigitalObjectpublic void setSourceId(java.lang.String pid)
setSourceId in interface DigitalObjecta - payload idpublic java.util.Properties getMetadata()
throws StorageException
getMetadata in interface DigitalObjectStorageExceptionpublic java.util.Set<java.lang.String> getPayloadIdList()
getPayloadIdList in interface DigitalObjectpublic Payload createStoredPayload(java.lang.String pid, java.io.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(java.lang.String pid, java.lang.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(java.lang.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(java.lang.String pid)
throws StorageException
removePayload in interface DigitalObjecta - payload identifierStorageException - if there was an error removing the payloadpublic Payload updatePayload(java.lang.String pid, java.io.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 objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2009-2019. All Rights Reserved.