NAME
AudioFile::Identify::MusicBrainz::Object
DESCRIPTION
Base class for AudioFile::Identify::MusicBrainz objects.
METHODS
new
'new' method. Don't override this; override init
instead.
init
blank init method, used in some base classes to do setup
parse
passed an XML::DOM::Node
object, parse assumes that it's a Musicbrainz object, a Track, Album, whatever. For each chils of the element, strip the namespace of the tag name, and call the method on $self with that name, passing the XML::DOM::Node
that is that tag.
The base classes of Object will have methods like 'title', 'artist', etc, that parse the passed Node object and extract the right data. See AudioFile::Identify::MusicBrainz::Artist, for instance, for examples.
id
get/set the 'id' property - I use the url of the rdf resource.
store
get/set the 'store' property. I use the store to keep all the objects that I know about. Whenever we parse some rdf and get an object out of it, we put the object in the store. see AudioFile::Identify::MusicBrainz::Store.