DBPublication structure

Structure used in ZODB (database) for storing publications.

class storage.structures.db.db_publication.DBPublication(**kwargs)

Bases: persistent.Persistent, kwargs_obj.kwargs_obj.KwargsObj

Database structure used to store basic metadata about Publications.

title

str – Title of the publication.

author

str – Name of the author.

pub_year

str – Year when the publication was released.

isbn

str – ISBN for the publication.

urnnbn

strURN:NBN for the publication.

uuid

str – UUID string to pair the publication with edeposit.

aleph_id

str – ID used in aleph.

producent_id

str – ID used for producent.

is_public

bool – Is the file public?

filename

str – Original filename.

is_periodical

bool – Is the publication periodical?

path

str – Path in the tree (used for periodicals).

file_pointer

str – Pointer to the file on the file server.

classmethod from_comm(pub)

Convert communication namedtuple to this class.

Parameters:pub (obj) – Publication instance which will be converted.
Returns:DBPublication instance.
Return type:obj
url
indexes

Returns – list: List of strings, which may be used as indexes in DB.

project_key
to_comm(light_request=False)

Convert self to Publication.

Returns:Publication instance.
Return type:obj