The top level module for Bauble.
Call a command handler.
Parameters: |
|
---|
Bases: sqlalchemy.ext.declarative.DeclarativeMeta
MapperBase adds the id, _created and _last_updated columns to all tables.
Open a database connection. This function sets bauble.db.engine to the opened engined.
Return bauble.db.engine if successful else returns None and bauble.db.engine remains unchanged.
Parameters: |
|
---|
Create new Bauble database at the current connection
Parameters: |
|
---|
The connection manager provides a GUI for creating and opening connections. This is the first thing displayed when Bauble starts.
Access to standard paths used by Bauble.
Search the plugin path for modules that provide a plugin. If path is a directory then search the directory for plugins. If path is None then use the default plugins path, bauble.plugins.
Parameters: |
|
---|
Initialize the plugin manager.
1. Check for and install any plugins in the plugins dict that aren’t in the registry. 2. Call each init() for each plugin the registry in order of dependency 3. Register the command handlers in the plugin’s commands[]
NOTE: This should be called after after Bauble has established a connection to a database with db.open()
Parameters: |
|
---|
Manipulate the bauble plugin registry. The registry is stored in the bauble meta table in JSON format. This class provides a dict interface to the registry.
Parameters: |
|
---|
A dict like object for accessing registry values.
The name and version attributes are required
Perform topological sort.
Parameters: |
|
---|
Queue a new task
Parameters: |
|
---|
Bases: sqlalchemy.types.TypeDecorator
A database independent Enum type. The value is stored in the database as a Unicode string.
Bases: sqlalchemy.types.TypeDecorator
A Date type that allows Date strings
Bases: sqlalchemy.types.TypeDecorator
A DateTime type that allows strings
A common set of utility functions used throughout Bauble.
Bases: sqlalchemy.ext.declarative.Base
Table name: | family |
---|---|
Columns: |
|
Properties: |
|
Constraints: | The family table has a unique constraint on family/qualifier. |
Bases: sqlalchemy.ext.declarative.Base
Table name: | family_synonyms |
---|---|
Columns: | family_id: synonyms_id: |
Properties: | synonyms: species: |
Bases: sqlalchemy.ext.declarative.Base
Table name: | genus |
---|---|
Columns: |
author: notes: |
Properties: | family: synonyms: |
Contraints: | The combination of genus, hybrid, author, qualifier and family_id must be unique. |
Bases: sqlalchemy.ext.declarative.Base
Table name: | genus_synonym |
---|
Bases: sqlalchemy.ext.declarative.Base
Table name: | species |
---|---|
Columns: |
|
Properties: | accessions: vernacular_names: default_vernacular_name: synonyms: distribution: |
Constraints: | The combination of sp, sp_author, sp_hybrid, sp_qual, cv_group, trade_name, infrasp, infrasp_author, infrasp_rank, genus_id |
Bases: sqlalchemy.ext.declarative.Base
Table name: | species_synonym |
---|
Bases: sqlalchemy.ext.declarative.Base
Table name: | vernacular_name |
---|---|
Columns: |
|
Properties: | |
Constraints: |
Bases: sqlalchemy.ext.declarative.Base
Table name: | default_vernacular_name |
---|
DefaultVernacularName is not meant to be instantiated directly. Usually the default vernacular name is set on a species by setting the default_vernacular_name property on Species to a VernacularName instance
Columns: |
vernacular_name_id: |
---|---|
Properties: | |
Constraints: |
Bases: sqlalchemy.ext.declarative.Base
Table name: | species_distribution |
---|---|
Columns: | |
Properties: | |
Constraints: |
Bases: sqlalchemy.ext.declarative.Base
Represents a geography unit.
Table name: | geography |
---|---|
Columns: | name: tdwg_code: iso_code: parent_id: |
Properties: | children: |
Constraints: |
Bases: sqlalchemy.ext.declarative.Base
Table name: | accession |
---|---|
Columns: |
|
Properties: |
|
Constraints: |
Bases: sqlalchemy.ext.declarative.Base
Table name: | plant |
---|---|
Columns: |
|
Properties: |
|
Constraints: | The combination of code and accession_id must be unique. |
Bases: sqlalchemy.ext.declarative.Base
Table name: | location |
---|---|
Columns: | site: description: |
Relation: | plants: |
Bases: sqlalchemy.ext.declarative.Base
Table name: | collection |
---|---|
Columns: | collector: sqlalchemy.types.Unicode(64) collectors_code: sqlalchemy.types.Unicode(50) date: sqlalchemy.types.Date locale: sqlalchemy.types.UnicodeText(nullable=False) latitude: sqlalchemy.types.Float longitude: sqlalchemy.types.Float gps_datum: sqlalchemy.types.Unicode(32) geo_accy: sqlalchemy.types.Float elevation: sqlalchemy.types.Float elevation_accy: sqlalchemy.types.Float habitat: sqlalchemy.types.UnicodeText geography_id: sqlalchemy.types.Integer(ForeignKey('geography.id')) notes: sqlalchemy.types.UnicodeText accession_id: sqlalchemy.types.Integer(ForeignKey('accession.id'), nullable=False) |
Properties: |
Also contains an _accession property that was created as a backref from the Accession mapper
Constraints: |
---|
Bases: sqlalchemy.ext.declarative.Base
Table name: | donation |
---|---|
Columns: | donor_id: sqlalchemy.types.Integer, ForeignKey('donor.id'), nullable=False) donor_acc: sqlalchemy.types.Unicode(32) notes: sqlalchemy.types.UnicodeText date: bauble.types..Date accession_id: sqlalchemy.types.Integer(ForeignKey('accession.id'), nullable=False) |
Properties: |
|
The PDF report generator module.
This module takes a list of objects, get all the plants from the objects, converts them to the ABCD XML format, transforms the ABCD data to an XSL formatting stylesheet and uses a XSL-PDF renderer to convert the stylesheet to PDF.