SymbolicMusicFile

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

Attributes Summary

encoded_with Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
features Accessor to the related objects manager on the reverse side of a many-to-one relation.
file The descriptor for the file attribute on the model instance.
histograms Return all histograms (multi-dimensional features)
id A wrapper for a deferred-loading field.
in_corpora Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
instruments_used Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
manifests Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
manifests_id A wrapper for a deferred-loading field.
objects
one_dimensional_features Return all the one dimensional features of this file
validated_by Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

Methods Summary

get_next_by_date_created(*[, field, is_next])
get_next_by_date_updated(*[, field, is_next])
get_previous_by_date_created(*[, field, is_next])
get_previous_by_date_updated(*[, field, is_next])

Attributes Documentation

encoded_with

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

features

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

file

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world', 'r') as f:
...     instance.file = File(f)
histograms

Return all histograms (multi-dimensional features)

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

in_corpora

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

instruments_used

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

manifests

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

manifests_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
one_dimensional_features

Return all the one dimensional features of this file

validated_by

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

Methods Documentation

get_next_by_date_created(*, field=<django.db.models.fields.DateTimeField: date_created>, is_next=True, **kwargs)
get_next_by_date_updated(*, field=<django.db.models.fields.DateTimeField: date_updated>, is_next=True, **kwargs)
get_previous_by_date_created(*, field=<django.db.models.fields.DateTimeField: date_created>, is_next=False, **kwargs)
get_previous_by_date_updated(*, field=<django.db.models.fields.DateTimeField: date_updated>, is_next=False, **kwargs)