Package musicbrainz2 :: Module model :: Class Artist
[frames | no frames]

Type Artist

object --+    
         |    
    Entity --+
             |
            Artist


Represents an artist.

Artists in MusicBrainz can have a type. Currently, this type can be either Person or Group for which the following URIs are assigned: Use the TYPE_PERSON and TYPE_GROUP constants for comparison.
Method Summary
  __init__(self, id_, type_, name, sortName)
Constructor.
  addAlias(self, alias)
Adds an alias for this artist.
  addRelease(self, release)
Adds a release to this artist's list of releases.
  getAliases(self)
Returns the list of aliases for this artist.
  getBeginDate(self)
Returns the birth/foundation date.
  getDisambiguation(self)
Returns the disambiguation attribute.
  getEndDate(self)
Get the death/dissolving date.
  getName(self)
Returns the artist's name.
  getReleases(self)
Returns a list of releases from this artist.
  getSortName(self)
Returns the artist's sort name.
  getType(self)
Returns the artist's type.
  getUniqueName(self)
Returns a unique artist name (using disambiguation).
  setBeginDate(self, dateStr)
Sets the begin/foundation date.
  setDisambiguation(self, disambiguation)
Sets the disambiguation attribute.
  setEndDate(self, dateStr)
Sets the death/dissolving date.
  setName(self, name)
Sets the artist's name.
  setSortName(self, sortName)
Sets the artist's sort name.
  setType(self, type_)
Sets the artist's type.
    Inherited from Entity
  addRelation(self, relation)
Adds a relation.
  getId(self)
Returns a MusicBrainz ID.
  getRelations(self, targetType, relationType)
Returns a list of relations.
  getRelationTargetTypes(self)
Returns a list of target types available for this entity.
  setId(self, value)
Sets a MusicBrainz ID.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Property Summary
  aliases: The list of aliases
  beginDate: The begin/foundation date.
  disambiguation: The disambiguation comment.
  endDate: The death/dissolving date.
  name: The artist's name.
  releases: The list of releases
  sortName: The artist's sort name.
  type: The artist's type.
    Inherited from Entity
  id: The MusicBrainz ID.

Class Variable Summary
str TYPE_GROUP = 'http://musicbrainz.org/ns/mmd-1.0#Group'
str TYPE_PERSON = 'http://musicbrainz.org/ns/mmd-1.0#Person'...

Method Details

__init__(self, id_=None, type_=None, name=None, sortName=None)
(Constructor)

Constructor.
Parameters:
id_ - a string containing an absolute URI
type_ - a string containing an absolute URI
name - a string containing the artist's name
sortName - a string containing the artist's sort name
Overrides:
musicbrainz2.model.Entity.__init__

addAlias(self, alias)

Adds an alias for this artist.
Parameters:
alias - an ArtistAlias object

addRelease(self, release)

Adds a release to this artist's list of releases.
Parameters:
release - a Release object

getAliases(self)

Returns the list of aliases for this artist.
Returns:
a list of ArtistAlias objects

getBeginDate(self)

Returns the birth/foundation date.

The definition of the begin date depends on the artist's type. For persons, this is the day of birth, for groups it is the day the group was founded.

The returned date has the format 'YYYY', 'YYYY-MM', or 'YYYY-MM-DD', depending on how much detail is known.
Returns:
a string containing the date, or None

See Also: getType

getDisambiguation(self)

Returns the disambiguation attribute.

This attribute may be used if there is more than one artist with the same name. In this case, disambiguation attributes are added to the artists' names to keep them apart.

For example, there are at least three bands named 'Vixen'. Each band has a different disambiguation in the MusicBrainz database, like 'Hip-hop' or 'all-female rock/glam band'.
Returns:
a disambiguation string, or None

See Also: getUniqueName

getEndDate(self)

Get the death/dissolving date.

The definition of the end date depends on the artist's type. For persons, this is the day of death, for groups it is the day the group was dissolved.
Returns:
a string containing a date, or None

See Also: getBeginDate

getName(self)

Returns the artist's name.
Returns:
a string containing the artist's name, or None

getReleases(self)

Returns a list of releases from this artist.

This may also include releases where this artist isn't the main artist but has just contributed one or more tracks (aka VA-Releases).
Returns:
a list of Release objects

getSortName(self)

Returns the artist's sort name.

The sort name is the artist's name in a special format which is better suited for lexicographic sorting. The MusicBrainz style guide specifies this format.

See Also: The MusicBrainz Style Guidelines

getType(self)

Returns the artist's type.
Returns:
a string containing an absolute URI, or None

getUniqueName(self)

Returns a unique artist name (using disambiguation).

This method returns the artist name together with the disambiguation attribute in parenthesis if it exists. Example: 'Vixen (Hip-hop)'.
Returns:
a string containing the unique name

See Also: getDisambiguation

setBeginDate(self, dateStr)

Sets the begin/foundation date.
Parameters:
dateStr - a date string

See Also: getBeginDate

setDisambiguation(self, disambiguation)

Sets the disambiguation attribute.
Parameters:
disambiguation - a disambiguation string

See Also: getDisambiguation, getUniqueName

setEndDate(self, dateStr)

Sets the death/dissolving date.
Parameters:
dateStr - a string containing a date

See Also: setEndDate, getBeginDate

setName(self, name)

Sets the artist's name.
Parameters:
name - a string containing the artist's name

setSortName(self, sortName)

Sets the artist's sort name.
Parameters:
sortName - a string containing the artist's sort name

See Also: getSortName

setType(self, type_)

Sets the artist's type.
Parameters:
type_ - a string containing an absolute URI

Property Details

aliases

The list of aliases
Get Method:
getAliases(self)

beginDate

The begin/foundation date.
Get Method:
getBeginDate(self)
Set Method:
setBeginDate(self, dateStr)

disambiguation

The disambiguation comment.
Get Method:
getDisambiguation(self)
Set Method:
setDisambiguation(self, disambiguation)

endDate

The death/dissolving date.
Get Method:
getEndDate(self)
Set Method:
setEndDate(self, dateStr)

name

The artist's name.
Get Method:
getName(self)
Set Method:
setName(self, name)

releases

The list of releases
Get Method:
getReleases(self)

sortName

The artist's sort name.
Get Method:
getSortName(self)
Set Method:
setSortName(self, sortName)

type

The artist's type.
Get Method:
getType(self)
Set Method:
setType(self, type_)

Class Variable Details

TYPE_GROUP

Type:
str
Value:
'http://musicbrainz.org/ns/mmd-1.0#Group'                              

TYPE_PERSON

Type:
str
Value:
'http://musicbrainz.org/ns/mmd-1.0#Person'                             

Generated by Epydoc 2.1 on Sat Aug 26 18:34:31 2006 http://epydoc.sf.net