Package musicbrainz2 :: Module wsxml :: Class Metadata

[frames] | no frames]

# Class Metadata

source code

    object --+
             |
            Metadata

Represents a parsed Music Metadata XML document.

The Music Metadata XML format is very flexible and may contain a diverse set of data (e.g. an artist, a release and a list of tracks), but usually only a small subset is used (either an artist, a release or a track, or a lists of objects from one class).

See Also: MbXmlParser for reading, and MbXmlWriter for writing Metadata objects

Instance Methods

__init__(self) x.__init__(...) initializes x; see help(type(x)) for signature | source code

getArtist(self) | source code

setArtist(self, artist) | source code

getLabel(self) | source code

setLabel(self, label) | source code

getRelease(self) | source code

setRelease(self, release) | source code

getReleaseGroup(self) | source code

setReleaseGroup(self, releaseGroup) | source code

getTrack(self) | source code

setTrack(self, track) | source code

getArtistResults(self) Returns an artist result list. | source code

getArtistResultsOffset(self) Returns the offset of the artist result list. | source code

setArtistResultsOffset(self, value) Sets the offset of the artist result list. | source code

getArtistResultsCount(self) Returns the total number of results available. | source code

setArtistResultsCount(self, value) Sets the total number of available results. | source code

getLabelResults(self) Returns a label result list. | source code

getLabelResultsOffset(self) Returns the offset of the label result list. | source code

setLabelResultsOffset(self, value) Sets the offset of the label result list. | source code

getLabelResultsCount(self) Returns the total number of results available. | source code

setLabelResultsCount(self, value) Sets the total number of available results. | source code

getReleaseResults(self) Returns a release result list. | source code

getReleaseResultsOffset(self) Returns the offset of the release result list. | source code

setReleaseResultsOffset(self, value) Sets the offset of the release result list. | source code

getReleaseResultsCount(self) Returns the total number of results available. | source code

setReleaseResultsCount(self, value) Sets the total number of available results. | source code

getReleaseGroupResults(self) Returns a release group result list. | source code

getReleaseGroupResultsOffset(self) Returns the offset of the release group result list. | source code

setReleaseGroupResultsOffset(self, value) Sets the offset of the release group result list. | source code

getReleaseGroupResultsCount(self) Returns the total number of results available. | source code

setReleaseGroupResultsCount(self, value) Sets the total number of available results. | source code

getTrackResults(self) Returns a track result list. | source code

getTrackResultsOffset(self) Returns the offset of the track result list. | source code

setTrackResultsOffset(self, value) Sets the offset of the track result list. | source code

getTrackResultsCount(self) Returns the total number of results available. | source code

setTrackResultsCount(self, value) Sets the total number of available results. | source code

getTagList(self) Returns a list of tags. | source code

getRating(self) Returns the rating. | source code

setRating(self, value) Sets the rating. | source code

getUserList(self) Returns a list of users. | source code

Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
| artist An Artist object.
| label A Label object.
| release A Release object.
| releaseGroup
| track A Track object.
| artistResults A list of ArtistResult objects.
| artistResultsOffset The offset of the artist results.
| artistResultsCount The total number of artists results.
| labelResults A list of LabelResult objects
| labelResultsOffset The offset of the label results.
| labelResultsCount The total number of label results.
| releaseResults A list of ReleaseResult objects.
| releaseResultsOffset The offset of the release results.
| releaseResultsCount The total number of release results.
| releaseGroupResults A list of ReleaseGroupResult objects.
| releaseGroupResultsOffset The offset of the release group results.
| releaseGroupResultsCount The total number of release group results.
| trackResults A list of TrackResult objects.
| trackResultsOffset The offset of the track results.
| trackResultsCount The total number of track results.
| tagResults A list of Tag objects.
| rating A Rating object.
| userResults A list of User objects.
Inherited from `object`: `__class__`

Method Details

### __init__(self)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
  (inherited documentation)

### getArtistResults(self)

source code

Returns an artist result list.

Returns:
  a list of ArtistResult objects.

### getArtistResultsOffset(self)

source code

Returns the offset of the artist result list.

The offset is used for paging through the result list. It is zero-based.

Returns:
  an integer containing the offset, or None

See Also: getArtistResults, getArtistResultsCount

### setArtistResultsOffset(self, value)

source code

Sets the offset of the artist result list.

Parameters:
  - `value` - an integer containing the offset, or None

See Also: getArtistResultsOffset

### getArtistResultsCount(self)

source code

Returns the total number of results available.

This may or may not match with the number of elements that getArtistResults returns. If the count is higher than the list, it indicates that the list is incomplete.

Returns:
  an integer containing the count, or None

See Also: setArtistResultsCount, getArtistResultsOffset

### setArtistResultsCount(self, value)

source code

Sets the total number of available results.

Parameters:
  - `value` - an integer containing the count, or None

See Also: getArtistResults, setArtistResultsOffset

### getLabelResults(self)

source code

Returns a label result list.

Returns:
  a list of LabelResult objects.

### getLabelResultsOffset(self)

source code

Returns the offset of the label result list.

The offset is used for paging through the result list. It is zero-based.

Returns:
  an integer containing the offset, or None

See Also: getLabelResults, getLabelResultsCount

### setLabelResultsOffset(self, value)

source code

Sets the offset of the label result list.

Parameters:
  - `value` - an integer containing the offset, or None

See Also: getLabelResultsOffset

### getLabelResultsCount(self)

source code

Returns the total number of results available.

This may or may not match with the number of elements that getLabelResults returns. If the count is higher than the list, it indicates that the list is incomplete.

Returns:
  an integer containing the count, or None

See Also: setLabelResultsCount, getLabelResultsOffset

### setLabelResultsCount(self, value)

source code

Sets the total number of available results.

Parameters:
  - `value` - an integer containing the count, or None

See Also: getLabelResults, setLabelResultsOffset

### getReleaseResults(self)

source code

Returns a release result list.

Returns:
  a list of ReleaseResult objects.

### getReleaseResultsOffset(self)

source code

Returns the offset of the release result list.

The offset is used for paging through the result list. It is zero-based.

Returns:
  an integer containing the offset, or None

See Also: getReleaseResults, getReleaseResultsCount

### setReleaseResultsOffset(self, value)

source code

Sets the offset of the release result list.

Parameters:
  - `value` - an integer containing the offset, or None

See Also: getReleaseResultsOffset

### getReleaseResultsCount(self)

source code

Returns the total number of results available.

This may or may not match with the number of elements that getReleaseResults returns. If the count is higher than the list, it indicates that the list is incomplete.

Returns:
  an integer containing the count, or None

See Also: setReleaseResultsCount, getReleaseResultsOffset

### setReleaseResultsCount(self, value)

source code

Sets the total number of available results.

Parameters:
  - `value` - an integer containing the count, or None

See Also: getReleaseResults, setReleaseResultsOffset

### getReleaseGroupResults(self)

source code

Returns a release group result list.

Returns:
  a list of ReleaseGroupResult objects.

### getReleaseGroupResultsOffset(self)

source code

Returns the offset of the release group result list.

The offset is used for paging through the result list. It is zero-based.

Returns:
  an integer containing the offset, or None.

See Also: getReleaseGroupResults, getReleaseGroupResultsCount

### setReleaseGroupResultsOffset(self, value)

source code

Sets the offset of the release group result list.

Parameters:
  - `value` - an integer containing the offset, or None

See Also: getReleaseGroupResultsOffset

### getReleaseGroupResultsCount(self)

source code

Returns the total number of results available.

This may or may not match with the number of elements that getReleaseGroupResults returns. If the count is higher than the list, it indicates that the list is incomplete.

Returns:
  an integer containing the count, or None

See Also: setReleaseGroupResultsCount, getReleaseGroupResultsOffset

### setReleaseGroupResultsCount(self, value)

source code

Sets the total number of available results.

Parameters:
  - `value` - an integer containing the count, or None

See Also: getReleaseGroupResults, setReleaseGroupResultsOffset

### getTrackResults(self)

source code

Returns a track result list.

Returns:
  a list of TrackResult objects.

### getTrackResultsOffset(self)

source code

Returns the offset of the track result list.

The offset is used for paging through the result list. It is zero-based.

Returns:
  an integer containing the offset, or None

See Also: getTrackResults, getTrackResultsCount

### setTrackResultsOffset(self, value)

source code

Sets the offset of the track result list.

Parameters:
  - `value` - an integer containing the offset, or None

See Also: getTrackResultsOffset

### getTrackResultsCount(self)

source code

Returns the total number of results available.

This may or may not match with the number of elements that getTrackResults returns. If the count is higher than the list, it indicates that the list is incomplete.

Returns:
  an integer containing the count, or None

See Also: setTrackResultsCount, getTrackResultsOffset

### setTrackResultsCount(self, value)

source code

Sets the total number of available results.

Parameters:
  - `value` - an integer containing the count, or None

See Also: getTrackResults, setTrackResultsOffset

### getTagList(self)

source code

Returns a list of tags.

Returns:
  a list of model.Tag objects

### getRating(self)

source code

Returns the rating.

Returns:
  rating object

### setRating(self, value)

source code

Sets the rating.

Parameters:
  - `value` - a model.Rating object

### getUserList(self)

source code

Returns a list of users.

Returns:
  a list of model.User objects

Note: This is a MusicBrainz extension.

Property Details

### artist

An Artist object.

Get Method:
  getArtist(self)
Set Method:
  setArtist(self, artist)

### label

A Label object.

Get Method:
  getLabel(self)
Set Method:
  setLabel(self, label)

### release

A Release object.

Get Method:
  getRelease(self)
Set Method:
  setRelease(self, release)

### releaseGroup

Get Method:
  getReleaseGroup(self)
Set Method:
  setReleaseGroup(self, releaseGroup)

### track

A Track object.

Get Method:
  getTrack(self)
Set Method:
  setTrack(self, track)

### artistResults

A list of ArtistResult objects.

Get Method:
  getArtistResults(self) - Returns an artist result list.

### artistResultsOffset

The offset of the artist results.

Get Method:
  getArtistResultsOffset(self) - Returns the offset of the artist result list.
Set Method:
  setArtistResultsOffset(self, value) - Sets the offset of the artist result list.

### artistResultsCount

The total number of artists results.

Get Method:
  getArtistResultsCount(self) - Returns the total number of results available.
Set Method:
  setArtistResultsCount(self, value) - Sets the total number of available results.

### labelResults

A list of LabelResult objects

Get Method:
  getLabelResults(self) - Returns a label result list.

### labelResultsOffset

The offset of the label results.

Get Method:
  getLabelResultsOffset(self) - Returns the offset of the label result list.
Set Method:
  setLabelResultsOffset(self, value) - Sets the offset of the label result list.

### labelResultsCount

The total number of label results.

Get Method:
  getLabelResultsCount(self) - Returns the total number of results available.
Set Method:
  setLabelResultsCount(self, value) - Sets the total number of available results.

### releaseResults

A list of ReleaseResult objects.

Get Method:
  getReleaseResults(self) - Returns a release result list.

### releaseResultsOffset

The offset of the release results.

Get Method:
  getReleaseResultsOffset(self) - Returns the offset of the release result list.
Set Method:
  setReleaseResultsOffset(self, value) - Sets the offset of the release result list.

### releaseResultsCount

The total number of release results.

Get Method:
  getReleaseResultsCount(self) - Returns the total number of results available.
Set Method:
  setReleaseResultsCount(self, value) - Sets the total number of available results.

### releaseGroupResults

A list of ReleaseGroupResult objects.

Get Method:
  getReleaseGroupResults(self) - Returns a release group result list.

### releaseGroupResultsOffset

The offset of the release group results.

Get Method:
  getReleaseGroupResultsOffset(self) - Returns the offset of the release group result list.
Set Method:
  setReleaseGroupResultsOffset(self, value) - Sets the offset of the release group result list.

### releaseGroupResultsCount

The total number of release group results.

Get Method:
  getReleaseGroupResultsCount(self) - Returns the total number of results available.
Set Method:
  setReleaseGroupResultsCount(self, value) - Sets the total number of available results.

### trackResults

A list of TrackResult objects.

Get Method:
  getTrackResults(self) - Returns a track result list.

### trackResultsOffset

The offset of the track results.

Get Method:
  getTrackResultsOffset(self) - Returns the offset of the track result list.
Set Method:
  setTrackResultsOffset(self, value) - Sets the offset of the track result list.

### trackResultsCount

The total number of track results.

Get Method:
  getTrackResultsCount(self) - Returns the total number of results available.
Set Method:
  setTrackResultsCount(self, value) - Sets the total number of available results.

### tagResults

A list of Tag objects.

Get Method:
  getTagList(self) - Returns a list of tags.

### rating

A Rating object.

Get Method:
  getRating(self) - Returns the rating.
Set Method:
  setRating(self, value) - Sets the rating.

### userResults

A list of User objects.

Get Method:
  getUserList(self) - Returns a list of users.