Package musicbrainz2 :: Module wsxml :: Class AbstractResult

[frames] | no frames]

# Class AbstractResult

source code

    object --+
             |
            AbstractResult

Known Subclasses:
  - ArtistResult
  - , LabelResult
  - , ReleaseGroupResult
  - , ReleaseResult
  - , TrackResult

The abstract representation of a result.

A result is an instance of some kind (Artist, Release, ...) associated with a score.

Instance Methods

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

getScore(self) Returns the result score. | source code

setScore(self, score) | source code

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

Properties
| score The relevance score.
Inherited from `object`: `__class__`

Method Details

### __init__(self, score)
(Constructor)

source code

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

Overrides: object.__init__
  (inherited documentation)

### getScore(self)

source code

Returns the result score.

The score indicates how good this result matches the search parameters. The higher the value, the better the match.

Returns:
  an int between 0 and 100 (both inclusive), or None

Property Details

### score

The relevance score.

Get Method:
  getScore(self) - Returns the result score.
Set Method:
  setScore(self, score)