Models

Archive(*args, **kwargs) A location where Collections of Sources are stored.
AudioFile(*args, **kwargs) A manifestation of a Source as an digital audio file.
CollectionOfSources(*args, **kwargs) A reference to one or more Sources grouped together.
Contribution(*args, **kwargs) Relate a person that made a Contribution to a Musical Work/Section/Part.
CustomBaseModel(*args, **kwargs) Base model that containing fields and functionality used in all models.
Encoder(*args, **kwargs) A User or Software that encoded a file using a specific workflow.
EncoderValidatorBaseModel(*args, **kwargs) A abstract base model for Encoder and Validator.
ExperimentalStudy(*args, **kwargs) An empirical study based on a particular Research Corpus.
ExtractedFeature(*args, **kwargs) Content-based data extracted from a SymbolicMusicFile.
FeatureType(*args, **kwargs) A category of Feature of which ExtractedFeatures are instances.
File(*args, **kwargs) Base abstract model with fields common to all file types.
GenreAsInStyle(*args, **kwargs) Represents a musical genre as in style (Classical, Blues, Pop)
GenreAsInType(*args, **kwargs) Represents a musical genre as in type of work (Motet, Symphony, Mass)
GeographicArea(*args, **kwargs) A geographic area that can be part of another area
ImageFile(*args, **kwargs) A manifestation of a SourceInstantiation as an digital image file.
Institution(*args, **kwargs) A real world institution (usually academic).
Instrument(*args, **kwargs) An instrument or voice
MusicalWork(*args, **kwargs) A complete work of music
Part(*args, **kwargs) A single voice or instrument in a Section of a Musical Work.
Person(*args, **kwargs) A real world person that contributed to a MusicalWork/Section/Part
ResearchCorpus(*args, **kwargs) A collection of files that can be used in specific empirical studies.
Section(*args, **kwargs) A component of a Musical Work e.g.
Software(*args, **kwargs) A Software that encoded, validated or extracted features from a file.
Source(*args, **kwargs) A document containing the music defining a MusicalWork or a set of Sections or a set of Parts.
SourceInstantiation(*args, **kwargs) An abstract entity defined by the music specified by a particular Source, which corresponds to a particular instantiation of all or part of a Musical Work, Sections or Parts.
SymbolicMusicFile(*args, **kwargs) A manifestation of a SourceInstantiation as an digital symbolic music file.
TextFile(*args, **kwargs) A manifestation of a SourceInstantiation as an digital text file.
Validator(*args, **kwargs) A User or Software that validated a file using a specific workflow.

Abstract Classes

class database.models.custom_base_model.CustomBaseModel(*args, **kwargs)

Bases: django.db.models.base.Model

Base model that containing fields and functionality used in all models.

date_created

models.DateTimeField – The date this entry was created

date_updated

models.DateTimeField – The date this entry was updated

clean()

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.

clean_fields(exclude=None)

Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.

full_clean(exclude=None, validate_unique=True)

Call clean_fields(), clean(), and validate_unique() on the model. Raise a ValidationError for any errors that occur.

get_absolute_url() → str

Get the absolute URL for an instance of a model.

get_deferred_fields()

Return a set containing names of deferred fields for this instance.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

refresh_from_db(using=None, fields=None)

Reload field values from the database.

By default, the reloading happens from the database this instance was loaded from, or by the read router if this instance wasn’t loaded from any database. The using parameter will override the default.

Fields can be used to specify which fields to reload. The fields should be an iterable of field attnames. If fields is None, then all non-deferred fields are reloaded.

When accessing deferred fields of an instance, the deferred loading of the field will call this method.

save(*args, **kwargs) → None

Ensure that the full_clean() method is called before saving.

save_base(raw=False, force_insert=False, force_update=False, using=None, update_fields=None)

Handle the parts of saving which should be done only once per save, yet need to be done in raw saves, too. This includes some sanity checks and signal sending.

The ‘raw’ argument is telling save_base not to save any parent models and not to do any changes to the values before save. This is used by fixture loading.

serializable_value(field_name)

Return the value of the field name for this instance. If the field is a foreign key, return the id value instead of the object. If there’s no Field object with this name on the model, return the model attribute’s value.

Used to serialize a field’s value (in the serializer, or form output, for example). Normally, you would just access the attribute directly and not use this method.

validate_unique(exclude=None)

Check unique constraints on the model and raise ValidationError if any failed.

display_name

Alias for the __str()__ method, useful for templates.


class database.models.encoder_validator_base_model.EncoderValidatorBaseModel(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A abstract base model for Encoder and Validator.

work_flow_text

models.TextField – A description of the workflow that was used to encode a File

work_flow_file

models.FileField – A file that describes or defines the workflow that was used to encode or validate a File in the database

notes

models.TextField – Any extra notes or remarks

user

models.ForeignKey – The User that encoded a File

software

models.ForeignKey – The User that encoded a File

clean() → None

Enforce the integrity of the relationship to Software or User

Ensure that one and only one of Software or User is not null

clean_fields(exclude=None)

Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.

full_clean(exclude=None, validate_unique=True)

Call clean_fields(), clean(), and validate_unique() on the model. Raise a ValidationError for any errors that occur.

get_absolute_url() → str

Get the absolute URL for an instance of a model.

get_deferred_fields()

Return a set containing names of deferred fields for this instance.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

refresh_from_db(using=None, fields=None)

Reload field values from the database.

By default, the reloading happens from the database this instance was loaded from, or by the read router if this instance wasn’t loaded from any database. The using parameter will override the default.

Fields can be used to specify which fields to reload. The fields should be an iterable of field attnames. If fields is None, then all non-deferred fields are reloaded.

When accessing deferred fields of an instance, the deferred loading of the field will call this method.

save(*args, **kwargs) → None

Ensure that the full_clean() method is called before saving.

save_base(raw=False, force_insert=False, force_update=False, using=None, update_fields=None)

Handle the parts of saving which should be done only once per save, yet need to be done in raw saves, too. This includes some sanity checks and signal sending.

The ‘raw’ argument is telling save_base not to save any parent models and not to do any changes to the values before save. This is used by fixture loading.

serializable_value(field_name)

Return the value of the field name for this instance. If the field is a foreign key, return the id value instead of the object. If there’s no Field object with this name on the model, return the model attribute’s value.

Used to serialize a field’s value (in the serializer, or form output, for example). Normally, you would just access the attribute directly and not use this method.

validate_unique(exclude=None)

Check unique constraints on the model and raise ValidationError if any failed.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.file.File(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

Base abstract model with fields common to all file types.

Most if not all fields should be extracted automatically

file_type

models.CharField – The format of this File

file_size

models.PositiveIntegerField – The size of the this File in bytes

version

models.CharField – The version of the encoding schema of this File

encoding_date

models.DateTimeField – The date this File was encoded

encoded_with

models.ForeignKey – A reference to the Encoder of this File

validated_by

models.ForeignKey – A reference to the Validator of this File

extra_metadata

django.contrib.postgres.fields.JSONField – Any extra metadata associated with this File

manifests

None – Subclasses must override

file

models.FileField – The path to the actual file stored on disk

clean()

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.

clean_fields(exclude=None)

Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.

full_clean(exclude=None, validate_unique=True)

Call clean_fields(), clean(), and validate_unique() on the model. Raise a ValidationError for any errors that occur.

get_absolute_url() → str

Get the absolute URL for an instance of a model.

get_deferred_fields()

Return a set containing names of deferred fields for this instance.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

refresh_from_db(using=None, fields=None)

Reload field values from the database.

By default, the reloading happens from the database this instance was loaded from, or by the read router if this instance wasn’t loaded from any database. The using parameter will override the default.

Fields can be used to specify which fields to reload. The fields should be an iterable of field attnames. If fields is None, then all non-deferred fields are reloaded.

When accessing deferred fields of an instance, the deferred loading of the field will call this method.

save(*args, **kwargs) → None

Ensure that the full_clean() method is called before saving.

save_base(raw=False, force_insert=False, force_update=False, using=None, update_fields=None)

Handle the parts of saving which should be done only once per save, yet need to be done in raw saves, too. This includes some sanity checks and signal sending.

The ‘raw’ argument is telling save_base not to save any parent models and not to do any changes to the values before save. This is used by fixture loading.

serializable_value(field_name)

Return the value of the field name for this instance. If the field is a foreign key, return the id value instead of the object. If there’s no Field object with this name on the model, return the model attribute’s value.

Used to serialize a field’s value (in the serializer, or form output, for example). Normally, you would just access the attribute directly and not use this method.

validate_unique(exclude=None)

Check unique constraints on the model and raise ValidationError if any failed.

certainty

Return the certainty of the MusicalWork related to this File

Returns:The certainty of attribution of the MusicalWork related to this File
Return type:bool
composers

Return the composers of the MusicalWork related to this File

Returns:A list of strings representing the names of the composers
Return type:list
composers_dates

Return the dates of the MusicalWork related to this File

Returns:A list of date tuples representing the date ranges of composition
Return type:list
composers_locations

Return the places of the MusicalWork related to this File

Returns:A QuerySet of GeographicAreas where the Musical Work related to this File was composed
Return type:QuerySet
display_name

Alias for the __str()__ method, useful for templates.

genres_as_in_style

Return the Genres (style) of the MusicalWork related to this File

Returns:The Genres (style) of the MusicalWork related to this File
Return type:QuerySet
genres_as_in_type

Return the Genres (type) of the MusicalWork related to this File

Returns:The Genres (type) of the MusicalWork related to this File
Return type:QuerySet
instrumentation

Return the Instruments of the MusicalWork related to this File

Returns:A QuerySet of all the Instruments of the MusicalWork related to this File
Return type:QuerySet
musical_work

Return the MusicalWork the Source of this File is related to

Returns:The MusicalWork the Source of this File is related to
Return type:MusicalWork
parts

Return the Parts manifested in full by the Source of this File

Returns:A QuerySet of all the Parts the Source of this File is related to
Return type:QuerySet
sacred_or_secular

Return the _sacred_or_secular of the MusicalWork related to this file

Returns:The _sacred_or_secular of the MusicalWork related to this file
Return type:str
sections

Return the Sections manifested in full by the Source of this File

Returns:A QuerySet of all the Sections the Source of this File is related to
Return type:QuerySet
source

Return the Source of this File

Returns:The Source of this File
Return type:Source

Concrete Classes

class database.models.Archive(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A location where Collections of Sources are stored.

e.g: A database or a library.

Can belong to an Institution.

name

models.CharField – The name of the archive.

collections

models.ManyToManyField – References to CollectionsOfSources contained by this Archive.

institution

models.ForeignKey – Reference to the Institution this Archive is part of.

See also

database.models.CustomBaseModel, database.models.CollectionsOfSources, database.models.Institution

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.AudioFile(*args, **kwargs)

Bases: database.models.file.File

A manifestation of a Source as an digital audio file.

Manifests one and only one Source.

Generated by an Encoder and validated against a SourceInstantiation by a Validator.

file_type

models.CharField – The format of this AudioFile

file_size

models.PositiveIntegerField – The size of the this AudioFile in bytes

version

models.CharField – The version of the encoding schema of this AudioFile

encoding_date

models.DateTimeField – The date this AudioFile was encoded

encoded_with

models.ForeignKey – A reference to the Encoder of this AudioFile

validated_by

models.ForeignKey – A reference to the Validator of this AudioFile

extra_metadata

django.contrib.postgres.fields.JSONField – Any extra metadata associated with this AudioFile

length

models.PositiveIntegerField – The length of this AudioFile in seconds

recording_date

models.DateField – The date this AudioFile was recorded

manifests

ForeignKey – The SourceInstantiation manifested by this AudioFile

file

models.FileField – The path to the actual file stored on disk

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

certainty

Return the certainty of the MusicalWork related to this File

Returns:The certainty of attribution of the MusicalWork related to this File
Return type:bool
composers

Return the composers of the MusicalWork related to this File

Returns:A list of strings representing the names of the composers
Return type:list
composers_dates

Return the dates of the MusicalWork related to this File

Returns:A list of date tuples representing the date ranges of composition
Return type:list
composers_locations

Return the places of the MusicalWork related to this File

Returns:A QuerySet of GeographicAreas where the Musical Work related to this File was composed
Return type:QuerySet
display_name

Alias for the __str()__ method, useful for templates.

genres_as_in_style

Return the Genres (style) of the MusicalWork related to this File

Returns:The Genres (style) of the MusicalWork related to this File
Return type:QuerySet
genres_as_in_type

Return the Genres (type) of the MusicalWork related to this File

Returns:The Genres (type) of the MusicalWork related to this File
Return type:QuerySet
instrumentation

Return the Instruments of the MusicalWork related to this File

Returns:A QuerySet of all the Instruments of the MusicalWork related to this File
Return type:QuerySet
musical_work

Return the MusicalWork the Source of this File is related to

Returns:The MusicalWork the Source of this File is related to
Return type:MusicalWork
parts

Return the Parts manifested in full by the Source of this File

Returns:A QuerySet of all the Parts the Source of this File is related to
Return type:QuerySet
sacred_or_secular

Return the _sacred_or_secular of the MusicalWork related to this file

Returns:The _sacred_or_secular of the MusicalWork related to this file
Return type:str
sections

Return the Sections manifested in full by the Source of this File

Returns:A QuerySet of all the Sections the Source of this File is related to
Return type:QuerySet
source

Return the Source of this File

Returns:The Source of this File
Return type:Source
class database.models.CollectionOfSources(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A reference to one or more Sources grouped together.

Examples: a book of masses, an album of songs.

title

models.CharField – The title of this Collection of Sources.

editorial_notes

models.TextField – Any editorial notes the user deems necessary.

date

postgres.fields.DateRangeField – The date of this Collection of Sources.

person_publisher

models.ForeignKey – Reference to the Person that published this Collection of Sources.

institution_publisher

models.Institution – Reference to the Institution that published this Collection of Sources.

url

models.URLField – A URL that identifies this Collection of Sources.

in_archive

models.ManyToManyField – References to the Archives this Collection of Sources belongs to.

sources

models.ManyToOneRel – References to the Sources that are part of this Collection of Sources.

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.Contribution(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

Relate a person that made a Contribution to a Musical Work/Section/Part.

The Contribution Model provides a many-to-many relationship with attributes between one of Musical Work, Section or Part and Person.

Each Contribution relates a Person to exclusively one of MusicalWork, Section or Part.

A Musical Work/Section/Part can have many Contributions, since each of piece of music can have many contributors with different roles i.e. a person composed a piece, two others arranged it, another wrote the lyrics.

Contribution.person : models.ForeignKey
Reference to a Person that made this Contribution to a Musical Work, Section or Part
Contribution.certainty_of_attribution : models.BooleanField
Whether it is certain if this Person made this Contribution
ContributeTo.role : models.CharField
The role that this Person had in contributing. Can be one of: Composer, Arranger, Author of Text, Transcriber, Improviser, Performer
Contribution.date : postgres.fields.DateRangeField
The date in which this Contribution happened
Contribution.location : models.ForeignKey
Reference to the GeographicArea in which this Contribution happened
Contribution.contributed_to_part : models.ForeignKey
Reference to the Part to which this Contribution was made
Contribution.contributed_to_section : models.ForeignKey
Reference to the Section to which this Contribution was made
Contribution.contributed_to_work : models.ForeignKey
Reference to the MusicalWork to which this Contribution was made
get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.CustomBaseModel(*args, **kwargs)

Bases: django.db.models.base.Model

Base model that containing fields and functionality used in all models.

date_created

models.DateTimeField – The date this entry was created

date_updated

models.DateTimeField – The date this entry was updated

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.Encoder(*args, **kwargs)

Bases: database.models.encoder_validator_base_model.EncoderValidatorBaseModel

A User or Software that encoded a file using a specific workflow.

work_flow_text

models.TextField – A description of the workflow that was used to encode a File

work_flow_file

models.FileField – A file that describes or defines the workflow that was used to encode or validate a File in the database

notes

models.TextField – Any extra notes or remarks

user

models.ForeignKey – The User that encoded a File

software

models.ForeignKey – The User that encoded a File

audiofile_set

models.ManyToOneRel – References to AudioFiles that were encoded by this Encoder

textfile_set

models.ManyToOneRel – References to TextFiles that were encoded by this Encoder

imagefile_set

models.ManyToOneRel – References to ImageFiles that were encoded by this Encoder

symbolicmusicfile_set

models.ManyToOneRel – References to SymbolicMusicFiles that were encoded by this Encoder

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.EncoderValidatorBaseModel(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A abstract base model for Encoder and Validator.

work_flow_text

models.TextField – A description of the workflow that was used to encode a File

work_flow_file

models.FileField – A file that describes or defines the workflow that was used to encode or validate a File in the database

notes

models.TextField – Any extra notes or remarks

user

models.ForeignKey – The User that encoded a File

software

models.ForeignKey – The User that encoded a File

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.ExperimentalStudy(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

An empirical study based on a particular Research Corpus.

title

models.CharField – The title of the Experimental Study

published

models.BooleanField – Whether or not the Experimental Study was published

date

models.DateField – The date in which the Experimental Study was published or performed

models.URLField – A link to the a paper of the Experimental Study

research_corpus_used

models.ForeignKey – A reference to the Research Corpus upon which the Experimental Study is based

institution

models.ForeignKey – A reference to the Institution related to this ExperimentalStudy

authors

models.CharField – The authors of this Experimental Study

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.ExtractedFeature(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

Content-based data extracted from a SymbolicMusicFile.

Extracted with a Software. Must be a feature of one and only one SymbolicMusicFile. Must be a instance of a FeatureType.

instance_of_feature

models.ForeignKey – A reference to a FeatureType of object that is the type of this ExtractedFeature

value

ArrayField(models.FloatField) – An array of the value(s) of this ExtractedFeature. One dimensional have values with an 1-Dimensional array

extracted_with

models.ForeignKey – A reference to the Software that was used to extract this ExtractedFeature

feature_of

models.ForeignKey – A reference to to the SymbolicMusicFile from which this ExtractedFeature was extracted.

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

code

Get the code of this ExtractedFeature

description

Get the description of this ExtractedFeature

display_name

Alias for the __str()__ method, useful for templates.

group

Get the group of this ExtractedFeature

is_histogram

Check if this ExtractedFeature is a histogram

A ExtractedFeatures are histograms if their dimensions are more than 1.

name

Get the name of this ExtractedFeature

class database.models.FeatureType(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A category of Feature of which ExtractedFeatures are instances.

name

models.CharField – The name of the FeatureType

code

models.CharField – The jSymbolic code of the FeatureType

description

models.TextField – A description of the FeatureType

is_sequential

models.NullBooleanField – Whether a feature can be extracted from sequential windows of a data instance (e.g. individual measures, sections, etc); a value of true means that it can, a value of false means that only one feature value may be extracted per instance (i.e. per symbolic feature file)

dimensions

models.PositiveIntegerField – The number of dimensions of the FeatureType

min_val

models.FloatField – The minimum value of this FeatureType across all files that have this feature

max_val

models.FloatField – The maximum value of this FeatureType across all files that have this feature

instances

models.ManyToOneRel – The ExtractedFeature objects that are instances of this FeatureType

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

max_and_min() → None

Update the max and min values of this FeatureType

display_name

Alias for the __str()__ method, useful for templates.

group

Get the human readable group from the code of this FeatureType

class database.models.File(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

Base abstract model with fields common to all file types.

Most if not all fields should be extracted automatically

file_type

models.CharField – The format of this File

file_size

models.PositiveIntegerField – The size of the this File in bytes

version

models.CharField – The version of the encoding schema of this File

encoding_date

models.DateTimeField – The date this File was encoded

encoded_with

models.ForeignKey – A reference to the Encoder of this File

validated_by

models.ForeignKey – A reference to the Validator of this File

extra_metadata

django.contrib.postgres.fields.JSONField – Any extra metadata associated with this File

manifests

None – Subclasses must override

file

models.FileField – The path to the actual file stored on disk

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

certainty

Return the certainty of the MusicalWork related to this File

Returns:The certainty of attribution of the MusicalWork related to this File
Return type:bool
composers

Return the composers of the MusicalWork related to this File

Returns:A list of strings representing the names of the composers
Return type:list
composers_dates

Return the dates of the MusicalWork related to this File

Returns:A list of date tuples representing the date ranges of composition
Return type:list
composers_locations

Return the places of the MusicalWork related to this File

Returns:A QuerySet of GeographicAreas where the Musical Work related to this File was composed
Return type:QuerySet
display_name

Alias for the __str()__ method, useful for templates.

genres_as_in_style

Return the Genres (style) of the MusicalWork related to this File

Returns:The Genres (style) of the MusicalWork related to this File
Return type:QuerySet
genres_as_in_type

Return the Genres (type) of the MusicalWork related to this File

Returns:The Genres (type) of the MusicalWork related to this File
Return type:QuerySet
instrumentation

Return the Instruments of the MusicalWork related to this File

Returns:A QuerySet of all the Instruments of the MusicalWork related to this File
Return type:QuerySet
musical_work

Return the MusicalWork the Source of this File is related to

Returns:The MusicalWork the Source of this File is related to
Return type:MusicalWork
parts

Return the Parts manifested in full by the Source of this File

Returns:A QuerySet of all the Parts the Source of this File is related to
Return type:QuerySet
sacred_or_secular

Return the _sacred_or_secular of the MusicalWork related to this file

Returns:The _sacred_or_secular of the MusicalWork related to this file
Return type:str
sections

Return the Sections manifested in full by the Source of this File

Returns:A QuerySet of all the Sections the Source of this File is related to
Return type:QuerySet
source

Return the Source of this File

Returns:The Source of this File
Return type:Source
class database.models.GenreAsInStyle(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

Represents a musical genre as in style (Classical, Blues, Pop)

name

models.CharField – The name of this style

musical_works

models.ManyToManyRel – References to the MusicalWorks of this style

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.GenreAsInType(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

Represents a musical genre as in type of work (Motet, Symphony, Mass)

name

models.CharField – The name of this type of work

musical_works

models.ManyToManyRel – References to the MusicalWorks of this type

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.GeographicArea(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A geographic area that can be part of another area

name

The name of this GeographicArea

part_of

models.ForeignKey – The parent area of this GeographicArea (e.g. Montreal has Quebec as parent area)

child_areas

model.ManyToOneRel – References to the child areas of this GeographicArea

birth_location_of

models.ManyToOneRel – References to Persons that were born in this GeographicArea

death_location_of

models.ManyToOneRel – References to Persons that died in this GeographicArea

contributions

models.ManyToOneRel – References to the Contributions made in this GeographicArea

institutions

models.ManyToOneRel – References to the Institutions located in this GeographicArea

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

musical_works

Get the MusicalWorks that have contributions made in this area.

parts

Get the Parts that have contributions made in this area.

sections

Get the Sections that have contributions made in this area.

class database.models.ImageFile(*args, **kwargs)

Bases: database.models.file.File

A manifestation of a SourceInstantiation as an digital image file.

Manifests one and only one SourceInstantiation.

Generated by an Encoder and validated against a SourceInstantiation by a Validator.

file_type

models.CharField – The format of this ImageFile

file_size

models.PositiveIntegerField – The size of the this ImageFile in bytes

version

models.CharField – The version of the encoding schema of this ImageFile

encoding_date

models.DateTimeField – The date this ImageFile was encoded

encoded_with

models.ForeignKey – A reference to the Encoder of this ImageFile

validated_by

models.ForeignKey – A reference to the Validator of this ImageFile

extra_metadata

django.contrib.postgres.fields.JSONField – Any extra metadata associated with this ImageFile

manifests

ForeignKey – The SourceInstantiation manifested by this ImageFile

files

models.FileField – The path to the actual files stored on disk

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

certainty

Return the certainty of the MusicalWork related to this File

Returns:The certainty of attribution of the MusicalWork related to this File
Return type:bool
composers

Return the composers of the MusicalWork related to this File

Returns:A list of strings representing the names of the composers
Return type:list
composers_dates

Return the dates of the MusicalWork related to this File

Returns:A list of date tuples representing the date ranges of composition
Return type:list
composers_locations

Return the places of the MusicalWork related to this File

Returns:A QuerySet of GeographicAreas where the Musical Work related to this File was composed
Return type:QuerySet
display_name

Alias for the __str()__ method, useful for templates.

genres_as_in_style

Return the Genres (style) of the MusicalWork related to this File

Returns:The Genres (style) of the MusicalWork related to this File
Return type:QuerySet
genres_as_in_type

Return the Genres (type) of the MusicalWork related to this File

Returns:The Genres (type) of the MusicalWork related to this File
Return type:QuerySet
instrumentation

Return the Instruments of the MusicalWork related to this File

Returns:A QuerySet of all the Instruments of the MusicalWork related to this File
Return type:QuerySet
musical_work

Return the MusicalWork the Source of this File is related to

Returns:The MusicalWork the Source of this File is related to
Return type:MusicalWork
pages

Gets the number of images, which is equal to the number of pages

parts

Return the Parts manifested in full by the Source of this File

Returns:A QuerySet of all the Parts the Source of this File is related to
Return type:QuerySet
sacred_or_secular

Return the _sacred_or_secular of the MusicalWork related to this file

Returns:The _sacred_or_secular of the MusicalWork related to this file
Return type:str
sections

Return the Sections manifested in full by the Source of this File

Returns:A QuerySet of all the Sections the Source of this File is related to
Return type:QuerySet
source

Return the Source of this File

Returns:The Source of this File
Return type:Source
class database.models.Institution(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A real world institution (usually academic).

name

models.CharField – The name of this Institution

located_at

models.ForeignKey – Reference to the GeographicArea where this Institution is located

website

models.URLField – A link to the website of this Institution

archives

models.ManyToOneRel – References to the Archives located at this Institution

published

models.ManyToOneRel – References to the CollectionsOfSources published by this Institution

studies

models.ManyToOneRel – References to the ExperimentalStudies related to this Institution

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.Instrument(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

An instrument or voice

A part is written for an instrument or voice, and a symbolic music file can specify which instrument or voices it contains

name

models.CharField – The name of this Instrument

parts

models.ManyToOneRel – References to Parts that use this Instrument

sym_files

models.ManyToManyRel – References to SymbolicMusicFiles that specify this Instrument

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

musical_works

Get all the MusicalWorks that use this Instrument.

sections

Get all the Sections that use this Instrument.

class database.models.MusicalWork(*args, **kwargs)

Bases: database.mixins.file_and_source_info_mixin.FileAndSourceInfoMixin, database.mixins.contribution_info_mixin.ContributionInfoMixin, database.models.custom_base_model.CustomBaseModel

A complete work of music

A purely abstract entity that can manifest in differing versions. Divided into Sections. Must have at least one Section. In the case that a MusicalWork is not formally divided into Sections, it has one trivial Section that represents the whole work.

variant_titles

ArrayField – All the titles commonly attributed to this MusicalWork.

related_works

models.ManyToManyField – MusicalWorks that are related to ths MusicalWork

genres_as_in_style

models.ManyToManyField – References to GenreAsInStyle objects that are the style(s) of this MusicalWork

genres_as_in_type

models.ManyToManyField – References to GenreAsInType objects that are the type(s) of this MusicalWork

_sacred_or_secular

models.NullBooleanField – Private property representing whether the MusicalWork is sacred, secular or none of those

authority_control_url

models.URLField – An URL linking to an authority control description of this MusicalWork

authority_control_key

models.IntegerField – The identifier of this MusicalWork in the authority control

contributions

models.ManyToOneRel – References to Contributions objects that describe the contributions (and thus the contributors) of this MusicalWork

sections

models.ManyToOneRel – References to the Sections that are part of this MusicalWork

sources

models.ManyToOneRel – References to Sources that instantiate this MusicalWork

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

arrangers

Get the Persons that are contributed as Arrangers.

Returns:arrangers – A QuerySet of Person objects
Return type:QuerySet
arrangers_dates

Get the dates of Contributions made by Arrangers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
arrangers_locations

Get the locations of Contributions made by Arrangers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
audio_files

Gets all the Symbolic Files related to this Work/Section/Part

audio_formats

Gets the formats of all the Image Files related to this Work/Section/Part

authors

Get the Persons that are contributed as Authors of Text.

Returns:authors – A QuerySet of Person objects
Return type:QuerySet
authors_dates

Get the dates of Contributions made by Authors of Text.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
authors_locations

Get the locations of Contributions made by Authors of Text.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
certainty_of_attributions

Get the certainty of all Contributions. True only if all are True.

collections_of_sources

Gets all the Collections of Sources related to this Work/Section/Part

composers

Get the Persons that are contributed as Composers.

Returns:composers – A QuerySet of Person objects
Return type:QuerySet
composers_dates

Get the dates of Contributions made by Composers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
composers_locations

Get the locations of Contributions made by Composers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
display_name

Alias for the __str()__ method, useful for templates.

encoders

Gets all the Encoders for files related to this Work/Section/Part

features

Gets all the Features extracted from files related to this Work/Section/Part

image_files

Gets all the Image Files related to this Work/Section/Part

image_formats

Gets the formats of all the Image Files related to this Work/Section/Part

improvisers

Get the Persons that are contributed as Improvisers.

Returns:improvisers – A QuerySet of Person objects
Return type:QuerySet
improvisers_dates

Get the dates of Contributions made by Improvisers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
improvisers_locations

Get the locations of Contributions made by Improvisers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
instrumentation

Get all the Instruments used in this Musical Work.

languages

Gets all the languages of the Sources and Text Files related to this Work/Section/Part

parts

Get all the Parts related to this Musical Work.

performers

Get the Persons that are contributed as Performers.

Returns:performers – A QuerySet of Person objects
Return type:QuerySet
performers_dates

Get the dates of Contributions made by Performers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
performers_locations

Get the locations of Contributions made by Performers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
sacred_or_secular

Get the sacred_or_secular value as a human friendly string.

symbolic_files

Gets all the Symbolic Files related to this Work/Section/Part

symbolic_music_formats

Gets the formats of all the Symbolic Files related to this Work/Section/Part

text_files

Gets all the Symbolic Files related to this Work/Section/Part

text_formats

Gets the formats of all the Image Files related to this Work/Section/Part

transcribers

Get the Persons that are contributed as Transcribers.

Returns:transcribers – A QuerySet of Person objects
Return type:QuerySet
transcribers_dates

Get the dates of Contributions made by Transcribers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
transcribers_locations

Get the locations of Contributions made by Transcribers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
validators

Gets all the Validators for files related to this Work/Section/Part

class database.models.Part(*args, **kwargs)

Bases: database.mixins.file_and_source_info_mixin.FileAndSourceInfoMixin, database.mixins.contribution_info_mixin.ContributionInfoMixin, database.models.custom_base_model.CustomBaseModel

A single voice or instrument in a Section of a Musical Work.

Purely abstract entity that can manifest in differing versions. Must belong to one and only one Section.

written_for

models.ForeignKey – Reference to the Instrument for which this Part was written

s.section

models.ForeignKey – Reference to the Section to which this Part belongs

sources

models.ManyToOneRel – References to Sources that instantiate this Part

contributions

models.ManyToOneRel – References to Contributions objects that describe the contributions (and thus the contributors) of this Part

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

musical_work()

Get the MusicalWork to which this Part belongs.

arrangers

Get the Persons that are contributed as Arrangers.

Returns:arrangers – A QuerySet of Person objects
Return type:QuerySet
arrangers_dates

Get the dates of Contributions made by Arrangers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
arrangers_locations

Get the locations of Contributions made by Arrangers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
audio_files

Gets all the Symbolic Files related to this Work/Section/Part

audio_formats

Gets the formats of all the Image Files related to this Work/Section/Part

authors

Get the Persons that are contributed as Authors of Text.

Returns:authors – A QuerySet of Person objects
Return type:QuerySet
authors_dates

Get the dates of Contributions made by Authors of Text.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
authors_locations

Get the locations of Contributions made by Authors of Text.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
certainty_of_attributions

Get the certainty of all Contributions. True only if all are True.

collections_of_sources

Gets all the Collections of Sources related to this Work/Section/Part

composers

Get the Persons that are contributed as Composers.

Returns:composers – A QuerySet of Person objects
Return type:QuerySet
composers_dates

Get the dates of Contributions made by Composers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
composers_locations

Get the locations of Contributions made by Composers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
display_name

Alias for the __str()__ method, useful for templates.

encoders

Gets all the Encoders for files related to this Work/Section/Part

features

Gets all the Features extracted from files related to this Work/Section/Part

image_files

Gets all the Image Files related to this Work/Section/Part

image_formats

Gets the formats of all the Image Files related to this Work/Section/Part

improvisers

Get the Persons that are contributed as Improvisers.

Returns:improvisers – A QuerySet of Person objects
Return type:QuerySet
improvisers_dates

Get the dates of Contributions made by Improvisers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
improvisers_locations

Get the locations of Contributions made by Improvisers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
languages

Gets all the languages of the Sources and Text Files related to this Work/Section/Part

performers

Get the Persons that are contributed as Performers.

Returns:performers – A QuerySet of Person objects
Return type:QuerySet
performers_dates

Get the dates of Contributions made by Performers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
performers_locations

Get the locations of Contributions made by Performers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
symbolic_files

Gets all the Symbolic Files related to this Work/Section/Part

symbolic_music_formats

Gets the formats of all the Symbolic Files related to this Work/Section/Part

text_files

Gets all the Symbolic Files related to this Work/Section/Part

text_formats

Gets the formats of all the Image Files related to this Work/Section/Part

transcribers

Get the Persons that are contributed as Transcribers.

Returns:transcribers – A QuerySet of Person objects
Return type:QuerySet
transcribers_dates

Get the dates of Contributions made by Transcribers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
transcribers_locations

Get the locations of Contributions made by Transcribers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
validators

Gets all the Validators for files related to this Work/Section/Part

class database.models.Person(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A real world person that contributed to a MusicalWork/Section/Part

given_name

models.CharField – The given name of this Person

surname

models.CharField – The surname of this Person

range_date_birth

django.contrib.postgres.fields.DateRangeField – The possible range of dates of the birth of this Person If the date is know, then the beginning and end of range will be equal

range_date_death

django.contrib.postgres.fields.DateRangeField – The possible range of dates of the death of this Person If the date is know, then the beginning and end of range will be equal

birth_location

models.ForeignKey – Reference to the GeographicArea where this Person was born

death_location

models.ForeignKey – Reference to the GeographicArea where this Person died

authority_control_url

models.URLField – An URL linking to an authority control description of this Person

authority_control_key

models.IntegerField – The identifier of this Person in the authority control

contributions

models.ManyToOneRel – References to the Contributions made by this Person

published

models.ManyToOneRel – References to the CollectionsOfSources published by this Person

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

date_of_birth

Get a print friendly version of range_date_birth

date_of_death

Get a print friendly version of range_date_death

display_name

Alias for the __str()__ method, useful for templates.

name

Get print friendly version of this Person’s name

parts_arranged

Get the Parts arranged by this Person

parts_authored

Get the Parts authored by this Person

parts_composed

Get the Parts composed by this Person

parts_improvised

Get the Parts improvised by this Person

parts_performed

Get the Parts performed by this Person

parts_transcribed

Get the Parts transcribed by this Person

sections_arranged

Get the Sections arranged by this Person

sections_authored

Get the Sections authored by this Person

sections_composed

Get the Sections arranged by this Person

sections_improvised

Get the Sections improvised by this Person

sections_performed

Get the Sections performed by this Person

sections_transcribed

Get the Sections transcribed by this Person

works_arranged

Get the MusicalWorks arranged by this Person

works_authored

Get the MusicalWorks authored by this Person

works_composed

Get the MusicalWorks composed by this Person

works_improvised

Get the MusicalWorks improvised by this Person

works_performed

Get the MusicalWorks performed by this Person

works_transcribed

Get the MusicalWorks transcribed by this Person

class database.models.ResearchCorpus(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A collection of files that can be used in specific empirical studies.

title

models.CharField – The title of this ResearchCorpus

features

models.ManyToManyField – References to ExtractedFeatures used by this ResearchCorpus

creators

models.CharField – The creators of this ResearchCorpus

curators

models.CharField – The curators of this ResearchCorpus

files

models.ManyToManyField – References to the SymbolicMusicFiles contained in this ResearchCorpus

studies

models.ManyToOneRel – References to the studies that use this ResearchCorpus

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.Section(*args, **kwargs)

Bases: database.mixins.file_and_source_info_mixin.FileAndSourceInfoMixin, database.mixins.contribution_info_mixin.ContributionInfoMixin, database.models.custom_base_model.CustomBaseModel

A component of a Musical Work e.g. an Aria in an Opera

Can alternatively be a Musical Work in its entirety, in which case the Musical Work has a single trivial Section that represents the whole work. A purely abstract entity that can be manifested in differing versions. Divided into one or more Parts. A Section can be divided into more Sections. Must have at least one part.

title

models.CharField – The title of this section

musical_work

models.ForeignKey – Reference to the MusicalWork of which this Section is part. A Section must reference a MusicalWork even if it has parent Sections.

ordering

models.PositiveIntegerField – A number representing the position of this section within a MusicalWork

parent_sections

models.ManyToManyField – Sections that contain this Section.

s.child_sections

models.ManyToManyField – Sections that are sub-Sections of this Section

s.related_sections

models.ManyToManyField – Sections that are related to this Section (i.e. derived from it, or the same music but used in a different MusicalWork)

s.parts

models.ManyToOne – The Parts that belong to this Section

sources

models.ManyToMany – The Sources that manifest this Section

contributions

models.ManyToOne – The Contributions of this Section

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

arrangers

Get the Persons that are contributed as Arrangers.

Returns:arrangers – A QuerySet of Person objects
Return type:QuerySet
arrangers_dates

Get the dates of Contributions made by Arrangers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
arrangers_locations

Get the locations of Contributions made by Arrangers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
audio_files

Gets all the Symbolic Files related to this Work/Section/Part

audio_formats

Gets the formats of all the Image Files related to this Work/Section/Part

authors

Get the Persons that are contributed as Authors of Text.

Returns:authors – A QuerySet of Person objects
Return type:QuerySet
authors_dates

Get the dates of Contributions made by Authors of Text.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
authors_locations

Get the locations of Contributions made by Authors of Text.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
certainty_of_attributions

Get the certainty of all Contributions. True only if all are True.

collections_of_sources

Gets all the Collections of Sources related to this Work/Section/Part

composers

Get the Persons that are contributed as Composers.

Returns:composers – A QuerySet of Person objects
Return type:QuerySet
composers_dates

Get the dates of Contributions made by Composers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
composers_locations

Get the locations of Contributions made by Composers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
display_name

Alias for the __str()__ method, useful for templates.

encoders

Gets all the Encoders for files related to this Work/Section/Part

features

Gets all the Features extracted from files related to this Work/Section/Part

image_files

Gets all the Image Files related to this Work/Section/Part

image_formats

Gets the formats of all the Image Files related to this Work/Section/Part

improvisers

Get the Persons that are contributed as Improvisers.

Returns:improvisers – A QuerySet of Person objects
Return type:QuerySet
improvisers_dates

Get the dates of Contributions made by Improvisers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
improvisers_locations

Get the locations of Contributions made by Improvisers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
instrumentation

Gets all the Instruments used in this Section

is_leaf

Check if Section has no children but has parents

is_node

Check if Section has both children and parents

is_root

Check if Section has no parents but has children

is_single

Check if Section has no children and no parents

languages

Gets all the languages of the Sources and Text Files related to this Work/Section/Part

performers

Get the Persons that are contributed as Performers.

Returns:performers – A QuerySet of Person objects
Return type:QuerySet
performers_dates

Get the dates of Contributions made by Performers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
performers_locations

Get the locations of Contributions made by Performers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
symbolic_files

Gets all the Symbolic Files related to this Work/Section/Part

symbolic_music_formats

Gets the formats of all the Symbolic Files related to this Work/Section/Part

text_files

Gets all the Symbolic Files related to this Work/Section/Part

text_formats

Gets the formats of all the Image Files related to this Work/Section/Part

transcribers

Get the Persons that are contributed as Transcribers.

Returns:transcribers – A QuerySet of Person objects
Return type:QuerySet
transcribers_dates

Get the dates of Contributions made by Transcribers.

Returns:dates – A list of date ranges represented as strings
Return type:List[str]
transcribers_locations

Get the locations of Contributions made by Transcribers.

Returns:locations – A QuerySet of GeographicLocation objects
Return type:QuerySet
validators

Gets all the Validators for files related to this Work/Section/Part

class database.models.Software(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A Software that encoded, validated or extracted features from a file.

name

models.CharField – The name of this Software

version

models.CharField – The version of this Software

configuration_file

models.FileField – A file that describes how the Software was configured when performing an encoding, validation or feature extraction task.

encoder_set

models.ManyToOneRel – References to the instances that this Software was used as an Encoder

validator_set

models.ManyToOneRel – References to the instances that this Software was used as a Validator

extractedfeature_set

models.ManyToOneRel – References to the ExtractedFeatures extracted with this Software

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.Source(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

A document containing the music defining a MusicalWork or a set of Sections or a set of Parts.

Must be part of a CollectionOfSources. If a CollectionOfSources contains only one Source, the Source is trivial but still must exist, i.e., an CollectionOfSources without at least one Source cannot exist.

A Source can be derived from a parent Source, implying a chain of provenance.

portion

models.CharField – A description of which portion of the CollectionOfSources this Source represents, for instance, page numbers or folio

collection

models.ForeignKey – Reference to the CollectionOfSources this Source belongs to

parent_source

models.ForeignKey – Reference to the Source this Source was derived from

child_sources

models.ManyToOneRel – References to Sources derived from this Source

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.SourceInstantiation(*args, **kwargs)

Bases: database.models.custom_base_model.CustomBaseModel

An abstract entity defined by the music specified by a particular Source, which corresponds to a particular instantiation of all or part of a Musical Work, Sections or Parts.

Manifested by Audio, Symbolic, Text or Image files.

source

models.ForeignKey – Reference to the Source instantiated by this SourceInstantiation

work

models.ForeignKey – Reference to a MusicalWork defined in full by this SourceInstantiation

sections

models.ManyToManyField – References to Sections defined in full by this SourceInstantiation

parts

models.ManyToManyField – References to Parts defined in full by this SourceInstantiation

manifested_by_audio_files

models.ManyToOneRel – References to AudioFiles that manifest this SourceInstantiation

manifested_by_text_files

models.ManyToOneRel – References to TextFiles that manifest this SourceInstantiation

manifested_by_image_files

models.ManyToOneRel – References to ImageFiles that manifest this SourceInstantiation

manifested_by_sym_files

models.ManyToOneRel – References to SymbolicMusicFiles that manifest this SourceInstantiation

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.

class database.models.SymbolicMusicFile(*args, **kwargs)

Bases: database.models.file.File

A manifestation of a SourceInstantiation as an digital symbolic music file.

Manifests one and only one SourceInstantiation.

Generated by an Encoder and validated against a SourceInstantiation by a Validator.

file_type

models.CharField – The format of this SymbolicMusicFile

file_size

models.PositiveIntegerField – The size of the this SymbolicMusicFile in bytes

version

models.CharField – The version of the encoding schema of this SymbolicMusicFile

encoding_date

models.DateTimeField – The date this SymbolicMusicFile was encoded

encoded_with

models.ForeignKey – A reference to the Encoder of this SymbolicMusicFile

validated_by

models.ForeignKey – A reference to the Validator of this SymbolicMusicFile

extra_metadata

django.contrib.postgres.fields.JSONField – Any extra metadata associated with this SymbolicMusicFile

manifests

ForeignKey – The SourceInstantiation manifested by this SymbolicMusicFile

file

models.FileField – The path to the actual file stored on disk

in_corpora

models.ManyToManyRel – References to the ResearchCorpora that contain this SymbolicMusicFile

features

models.ManyToOneRel – References to the ExtractedFeatures of this SymbolicMusicFile

instruments_used

models.ManyToManyRel – References to the Instruments declared in this SymbolicMusicFile

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

certainty

Return the certainty of the MusicalWork related to this File

Returns:The certainty of attribution of the MusicalWork related to this File
Return type:bool
composers

Return the composers of the MusicalWork related to this File

Returns:A list of strings representing the names of the composers
Return type:list
composers_dates

Return the dates of the MusicalWork related to this File

Returns:A list of date tuples representing the date ranges of composition
Return type:list
composers_locations

Return the places of the MusicalWork related to this File

Returns:A QuerySet of GeographicAreas where the Musical Work related to this File was composed
Return type:QuerySet
display_name

Alias for the __str()__ method, useful for templates.

genres_as_in_style

Return the Genres (style) of the MusicalWork related to this File

Returns:The Genres (style) of the MusicalWork related to this File
Return type:QuerySet
genres_as_in_type

Return the Genres (type) of the MusicalWork related to this File

Returns:The Genres (type) of the MusicalWork related to this File
Return type:QuerySet
histograms

Return all histograms (multi-dimensional features)

instrumentation

Return the Instruments of the MusicalWork related to this File

Returns:A QuerySet of all the Instruments of the MusicalWork related to this File
Return type:QuerySet
musical_work

Return the MusicalWork the Source of this File is related to

Returns:The MusicalWork the Source of this File is related to
Return type:MusicalWork
one_dimensional_features

Return all the one dimensional features of this file

parts

Return the Parts manifested in full by the Source of this File

Returns:A QuerySet of all the Parts the Source of this File is related to
Return type:QuerySet
sacred_or_secular

Return the _sacred_or_secular of the MusicalWork related to this file

Returns:The _sacred_or_secular of the MusicalWork related to this file
Return type:str
sections

Return the Sections manifested in full by the Source of this File

Returns:A QuerySet of all the Sections the Source of this File is related to
Return type:QuerySet
source

Return the Source of this File

Returns:The Source of this File
Return type:Source
class database.models.TextFile(*args, **kwargs)

Bases: database.models.file.File

A manifestation of a SourceInstantiation as an digital text file.

Manifests one and only one SourceInstantiation.

Generated by an Encoder and validated against a SourceInstantiation by a Validator.

file_type

models.CharField – The format of this TextFile

file_size

models.PositiveIntegerField – The size of the this TextFile in bytes

version

models.CharField – The version of the encoding schema of this TextFile

encoding_date

models.DateTimeField – The date this TextFile was encoded

encoded_with

models.ForeignKey – A reference to the Encoder of this TextFile

validated_by

models.ForeignKey – A reference to the Validator of this TextFile

extra_metadata

django.contrib.postgres.fields.JSONField – Any extra metadata associated with this TextFile

manifests

models.ForeignKey – The SourceInstantiation manifested by this TextFile

file

models.FileField – The path to the actual file stored on disk

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

certainty

Return the certainty of the MusicalWork related to this File

Returns:The certainty of attribution of the MusicalWork related to this File
Return type:bool
composers

Return the composers of the MusicalWork related to this File

Returns:A list of strings representing the names of the composers
Return type:list
composers_dates

Return the dates of the MusicalWork related to this File

Returns:A list of date tuples representing the date ranges of composition
Return type:list
composers_locations

Return the places of the MusicalWork related to this File

Returns:A QuerySet of GeographicAreas where the Musical Work related to this File was composed
Return type:QuerySet
display_name

Alias for the __str()__ method, useful for templates.

genres_as_in_style

Return the Genres (style) of the MusicalWork related to this File

Returns:The Genres (style) of the MusicalWork related to this File
Return type:QuerySet
genres_as_in_type

Return the Genres (type) of the MusicalWork related to this File

Returns:The Genres (type) of the MusicalWork related to this File
Return type:QuerySet
instrumentation

Return the Instruments of the MusicalWork related to this File

Returns:A QuerySet of all the Instruments of the MusicalWork related to this File
Return type:QuerySet
musical_work

Return the MusicalWork the Source of this File is related to

Returns:The MusicalWork the Source of this File is related to
Return type:MusicalWork
parts

Return the Parts manifested in full by the Source of this File

Returns:A QuerySet of all the Parts the Source of this File is related to
Return type:QuerySet
sacred_or_secular

Return the _sacred_or_secular of the MusicalWork related to this file

Returns:The _sacred_or_secular of the MusicalWork related to this file
Return type:str
sections

Return the Sections manifested in full by the Source of this File

Returns:A QuerySet of all the Sections the Source of this File is related to
Return type:QuerySet
source

Return the Source of this File

Returns:The Source of this File
Return type:Source
class database.models.Validator(*args, **kwargs)

Bases: database.models.encoder_validator_base_model.EncoderValidatorBaseModel

A User or Software that validated a file using a specific workflow.

work_flow_text

models.TextField – A description of the workflow that was used to validate a File

work_flow_file

models.FileField – A file that describes or defines the workflow that was used to validate or validate a File in the database

notes

models.TextField – Any extra notes or remarks

user

models.ForeignKey – The User that validated a File

software

models.ForeignKey – The User that validated a File

audiofile_set

models.ManyToOneRel – References to AudioFiles that were validated by this Validator

textfile_set

models.ManyToOneRel – References to TextFiles that were validated by this Validator

imagefile_set

models.ManyToOneRel – References to ImageFiles that were validated by this Validator

symbolicmusicfile_set

models.ManyToOneRel – References to SymbolicMusicFiles that were validated by this Validator

get_absolute_url() → str

Get the absolute URL for an instance of a model.

classmethod get_fields_and_properties() → List[str]

List the public fields and properties of a model.

Returns:fields_and_properties – A list of strings representing the public fields and properties of this model.
Return type:List[str]
classmethod get_verbose_name_plural() → str

Get a human friendly plural name of a model.

display_name

Alias for the __str()__ method, useful for templates.