geonature.core.gn_commons.models

Submodules

Package Contents

Classes

BibTablesLocation

The base class of the SQLAlchemy.Model declarative model class.

CorModuleDataset

The base class of the SQLAlchemy.Model declarative model class.

TModules

The base class of the SQLAlchemy.Model declarative model class.

TMedias

The base class of the SQLAlchemy.Model declarative model class.

TParameters

The base class of the SQLAlchemy.Model declarative model class.

TValidations

The base class of the SQLAlchemy.Model declarative model class.

VLatestValidations

The base class of the SQLAlchemy.Model declarative model class.

THistoryActions

The base class of the SQLAlchemy.Model declarative model class.

TMobileApps

The base class of the SQLAlchemy.Model declarative model class.

TPlaces

The base class of the SQLAlchemy.Model declarative model class.

BibWidgets

The base class of the SQLAlchemy.Model declarative model class.

TDatasets

The base class of the SQLAlchemy.Model declarative model class.

PermObject

The base class of the SQLAlchemy.Model declarative model class.

TAdditionalFields

The base class of the SQLAlchemy.Model declarative model class.

Functions

_resolve_import_cor_object_module()

Attributes

cor_module_dataset

last_validation_query

last_validation

cor_field_object

cor_field_module

cor_field_dataset

cor_field_module

cor_field_object

cor_field_dataset

class geonature.core.gn_commons.models.BibTablesLocation[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 'bib_tables_location'
__table_args__
id_table_location
table_desc
schema_name
table_name
pk_field
uuid_field_name
geonature.core.gn_commons.models.cor_module_dataset[source]
class geonature.core.gn_commons.models.CorModuleDataset[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 'cor_module_dataset'
__table_args__
id_module
id_dataset
geonature.core.gn_commons.models._resolve_import_cor_object_module()[source]
class geonature.core.gn_commons.models.TModules[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

class base_defaultdict

Bases: collections.defaultdict

Avoid polymorphic error when polymorphic identities are declared in database but absent from venv: fallback on base identity. Taken from CTFd.

__missing__(key)
__tablename__ = 't_modules'
__table_args__
type
__mapper_args__
id_module
module_code
module_label
module_picto
module_desc
module_group
module_path
module_external_url
module_target
module_comment
active_frontend
active_backend
module_doc_url
module_order
ng_module
meta_create_date
meta_update_date
objects
__str__()[source]

Return str(self).

class geonature.core.gn_commons.models.TMedias[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 't_medias'
__table_args__
id_media
id_nomenclature_media_type
id_table_location
unique_id_media
uuid_attached_row
title_fr
title_en
title_it
title_es
title_de
media_url
media_path
author
description_fr
description_en
description_it
description_es
description_de
is_public
meta_create_date
meta_update_date
static base_dir()[source]
__before_commit_delete__()[source]
remove_file(move=True)[source]
remove_thumbnails()[source]
class geonature.core.gn_commons.models.TParameters[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 't_parameters'
__table_args__
id_parameter
id_organism
parameter_name
parameter_desc
parameter_value
parameter_extra_value
class geonature.core.gn_commons.models.TValidations[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 't_validations'
__table_args__
id_validation
uuid_attached_row
id_nomenclature_valid_status
nomenclature_valid_status
id_validator
validator_role
validation_auto
validation_comment
validation_date
validation_auto
validation_label
static auto_validation(fct_auto_validation)[source]
geonature.core.gn_commons.models.last_validation_query[source]
geonature.core.gn_commons.models.last_validation[source]
class geonature.core.gn_commons.models.VLatestValidations[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 'v_latest_validation'
__table_args__
id_validation
uuid_attached_row
id_nomenclature_valid_status
id_validator
validation_comment
validation_date
class geonature.core.gn_commons.models.THistoryActions[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 't_history_actions'
__table_args__
id_history_action
id_table_location
uuid_attached_row
operation_type
operation_date
table_content
class geonature.core.gn_commons.models.TMobileApps[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 't_mobile_apps'
__table_args__
id_mobile_app
app_code
relative_path_apk
url_apk
url_settings
package
version_code
class geonature.core.gn_commons.models.TPlaces[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 't_places'
__table_args__
id_place
id_role
role
place_name
place_geom
class geonature.core.gn_commons.models.BibWidgets[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 'bib_widgets'
__table_args__
id_widget
widget_name
__str__()[source]

Return str(self).

geonature.core.gn_commons.models.cor_field_object[source]
geonature.core.gn_commons.models.cor_field_module[source]
geonature.core.gn_commons.models.cor_field_dataset[source]
geonature.core.gn_commons.models.cor_field_module[source]
geonature.core.gn_commons.models.cor_field_object[source]
geonature.core.gn_commons.models.cor_field_dataset[source]
class geonature.core.gn_commons.models.TDatasets[source]

Bases: geonature.core.gn_meta.models.commons.db.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 't_datasets'
__table_args__
id_dataset
unique_dataset_id
id_acquisition_framework
acquisition_framework
dataset_name
dataset_shortname
dataset_desc
id_nomenclature_data_type
keywords
marine_domain
terrestrial_domain
id_nomenclature_dataset_objectif
bbox_west
bbox_east
bbox_south
bbox_north
id_nomenclature_collecting_method
id_nomenclature_data_origin
id_nomenclature_source_status
id_nomenclature_resource_type
meta_create_date
meta_update_date
active
validable
id_digitizer
digitizer
creator
id_taxa_list
modules
nomenclature_data_type
nomenclature_dataset_objectif
nomenclature_collecting_method
nomenclature_data_origin
nomenclature_source_status
nomenclature_resource_type
cor_territories
cor_dataset_actor
additional_fields
user_actors()[source]
organism_actors()[source]
is_deletable()[source]
has_instance_permission(scope, _through_af=True)[source]

_through_af prevent infinite recursion

__str__()[source]

Return str(self).

static get_id(uuid_dataset)[source]
static get_uuid(id_dataset)[source]
classmethod _get_read_scope(user=None)[source]
classmethod _get_create_scope(module_code, user=None, object_code=None)[source]
classmethod filter_by_scope(scope, *, query, user=None)[source]
classmethod filter_by_params(params={}, *, _af_search=True, query=None)[source]
classmethod filter_by_readable(query, user=None)[source]

Return the datasets where the user has autorization via its CRUVED

classmethod filter_by_creatable(module_code, *, query, user=None, object_code=None)[source]

Return all dataset where user have read rights minus those who user to not have create rigth

classmethod filter_by_areas(areas, *, query)[source]
class geonature.core.gn_commons.models.PermObject[source]

Bases: geonature.utils.env.db.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 't_objects'
__table_args__
id_object
code_object
description_object
__str__()[source]

Return str(self).

class geonature.core.gn_commons.models.TAdditionalFields[source]

Bases: geonature.utils.env.DB.Model

The base class of the SQLAlchemy.Model declarative model class.

To define models, subclass db.Model, not this. To customize db.Model, subclass this and pass it as model_class to SQLAlchemy. To customize db.Model at the metaclass level, pass an already created declarative model class as model_class.

__tablename__ = 't_additional_fields'
__table_args__
id_field
field_name
field_label
required
description
quantitative
unity
field_values
code_nomenclature_type
additional_attributes
id_widget
id_list
exportable
field_order
type_widget
bib_nomenclature_type
additional_attributes
multiselect
api
default_value
modules
objects
datasets
__str__()[source]

Return str(self).