Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

MusicBrainz::Queries
MusicBrainz RDF Query Constants

MusicBrainz::Queries - MusicBrainz RDF Query Constants


NAME

MusicBrainz::Queries - MusicBrainz RDF Query Constants


SYNOPSIS


  use MusicBrainz::Queries qw(:all);


DESCRIPTION

This module is used to provide access to the RDF Query Constants used by the MusicBrainz::Client module for querying the MusicBrainz server.

EXPORT

None by default.

Exportable constants

MBE_AlbumGetAlbumArtistId
Return the Artist ID of the currently selected Album. This may return the artist id for the Various Artists' artist, and then you should check the artist for each track of the album seperately with MBE_AlbumGetArtistName, MBE_AlbumGetArtistSortName and MBE_AlbumGetArtistId.

MBE_AlbumGetAlbumArtistName
Return the name of the artist for this album.

MBE_AlbumGetAlbumArtistSortName
Return the sortname of the artist for this album.



=item  MBE_AlbumGetAlbumId

Return the ID of the currently selected Album.

MBE_AlbumGetAlbumName
Return the name of the currently selected Album.

MBE_AlbumGetAlbumStatus



Return the release status of the currently selected Album.
MBE_AlbumGetAlbumType
Return the release type of the currently selected Album.

MBE_AlbumGetAmazonAsin
Return the Amazon.com ASIN for the currently selected Album.

MBE_AlbumGetArtistId
Return the artist Id of the nth track in the album. Requires a track index ordinal. 1 for the first track, etc...

MBE_AlbumGetArtistName
Return the artist name of the nth track in the album. Requires a track index ordinal. 1 for the first track, etc...

MBE_AlbumGetArtistSortName
Return the artist sortname of the nth track in the album. Requires a track index ordinal. 1 for the first track, etc...

MBE_AlbumGetCdindexId
Return the nth cdindex of the album. Requires a index ordinal. 1 for the first cdindex, etc...

MBE_AlbumGetNumCdindexIds
Return the number of cdindexds returned in this query.

MBE_AlbumGetNumReleaseDates
Return the number of release dates for the currently selected Album

MBE_AlbumGetNumTracks
Return the mumber of tracks in the currently selected Album

MBE_AlbumGetTrackDuration
Return the track duration of the nth track in the album. Requires a track index ordinal. 1 for the first track, etc...

MBE_AlbumGetTrackId
Return the Id of the nth track in the album. Requires a track index ordinal. 1 for the first track, etc...

MBE_AlbumGetTrackList
Return the track list of an album. This extractor should only be used to specify a list for get_ordinal_from_list().

MBE_AlbumGetTrackName
Return the track name of the nth track in the album. Requires a track index ordinal. 1 for the first track, etc...

MBE_AlbumGetTrackNum
Return the track number of the nth track in the album. Requires a track index ordinal. 1 for the first track, etc...

MBE_ArtistGetAlbumId
Return the ID of the nth album. Requires an ordinal argument to select an album from a list of albums in the current artist.

MBE_ArtistGetAlbumName
Return the name of the nth album. Requires an ordinal argument to select an album from a list of albums in the current artist.

MBE_ArtistGetArtistId
Return the ID of the currently selected Album.

MBE_ArtistGetArtistName
Return the name of the currently selected Album

MBE_ArtistGetArtistSortName
Return the sort name of the currently selected Album

MBE_AuthGetChallenge
Return the Auth Challenge data from the Auth Query This query will be used internally by the client library.

MBE_AuthGetSessionId
Return the Session Id from the Auth Query. This query will be used internally by the client library.

MBE_GetError
Internal use only.

MBE_GetNumAlbums
Return the number of albums returned in this query.

MBE_GetNumArtists
Return the number of artist returned in this query.

MBE_GetNumLookupResults
Return the number of lookup results returned in this query.

MBE_GetNumTracks
Return the number of tracks returned in this query.

MBE_GetNumTrmids
Return the number of trmids returned in this query.

MBE_GetStatus
Get the general return status of this query. Values for this include OK or fuzzy. Fuzzy is returned when the server made a fuzzy match somewhere while handling the query.

MBE_LookupGetAlbumArtistId
Return the artist id associated with the album of the lookup result.

MBE_LookupGetAlbumId
Return the album id of the lookup result.

MBE_LookupGetArtistId
Return the artist id of the lookup result.

MBE_LookupGetRelevance
Return the relevance of the lookup result.

MBE_LookupGetTrackArtistId
Return the artist id associated with the track of the lookup result.

MBE_LookupGetTrackId
Return the track id of the lookup result.

MBE_LookupGetType
Return the type of the lookup result.

MBE_QuerySubject
Internal use only.

MBE_QuickGetAlbumName
Return the name of the album.

MBE_QuickGetArtistId
Return the id of the artist.

MBE_QuickGetArtistName
Return the name of the artist.

MBE_QuickGetArtistSortName
Return the sort name of the artist.

MBE_QuickGetTrackDuration
Return the track duration.

MBE_QuickGetTrackId
Return the MB track id.

MBE_QuickGetTrackName
Return the name of the track.

MBE_QuickGetTrackNum
Return the number of the track.

MBE_ReleaseGetCountry
Return the country in which the album was released

MBE_ReleaseGetDate
Return the date the album was released

MBE_TOCGetCDIndexId
Return the CDIndex ID from the table of contents from the CD.

MBE_TOCGetFirstTrack
Return the first track number from the table of contents from the CD.

MBE_TOCGetLastTrack
Return the last track number (total number of tracks on the CD) from the table of contents from the CD.

MBE_TOCGetTrackNumSectors
Return the number of sectors for the nth track. One ordinal argument must be given to specify the track. Track 1 is a special lead-out track, and the actual track 1 on a CD can be retrieved as track 2 and so forth.

MBE_TOCGetTrackSectorOffset
Return the sector offset from the nth track. One ordinal argument must be given to specify the track. Track 1 is a special lead-out track, and the actual track 1 on a CD can be retrieved as track 2 and so forth.

MBE_TrackGetArtistId
Return the Id of the artist for this track.

MBE_TrackGetArtistName
Return the name of the artist for this track.

MBE_TrackGetArtistSortName
Return the sortname of the artist for this track.

MBE_TrackGetTrackDuration
Return the track duration in the currently selected track.

MBE_TrackGetTrackId
Return the ID of the currently selected track.

MBE_TrackGetTrackName
Return the name of the currently selected track.

MBE_TrackGetTrackNum
Return the track number in the currently selected track.

MBE_GetRelationshipType
Get the type of an advanced relationships ilnk. Pleaes note that these relatnship types can change over time!

MBE_GetRelationshipDirection
Get the direction of a link between two like entities. This data element will only be present for links between like types (eg artist-artist links) and IFF the link direction is reversed of what the RDF implies.

MBE_GetRelationshipArtistId
Get the artist id that this link points to.

MBE_GetRelationshipArtistName
Get the artist name that this link points to.

MBE_GetRelationshipAlbumId
Get the album id that this link points to.

MBE_GetRelationshipAlbumName
Get the album name that this link points to.

MBE_GetRelationshipAttribute
Get the vocal/instrument attributes. Must pass an ordinal to indicate which attribute to get.

MBE_GetRelationshipTrackId
Get the track id that this link points to.

MBE_GetRelationshipTrackName
Get the track name that this link points to.

MBE_GetRelationshipURL
Get the URL that this link points to.

MBI_VARIOUS_ARTIST_ID
The MusicBrainz artist id used to indicate that an album is a various artist album.

MBQ_AssociateCD
Internal use only.

MBQ_Authenticate
This query is use to start an authenticated session with the MB server. The username is sent to the server, and the server responds with session id and a challenge sequence that the client needs to use to create a session key. The session key and session id need to be provided with the MBQ_SubmitXXXX functions in order to give moderators/users credit for their submissions. This query will be carried out by the client libary automatically -- you should not need to use it.

MBQ_FileInfoLookup
Lookup metadata for one file. This function can be used by tagging applications to attempt to match a given track with a track in the database. The server will attempt to match an artist, album and track during three phases. If at any one lookup phase the server finds ONE item only, it will move on to to the next phase. If no items are returned, an error message is returned. If more then one item is returned, the end-user will have to choose one from the returned list and then make another call to the server. To express the choice made by a user, the client should leave the artistName/albumName empty and provide the artistId and/or albumId empty on the subsequent call. Once an artistId or albumId is provided the server will pick up from the given Ids and attempt to resolve the next phase.

MBQ_FindAlbumByName
Use this query to find albums by name. This function returns an albumList for the given album name.

MBQ_FindArtistByName
Use this query to find artists by name. This function returns an artistList for the given artist name.

MBQ_FindDistinctTRMId
Use this function to find TRM Ids that match a given artistName and trackName, This query returns a trmidList.

MBQ_FindTrackByName
Use this query to find tracks by name. This function returns a trackList for the given track name.

MBQ_GetAlbumById
Retrieve an albumList from a given Album id.

MBQ_GetArtistById
Retrieve an artistList from a given Artist id.

MBQ_GetCDInfo
Use this query to look up a CD from MusicBrainz. This query will examine the CD-ROM in the CD-ROM drive specified by set_device() and then send the CD-ROM data to the server. The server will then find any matching CDs and return then as an albumList.

MBQ_GetCDInfoFromCDIndexId
Use this query to return an albumList for the given CD Index Id.

MBQ_GetCDTOC
Use this query to examine the table of contents of a CD. This query will examine the CD-ROM in the CD-ROM drive specified by set_device(), and then let the use extract data from the table of contents using the MBQ_TOCXXXXX functions. No live net connection is required for this query.

MBQ_GetTrackById
Retrieve an trackList from a given Track id.

MBQ_GetTrackByTRMId
Retrieve an trackList from a given TRM Id.

MBQ_QuickTrackInfoFromTrackId
Use this query to return the basic metadata information (artistname, albumname, trackname, tracknumber) for a given track mb id.

MBQ_SubmitTrack
Internal use only.

MBQ_SubmitTrackTRMId
Submit a single TrackId, TRM Id pair to MusicBrainz. This query can handle only one pair at a time, which is inefficient. The user may wish to create the query RDF text by hand and provide more than one pair in the rdf:Bag, since the server can handle up to 1000 pairs in one query.

MBQ_TrackInfoFromTRMId
Use this query to return the metadata information (artistname, albumname, trackname, tracknumber) for a given trm id. Optionally, you can also specifiy the basic artist metadata, so that if the server cannot match on the TRM id, it will attempt to match based on the basic metadata. In case of a TRM collision (where one TRM may point to more than one track) this function will return more than on track. The user (or tagging app) must decide which track information is correct.

MBQ_GetArtistRelationsById
Retrieve an artistList with advanced relationships from a given artist id

MBQ_GetAlbumRelationsById
Retrieve an albumList with advanced relationships from a given album id

MBQ_GetTrackRelationsById
Retrieve a trackList with advanced relationships from a give track id

MBS_Back
Use this query to change the current context back one level.

MBS_Rewind
Use this query to reset the current context back to the top level of the response.

MBS_SelectAlbum
Use this Select Query to select an album from an query that returns a list of albums. Giving the argument 1 for the ordinal selects the first album in the list, 2 the second and so on. Use MBE_AlbumXXXXXX queries to extract data after the select.

MBS_SelectArtist
Use this Select Query to select an artist from an query that returns a list of artists. Giving the argument 1 for the ordinal selects the first artist in the list, 2 the second and so on. Use MBE_ArtistXXXXXX queries to extract data after the select.

MBS_SelectCdindexid
Use this Select Query to select a CD Index id from the list.

MBS_SelectLookupResult
Use this Select Query to select a result from a lookupResultList. This select will be used in conjunction with MBQ_FileLookup.

MBS_SelectLookupResultAlbum
Use this Select Query to select the album from a lookup result. This select will be used in conjunction with MBQ_FileLookup.

MBS_SelectLookupResultArtist
Use this Select Query to select the artist from a lookup result. This select will be used in conjunction with MBQ_FileLookup.

MBS_SelectLookupResultTrack
Use this Select Query to select the track from a lookup result. This select will be used in conjunction with MBQ_FileLookup.

MBS_SelectReleaseDate
Use this Select Query to select a Release date/country from the list.

MBS_SelectTrack
Use this Select Query to select a track from an query that returns a list of tracks. Giving the argument 1 for the ordinal selects the first track in the list, 2 the second and so on. Use MBE_TrackXXXXXX queries to extract data after the select.

MBS_SelectTrackAlbum
Use this Select Query to select an the corresponding artist from a track context. MBE_ArtistXXXXXX queries to extract data after the select.

MBS_SelectTrackArtist
Use this Select Query to select an the corresponding artist from a track context. MBE_ArtistXXXXXX queries to extract data after the select.

MBS_SelectTrmid
Use this Select Query to select a trmid from the list.

MBS_SelectRelationship
Use this Select Query to select a relationship from a list advanced relationships.

MBS_SelectAlbumArtist
Use this Select Query to select an the corresponding artist from an album context. MBE_ArtistXXXXXX queries to extract data after the select.



=back


SEE ALSO

MusicBrainz::Client

http://www.musicbrainz.org/docs/mb_client/queries_8h.html


AUTHOR

Sander van Zoest, <svanzoest@cpan.org>


COPYRIGHT AND LICENSE

Copyright 2003-2006 by Alexander van Zoest

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy