models – Models

UserProfile Objects

class tardis.tardis_portal.models.UserProfile(*args, **kwargs)

UserProfile class is an extension to the Django standard user model.

Attribute isDjangoAccount:
 is the user a local DB user
Attribute user:a foreign key to the django.contrib.auth.models.User
exception DoesNotExist
exception UserProfile.MultipleObjectsReturned
UserProfile.getUserAuthentications()
UserProfile.objects = <django.db.models.manager.Manager object at 0x217ec1d0>
UserProfile.user
UserProfile.userauthentication_set

Experiment Objects

class tardis.tardis_portal.models.Experiment(*args, **kwargs)

The Experiment model inherits from django.db.models.Model

Attribute url:Undocumented
Attribute approved:
 Undocumented
Attribute title:
 the title of the experiment.
Attribute institution_name:
 the name of the institution who created the dataset.
Attribute start_time:
 Undocumented
Attribute end_time:
 Undocumented
Attribute created_time:
 Undocumented
Attribute handle:
 Undocumented
Attribute public:
 Undocumented
Attribute objects:
 default model manager
Attribute safe:ACL aware model manager
exception DoesNotExist
exception Experiment.MultipleObjectsReturned
Experiment.author_experiment_set
Experiment.created_by
Experiment.dataset_set
Experiment.experimentacl_set
Experiment.experimentparameterset_set
Experiment.getParameterSets(schemaType=None)

Return the experiment parametersets associated with this experiment.

Experiment.get_absolute_filepath()

Return the absolute storage path to the current Experiment

Experiment.get_absolute_url(*moreargs, **morekwargs)

Return the absolute url to the current Experiment

Experiment.get_create_token_url(*args, **kwargs)

Return the absolute url to the create token view of the current Experiment

Experiment.get_download_urls(comptype='zip')
Experiment.get_edit_url(*args, **kwargs)

Return the absolute url to the edit view of the current Experiment

Experiment.get_next_by_created_time(*moreargs, **morekwargs)
Experiment.get_next_by_update_time(*moreargs, **morekwargs)
Experiment.get_or_create_directory()
Experiment.get_previous_by_created_time(*moreargs, **morekwargs)
Experiment.get_previous_by_update_time(*moreargs, **morekwargs)
Experiment.objects = <tardis.tardis_portal.managers.OracleSafeManager object at 0x2173a610>
Experiment.safe = <tardis.tardis_portal.managers.ExperimentManager object at 0x2173a910>
Experiment.token_set

ExperimentACL Objects

class tardis.tardis_portal.models.ExperimentACL(*args, **kwargs)

The ExperimentACL table is the core of the Tardis Authorisation framework

Attribute pluginId:
 the the name of the auth plugin being used
Attribute entityId:
 a foreign key to auth plugins
Attribute experimentId:
 a forign key to the tardis.tardis_portal.models.Experiment
Attribute canRead:
 gives the user read access
Attribute canWrite:
 gives the user write access
Attribute canDelete:
 gives the user delete permission
Attribute isOwner:
 the experiment owner flag.
Attribute effectiveDate:
 the date when access takes into effect
Attribute expiryDate:
 the date when access ceases
Attribute aclOwnershipType:
 system-owned or user-owned.

System-owned ACLs will prevent users from removing or editing ACL entries to a particular experiment they own. User-owned ACLs will allow experiment owners to remove/add/edit ACL entries to the experiments they own.

exception DoesNotExist
exception ExperimentACL.MultipleObjectsReturned
ExperimentACL.OWNER_OWNED = 1
ExperimentACL.SYSTEM_OWNED = 2
ExperimentACL.experiment
ExperimentACL.get_aclOwnershipType_display(*moreargs, **morekwargs)

If possible, resolve the pluginId/entityId combination to a user or group object.

ExperimentACL.objects = <django.db.models.manager.Manager object at 0x21649090>

Author_Experiment Objects

class tardis.tardis_portal.models.Author_Experiment(*args, **kwargs)

Author_Experiment(id, experiment_id, author, order)

exception DoesNotExist
exception Author_Experiment.MultipleObjectsReturned
Author_Experiment.experiment
Author_Experiment.objects = <django.db.models.manager.Manager object at 0x21661850>

Dataset Objects

class tardis.tardis_portal.models.Dataset(*args, **kwargs)

Class to link datasets to experiments

Attribute experiment:
 a forign key to the tardis.tardis_portal.models.Experiment
Attribute description:
 description of this dataset
exception DoesNotExist
exception Dataset.MultipleObjectsReturned
Dataset.addDatafile(filepath, protocol='', url='', size=None, commit=True)

Add Datafile helper function

Parameters:filepath (string) – the file path within the repository
Dataset.dataset_file_set
Dataset.datasetparameterset_set
Dataset.experiment
Dataset.getParameterSets(schemaType=None)

Return the dataset parametersets associated with this experiment.

Dataset.get_absolute_filepath()
Dataset.objects = <tardis.tardis_portal.managers.OracleSafeManager object at 0x218c7d90>

Dataset_File Objects

class tardis.tardis_portal.models.Dataset_File(*args, **kwargs)

Class to store meta-data about a physical file

Attribute dataset:
 the foreign key to the tardis.tardis_portal.models.Dataset the file belongs to.
Attribute filename:
 the name of the file, excluding the path.
Attribute url:the url that the datafile is located at
Attribute size:the size of the file.
Attribute protocol:
 the protocol used to access the file.
Attribute created_time:
 time the file was added to tardis
Attribute modification_time:
 last modification time of the file
Attribute mimetype:
 for example ‘application/pdf’
Attribute md5sum:
 digest of length 32, containing only hexadecimal digits

The protocol field is only used for rendering the download link, this done by insterting the protocol into the url generated to the download location. If the protocol field is blank then the file protocol will be used.

exception DoesNotExist
exception Dataset_File.MultipleObjectsReturned
Dataset_File.datafileparameterset_set
Dataset_File.dataset
Dataset_File.deleteCompletely()
Dataset_File.getParameterSets(schemaType=None)

Return datafile parametersets associated with this experiment.

Dataset_File.get_absolute_filepath()
Dataset_File.get_absolute_filepath_old()
Dataset_File.get_download_url()
Dataset_File.get_mimetype()
Dataset_File.get_relative_filepath()
Dataset_File.objects = <django.db.models.manager.Manager object at 0x218d3890>

Schema Objects

class tardis.tardis_portal.models.Schema(*args, **kwargs)

Schema(id, namespace, name, type, subtype, immutable)

DATAFILE = 3
DATASET = 2
exception DoesNotExist
Schema.EXPERIMENT = 1
exception Schema.MultipleObjectsReturned
Schema.NONE = 4
exception Schema.UnsupportedType(msg)
Schema.datafileparameterset_set
Schema.datasetparameterset_set
Schema.experimentparameterset_set
classmethod Schema.getNamespaces(type, subtype=None)

Return the list of namespaces for equipment, sample, and experiment schemas.

classmethod Schema.getSubTypes()
Schema.get_type_display(*moreargs, **morekwargs)
Schema.natural_key()
Schema.objects = <tardis.tardis_portal.managers.SchemaManager object at 0x218d3b10>
Schema.parametername_set

DatafileParameterSet Objects

class tardis.tardis_portal.models.DatafileParameterSet(*args, **kwargs)

DatafileParameterSet(id, schema_id, dataset_file_id)

exception DoesNotExist
exception DatafileParameterSet.MultipleObjectsReturned
DatafileParameterSet.datafileparameter_set
DatafileParameterSet.dataset_file
DatafileParameterSet.objects = <django.db.models.manager.Manager object at 0x218d43d0>
DatafileParameterSet.schema

DatasetParameterSet Objects

class tardis.tardis_portal.models.DatasetParameterSet(*args, **kwargs)

DatasetParameterSet(id, schema_id, dataset_id)

exception DoesNotExist
exception DatasetParameterSet.MultipleObjectsReturned
DatasetParameterSet.dataset
DatasetParameterSet.datasetparameter_set
DatasetParameterSet.objects = <django.db.models.manager.Manager object at 0x218d4990>
DatasetParameterSet.schema

ExperimentParameterSet Objects

class tardis.tardis_portal.models.ExperimentParameterSet(*args, **kwargs)

ExperimentParameterSet(id, schema_id, experiment_id)

exception DoesNotExist
exception ExperimentParameterSet.MultipleObjectsReturned
ExperimentParameterSet.experiment
ExperimentParameterSet.experimentparameter_set
ExperimentParameterSet.objects = <django.db.models.manager.Manager object at 0x218d4f50>
ExperimentParameterSet.schema

ParameterName Objects

class tardis.tardis_portal.models.ParameterName(*args, **kwargs)

ParameterName(id, schema_id, name, full_name, units, data_type, immutable, comparison_type, is_searchable, choices, order)

CONTAINS_COMPARISON = 8
DATETIME = 6
exception DoesNotExist
ParameterName.EXACT_VALUE_COMPARISON = 1
ParameterName.FILENAME = 5
ParameterName.GREATER_THAN_COMPARISON = 4
ParameterName.GREATER_THAN_EQUAL_COMPARISON = 5
ParameterName.LESS_THAN_COMPARISON = 6
ParameterName.LESS_THAN_EQUAL_COMPARISON = 7
ParameterName.LONGSTRING = 7
exception ParameterName.MultipleObjectsReturned
ParameterName.NOT_EQUAL_COMPARISON = 2
ParameterName.NUMERIC = 1
ParameterName.RANGE_COMPARISON = 3
ParameterName.STRING = 2
ParameterName.URL = 3
ParameterName.datafileparameter_set
ParameterName.datasetparameter_set
ParameterName.experimentparameter_set
ParameterName.freetextsearchfield_set
ParameterName.get_comparison_type_display(*moreargs, **morekwargs)
ParameterName.get_data_type_display(*moreargs, **morekwargs)
ParameterName.isDateTime()
ParameterName.isFilename()
ParameterName.isLongString()
ParameterName.isNumeric()
ParameterName.isString()
ParameterName.isURL()
ParameterName.natural_key()
ParameterName.objects = <tardis.tardis_portal.managers.ParameterNameManager object at 0x218d6410>
ParameterName.schema

DatafileParameter Objects

class tardis.tardis_portal.models.DatafileParameter(*args, **kwargs)

DatafileParameter(id, parameterset_id, name_id, string_value, numerical_value, datetime_value)

exception DoesNotExist
exception DatafileParameter.MultipleObjectsReturned
DatafileParameter.get()
DatafileParameter.getExpId()
DatafileParameter.name
DatafileParameter.objects = <tardis.tardis_portal.managers.OracleSafeManager object at 0x218d6990>
DatafileParameter.parameterset

DatasetParameter Objects

class tardis.tardis_portal.models.DatasetParameter(*args, **kwargs)

DatasetParameter(id, parameterset_id, name_id, string_value, numerical_value, datetime_value)

exception DoesNotExist
exception DatasetParameter.MultipleObjectsReturned
DatasetParameter.get()
DatasetParameter.getExpId()
DatasetParameter.name
DatasetParameter.objects = <tardis.tardis_portal.managers.OracleSafeManager object at 0x218d8110>
DatasetParameter.parameterset

ExperimentParameter Objects

class tardis.tardis_portal.models.ExperimentParameter(*args, **kwargs)

ExperimentParameter(id, parameterset_id, name_id, string_value, numerical_value, datetime_value)

exception DoesNotExist
exception ExperimentParameter.MultipleObjectsReturned
ExperimentParameter.get()
ExperimentParameter.getExpId()
ExperimentParameter.name
ExperimentParameter.objects = <tardis.tardis_portal.managers.OracleSafeManager object at 0x218d8750>
ExperimentParameter.parameterset