Files Python Module

Contains the Files object model primary unit of metadata for Pacifica.

class pacifica.metadata.orm.files.Files(*args, **kwargs)

Files metadata.

This object contains various attributes describing a file and where it came from.

Attributes:
Name Description
name Name of the file
subdir Subdirectory the file is in
ctime Creation time for the file
mtime User modified time for the file
hashsum Hash sum string
hashtype Hash sum type string
size Size of the file in bytes
transaction Link to the transaction model
mimetype mimetype of the file, if any
suspense_date date the proposal is made available
encoding encoding in the file name or subdir field
DoesNotExist

alias of FilesDoesNotExist

static elastic_mapping_builder(obj)

Build the elasticsearch mapping bits.

from_hash(obj)

Convert the hash to an object.

to_hash(**flags)

Convert the object to a hash.

classmethod where_clause(kwargs)

PeeWee specific where expression.