Java Musicbrainz Library is a library for accessing Musicbrainz Metadata Webservice written entirely in Java.
News
2009.02.24:
A bugtracker has been added to this project. Please feel free to submit errors and changerequests.
2009.02.24
A first version of the caching library is available for Download.
Using the caching mechanism is as simple as using Java Musicbrainz Library (JMB).
Just put an additional library ‘javaMusicbrainzPersistence.jar’ and the hibernate-
MuscicbrainzPersistenceHandler mbph = new MuscicbrainzPersistenceHandler();
MusicbrainzServiceClient mbClient = MusicbrainzServiceClient.getInstance();
mbClient.setPersistenceHandler(mbph);
Thats all! JMB will store data it retrieved from the webservice in a local database. New queries will be checked against the database and the webservice will only be accessed if the data is not present locally.
Finally put the following lines into your hibernate.cfg.xml
<mapping resource="com/slychief/javamusicbrainz/persistence/entities/Artist.hbm.xml"/>
<mapping resource="com/slychief/javamusicbrainz/persistence/entities/ArtistList.hbm.xml"/>
<mapping resource="com/slychief/javamusicbrainz/persistence/entities/LifeSpan.hbm.xml"/>
<mapping resource="com/slychief/javamusicbrainz/persistence/entities/ReleaseList.hbm.xml"/>
<mapping resource="com/slychief/javamusicbrainz/persistence/entities/Release.hbm.xml"/>
<mapping resource="com/slychief/javamusicbrainz/persistence/entities/Track.hbm.xml"/>
<mapping resource="com/slychief/javamusicbrainz/persistence/entities/TrackList.hbm.xml"/>
<mapping resource="com/slychief/javamusicbrainz/persistence/entities/PuidList.hbm.xml"/>
2009.02.19:
Currently a caching mechanism is being implemented. It extends the Java Musicbrainz Library by adding a Hibernate persistence layer to the webservice API.