|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
MusicBrainz query interface.
This interface is basically a Java port of the
queries defined in queries.h
file included in the
libmusicbrainz
source distribution. That file also
defines a several methods for navigating through an RDF response
from a query. These methods aren't included here, see MusicBrainzSelectors
for some helper methods for navigating through the Model created by
the query methods in this interface
Doesn't support submission and authentication. i.e. read-only. Also doesn't
support FileInfoLookup yet.
Field Summary | |
static int |
CD_INDEX_ID_LENGTH
Length of a MusicBrainz CD Index Id |
static int |
MB_ID_LENGTH
Length of a MusicBrain Artist/Album/Track Id |
static java.lang.String |
VARIOUS_ARTISTS
The MusicBrainz ID used to indicate that an album is a "various artists" album (i.e. |
Method Summary | |
Model |
findAlbumByName(java.lang.String albumName,
int depth,
int maxItems)
Use this query to find albums by name. |
Model |
findArtistByName(java.lang.String artistName,
int depth,
int maxItems)
Use this query to find artists by name. |
Model |
findDistinctTRMId(java.lang.String artistName,
java.lang.String trackName,
int depth)
Use this function to find TRM Ids that match a given artistName and trackName, This query returns a trmidList. |
Model |
findTrackByName(java.lang.String trackName,
int depth,
int maxItems)
Use this query to find tracks by name. |
Model |
getAlbumById(java.lang.String albumid,
int depth)
Retrieve an albumList from a given Album id |
Model |
getArtistById(java.lang.String artistid,
int depth)
Retrieve an artistList from a given Artist id |
Model |
getCDInfoFromCDIndexId(java.lang.String cdindexid,
int depth)
Use this query to return an albumList for the given CD Index Id |
Model |
getQuickTrackInfoFromTrackId(java.lang.String trackid,
java.lang.String albumid)
Use this query to return the basic metadata information (artistname, albumname, trackname, tracknumber) for a given track mb id |
Model |
getTrackById(java.lang.String trackid,
int depth)
Retrieve a trackList from a given Track id |
Model |
getTrackByTRMId(java.lang.String trmid,
int depth)
Retrieve a trackList from a given TRM id |
Model |
getTrackInfoFromTRMId(java.lang.String trmid,
java.lang.String artistName,
java.lang.String albumName,
java.lang.String trackName,
java.lang.String trackNum,
java.lang.String duration)
Use this query to return the metadata information (artistname, albumname, trackname, tracknumber) for a given trm id. |
void |
setServer(java.lang.String server)
Configure the MusicBrainz server to use for the queries |
Field Detail |
public static final java.lang.String VARIOUS_ARTISTS
public static final int CD_INDEX_ID_LENGTH
public static final int MB_ID_LENGTH
Method Detail |
public void setServer(java.lang.String server)
server
- MB server to use for queriespublic Model getCDInfoFromCDIndexId(java.lang.String cdindexid, int depth) throws java.io.IOException
cdindexid
- The cdindex id to look up at the remote server.depth
- level of detail in query response
java.io.IOException
public Model getTrackInfoFromTRMId(java.lang.String trmid, java.lang.String artistName, java.lang.String albumName, java.lang.String trackName, java.lang.String trackNum, java.lang.String duration) throws java.io.IOException
trmid
- The TRM id for the track to be looked upartistName
- The name of the artistalbumName
- The name of the albumtrackName
- The name of the tracktrackNum
- The number of the track
java.io.IOException
public Model getQuickTrackInfoFromTrackId(java.lang.String trackid, java.lang.String albumid) throws java.io.IOException
trackid
- The MB track id for the track to be looked upalbumid
- The MB album id for the track to be looked up
java.io.IOException
public Model findArtistByName(java.lang.String artistName, int depth, int maxItems) throws java.io.IOException
artistName
- The name of the artist to find.depth
- level of detail in responsemaxItems
- maximum number of items to return
java.io.IOException
public Model findAlbumByName(java.lang.String albumName, int depth, int maxItems) throws java.io.IOException
albumName
- The name of the album to find.depth
- level of detail in response. Set depth to be 4 to get details of artist and all tracksmaxItems
- maximum number of items to return
java.io.IOException
public Model findTrackByName(java.lang.String trackName, int depth, int maxItems) throws java.io.IOException
trackName
- The name of the track to find.depth
- level of detail in responsemaxItems
- maximum number of items to return
java.io.IOException
public Model findDistinctTRMId(java.lang.String artistName, java.lang.String trackName, int depth) throws java.io.IOException
artistName
- The name of the artist to find.trackName
- The name of the track to find.depth
- level of detail in response
java.io.IOException
public Model getArtistById(java.lang.String artistid, int depth) throws java.io.IOException
artistid
- MB id of the artistdepth
- level of detail in the result
java.io.IOException
public Model getAlbumById(java.lang.String albumid, int depth) throws java.io.IOException
albumid
- MB id of the albumdepth
- level of detail in the result
java.io.IOException
public Model getTrackById(java.lang.String trackid, int depth) throws java.io.IOException
trackid
- MB id of the albumdepth
- level of detail in the result
java.io.IOException
public Model getTrackByTRMId(java.lang.String trmid, int depth) throws java.io.IOException
depth
- level of detail in the result
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |