The steward.model Module
We are modules that implement the database model that maintains information about the binary objects stored in Steward.
-
class steward.model.Alias(name)
An alias is a easy to remember name asociated with one object stored in Steward
-
id
- Public-facing descriptor, placed in the mapped class dictionary.
-
name
- Public-facing descriptor, placed in the mapped class dictionary.
-
register_id
- Public-facing descriptor, placed in the mapped class dictionary.
-
steward.model.Check()
- I raise exceptions when there are problems with the expected database schema.
-
class steward.model.DbVersion
The version of the database schecma
-
exists()
- True if the stewardversion table exists.
-
id
- Public-facing descriptor, placed in the mapped class dictionary.
-
isCurrentVersion()
- True if the database version is identical to the version expected by the code
-
isPreviousVersion()
- True if the version of the database schema is older then what the code expects
-
schema
- Public-facing descriptor, placed in the mapped class dictionary.
-
version
- Public-facing descriptor, placed in the mapped class dictionary.
-
class steward.model.Event(type, user)
Represents an event occurence in Steward
-
action
- Public-facing descriptor, placed in the mapped class dictionary.
-
date
- Public-facing descriptor, placed in the mapped class dictionary.
-
id
- Public-facing descriptor, placed in the mapped class dictionary.
-
register_id
- Public-facing descriptor, placed in the mapped class dictionary.
-
user
- Public-facing descriptor, placed in the mapped class dictionary.
-
class steward.model.Registry
The registry object registers the binaries in the Steward instance
-
addBinaryStream(fs)
Add a reference to an available datastream to this object
-
aliases
- Public-facing descriptor, placed in the mapped class dictionary.
-
date_stored
- Public-facing descriptor, placed in the mapped class dictionary.
-
events
- Public-facing descriptor, placed in the mapped class dictionary.
-
getBinaryStream()
Read the filestream. Never reads the entirestream into memory.
| Returns: | A generator that will read the stream in parts. |
-
id
- Public-facing descriptor, placed in the mapped class dictionary.
-
length
- Public-facing descriptor, placed in the mapped class dictionary.
-
mimetype
- Public-facing descriptor, placed in the mapped class dictionary.
-
sha
- Public-facing descriptor, placed in the mapped class dictionary.
-
status
- Public-facing descriptor, placed in the mapped class dictionary.
-
steward.model.Setup(conf)
I Check if the database is good to be used by Steward.
| Parameters: |
- conf – Dictionary with the configration data.
|
-
steward.model.init_model(engine)
- Call me before using any of the tables or classes in the model.