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

Class Tag

source code

object --+
         |
        Tag

The representation of a MusicBrainz folksonomy tag.

The tag's value is the text that's displayed in the tag cloud. The count attribute keeps track of how many users added the tag to its owning entity.

Instance Methods
 
__init__(self, value=None, count=None)
Constructor.
source code
 
getValue(self)
Returns a string with the tag's value.
source code
 
setValue(self, value)
Sets the value of this tag.
source code
 
getCount(self)
Returns an integer containing the tag's frequency count.
source code
 
setCount(self, count)
Sets the frequency count of this tag.
source code
 
__str__(self)
str(x)
source code
 
__unicode__(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Properties
  value
The value of the text.
  count
This tag's frequency count.

Inherited from object: __class__

Method Details

__init__(self, value=None, count=None)
(Constructor)

source code 

Constructor.

Parameters:
  • value - a string containing the tag's value
  • count - the number of users who added this tag
Overrides: object.__init__

getValue(self)

source code 

Returns a string with the tag's value.

Returns:
a string containing the tags's value, or None

setValue(self, value)

source code 

Sets the value of this tag.

Parameters:
  • value - A string containing the value of the tag

getCount(self)

source code 

Returns an integer containing the tag's frequency count.

Returns:
an integer containing the tags's frequency count, or None

setCount(self, count)

source code 

Sets the frequency count of this tag.

Parameters:
  • count - an integer containing the tag's frequency count

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

Property Details

value

The value of the text.

Get Method:
getValue(self) - Returns a string with the tag's value.
Set Method:
setValue(self, value) - Sets the value of this tag.

count

This tag's frequency count.

Get Method:
getCount(self) - Returns an integer containing the tag's frequency count.
Set Method:
setCount(self, count) - Sets the frequency count of this tag.