Get Java Musicbrainz Library at SourceForge.net. Fast, secure and Free Open Source software downloads

Documentation

 

Javadoc API descriptions

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Examples

 

Searching Artists:

 

 

try {

 

  List<Artist> artists = Artist.findByName(“Tom Jones”);

 

  for (Artist a : artists) {

     System.out.println(a.getName() + "[" + a.getScore() + "]");

  }

 

catch (ServerUnavailableException ex) {

  System.out.println(ex.getMessage();

}

 

 

When you have your artist object, you can access further information by calling its corresponding methods. If the data is not present yet, it will be fetched transparently from the Musicbrainz server.

 

 

try {

  // art is an already instantiated Artist Object

  // with a valid Musicbrainz-Artist-ID

  List<Release> releases = art.getReleases();

 

  for (Release r : releases) {

     System.out.println(r.getTitle());

  }

 

catch (ServerUnavailableException ex) {

  System.out.println(ex.getMessage();

}

 

 

Accordingly you can retrieve all tracks of a release by further calling getTracks on a release-object.

 

  ...

  // rel is a valid release-object

  List<Track> tracks = rel.getTracks();

 

  for (Track t : tracks) {

     System.out.println(t.getTitle());

  }

  ...

Version

Release Date

Javadocs

0.1

2009-02-17

API