Home | Trees | Indices | Help |
---|
|
object --+ | Relation
Represents a relation between two Entities.
There may be an arbitrary number of relations between all first class objects in MusicBrainz. The Relation itself has multiple attributes, which may or may not be used for a given relation type.
Note that a Relation object only contains the target but not the source end of the relation.
To Do: Add some examples.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Properties | |
type The relation's type. |
|
targetId The type of target this relation points to. |
|
attributes The list of attributes describing this relation. |
|
beginDate The begin date. |
|
endDate The end date. |
|
direction The reading direction. |
|
target The relation's target object. |
|
Inherited from |
Method Details |
Constructor.
|
Returns this relation's type.
|
Sets this relation's type.
|
Returns the target's ID. This is the ID the relation points to. It is an absolute URI, and in case of an URL relation, it is a URL.
|
Sets the target's ID.
See Also: getTargetId |
Returns the target's type. For MusicBrainz data, the following target types are defined:
|
Sets the target's type.
See Also: getTargetType |
Returns a list of attributes describing this relation. The attributes permitted depend on the relation type.
|
Adds an attribute to the list.
|
Returns the begin date. The definition depends on the relation's type. It may for example be the day of a marriage or the year an artist joined a band. For other relation types this may be undefined.
|
Sets the begin date.
See Also: getBeginDate |
Returns the end date. As with the begin date, the definition depends on the relation's type. Depending on the relation type, this may or may not be defined.
See Also: getBeginDate |
Sets the end date.
See Also: getBeginDate |
Returns the reading direction. The direction may be one of Relation.DIR_FORWARD, Relation.DIR_BACKWARD, or Relation.DIR_NONE, depending on how the relation should be read. For example, if direction is Relation.DIR_FORWARD for a cover relation, it is read as "X is a cover of Y". For some relations there is no reading direction (like marriages) and the web service doesn't send a direction. In these cases, the direction is set to Relation.DIR_NONE.
|
Sets the reading direction.
See Also: getDirection |
Returns this relation's target object. Note that URL relations never have a target object. Use the getTargetId method to get the URL.
|
Sets this relation's target object. Note that URL relations never have a target object, they are set using setTargetId.
|
Property Details |
typeThe relation's type. |
targetIdThe type of target this relation points to.
|
attributesThe list of attributes describing this relation.
|
beginDateThe begin date.
|
endDateThe end date.
|
directionThe reading direction.
|
targetThe relation's target object. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Dec 5 13:37:51 2011 | http://epydoc.sourceforge.net |