Home | Trees | Indices | Help |
---|
|
object --+ | Entity
A first-level MusicBrainz class.
All entities in MusicBrainz have unique IDs (which are absolute URIs) as well as any number of relations to other entities and free text tags. This class is abstract and should not be instantiated.
Relations are differentiated by their target type, that means, where they link to. MusicBrainz currently supports four target types (artists, releases, tracks, and URLs) each identified using a URI. To get all relations with a specific target type, you can use getRelations and pass one of the following constants as the parameter:See Also: Relation
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Properties | |
id The MusicBrainz ID. |
|
tags The tags for this entity. |
|
Inherited from |
Method Details |
Constructor. This should only used by derived classes.
|
|
|
Returns a list of relations. IftargetType is given, only relations of that target
type are returned. For MusicBrainz, the following target types are
defined:
If You may use the direction is set, only relations with the given
reading direction are returned. You can use the Relation.DIR_FORWARD, Relation.DIR_BACKWARD, and Relation.DIR_NONE constants for this.
See Also: Entity |
Returns a list of relation targets. The arguments work exactly like in getRelations, but instead of Relation objects, the matching relation targets are returned. This can be Artist, Release, or Track objects, depending on the relations. As a special case, URL strings are returned if the target is an URL.
See Also: getRelations |
Adds a relation. This method addsrelation to the list of relations. The
given relation has to be initialized, at least the target type has to be
set.
See Also: Entity |
Returns a list of target types available for this entity. Use this to find out to which types of targets this entity has relations. If the entity only has relations to tracks and artists, for example, then a list containg the strings Relation.TO_TRACK and Relation.TO_ARTIST is returned.
See Also: getRelations |
|
|
Add a new tag. This merges an existing tag with the same name.
See Also: getTags |
Property Details |
idThe MusicBrainz ID.
|
tagsThe tags for this entity.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Tue May 27 10:30:21 2008 | http://epydoc.sourceforge.net |