sk.baka.ambient.collection
Class TrackMetadataBean.Builder

java.lang.Object
  extended by sk.baka.ambient.collection.TrackMetadataBean.Builder
Enclosing class:
TrackMetadataBean

public static final class TrackMetadataBean.Builder
extends Object

The mutable version of TrackMetadataBean. Use it to gradually build the bean. Thread-unsafe.

Author:
Martin Vysny

Field Summary
 String album
          Album name.
 String artist
          Artist.
 String artistDesc
          The artist's description.
 String artistURL
          A link to artist's page
 int bitrate
          Bitrate in kbps.
 String buyURL
          You can buy the album here
 String composer
          Original composer.
 long fileSize
          File size in bytes.
 int frequency
          Frequency in hz.
 String genre
          Genre.
 int length
          Length in seconds.
 String license
          The license URL
 String location
          Location on the filesystem.
 TrackOriginEnum origin
          The track location.
 String title
          Track title.
 String trackNumber
          Track number.
 String yearReleased
          The year released.
 
Constructor Summary
TrackMetadataBean.Builder()
           
 
Method Summary
 TrackMetadataBean build(long trackId)
          Creates new metadata bean.
 TrackMetadataBean.Builder getData(TrackMetadataBean track)
          Polls data from given track.
 TrackMetadataBean.Builder setAlbum(String album)
          Album name.
 TrackMetadataBean.Builder setArtist(String artist)
           
 TrackMetadataBean.Builder setArtistDesc(String artistDesc)
          The artist's description.
 TrackMetadataBean.Builder setArtistURL(String artistURL)
          A link to artist's page
 TrackMetadataBean.Builder setBitrate(int bitrate)
          Bitrate in kbps.
 TrackMetadataBean.Builder setBuyURL(String buyURL)
          You can buy the album here.
 TrackMetadataBean.Builder setComposer(String composer)
          Original composer.
 TrackMetadataBean.Builder setFileSize(long fileSize)
          File size in bytes.
 TrackMetadataBean.Builder setFrequency(int frequency)
          Frequency in hz.
 TrackMetadataBean.Builder setGenre(String genre)
          Genre.
 TrackMetadataBean.Builder setLength(int length)
          Length in seconds.
 TrackMetadataBean.Builder setLicense(String license)
          The license URL
 TrackMetadataBean.Builder setLocation(String location)
          Location on the filesystem.
 TrackMetadataBean.Builder setOrigin(TrackOriginEnum origin)
          The track location.
 TrackMetadataBean.Builder setTitle(String title)
          Track title.
 TrackMetadataBean.Builder setTrackNumber(String trackNumber)
          Track number in the album ordering.
 TrackMetadataBean.Builder setYearReleased(String yearReleased)
          The year released.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

yearReleased

public String yearReleased
The year released.


frequency

public int frequency
Frequency in hz.


buyURL

public String buyURL
You can buy the album here


license

public String license
The license URL


artistURL

public String artistURL
A link to artist's page


artistDesc

public String artistDesc
The artist's description.


title

public String title
Track title.


artist

public String artist
Artist.


composer

public String composer
Original composer.


album

public String album
Album name.


genre

public String genre
Genre.


trackNumber

public String trackNumber
Track number.


location

public String location
Location on the filesystem. May be URL if it is an Internet stream.


length

public int length
Length in seconds. May be 0 if not known.


bitrate

public int bitrate
Bitrate in kbps. If zero then it is not known.


fileSize

public long fileSize
File size in bytes. -1 if the track is an Internet stream.


origin

public TrackOriginEnum origin
The track location.

Constructor Detail

TrackMetadataBean.Builder

public TrackMetadataBean.Builder()
Method Detail

setYearReleased

public TrackMetadataBean.Builder setYearReleased(String yearReleased)
The year released.

Parameters:
yearReleased - the yearReleased to set
Returns:
this

setFrequency

public TrackMetadataBean.Builder setFrequency(int frequency)
Frequency in hz.

Parameters:
frequency - the frequency to set
Returns:
this

setBuyURL

public TrackMetadataBean.Builder setBuyURL(String buyURL)
You can buy the album here.

Parameters:
buyURL - the buyURL to set
Returns:
this

setLicense

public TrackMetadataBean.Builder setLicense(String license)
The license URL

Parameters:
license - the license to set
Returns:
this

setArtistURL

public TrackMetadataBean.Builder setArtistURL(String artistURL)
A link to artist's page

Parameters:
artistURL - the artistURL to set
Returns:
this

setArtistDesc

public TrackMetadataBean.Builder setArtistDesc(String artistDesc)
The artist's description.

Parameters:
artistDesc - the artistDesc to set
Returns:
this

setTitle

public TrackMetadataBean.Builder setTitle(String title)
Track title.

Parameters:
title - the title to set
Returns:
this

setArtist

public TrackMetadataBean.Builder setArtist(String artist)
Parameters:
artist - the artist to set
Returns:
this

setComposer

public TrackMetadataBean.Builder setComposer(String composer)
Original composer.

Parameters:
composer - the composer to set
Returns:
this

setAlbum

public TrackMetadataBean.Builder setAlbum(String album)
Album name.

Parameters:
album - the album to set
Returns:
this

setGenre

public TrackMetadataBean.Builder setGenre(String genre)
Genre.

Parameters:
genre - the genre to set
Returns:
this

setTrackNumber

public TrackMetadataBean.Builder setTrackNumber(String trackNumber)
Track number in the album ordering.

Parameters:
trackNumber - the trackNumber to set
Returns:
this

setLocation

public TrackMetadataBean.Builder setLocation(String location)
Location on the filesystem. May be URL if it is an Internet stream.

Parameters:
location - the location to set
Returns:
this

setLength

public TrackMetadataBean.Builder setLength(int length)
Length in seconds. May be 0 if not known.

Parameters:
length - the length to set
Returns:
this

setBitrate

public TrackMetadataBean.Builder setBitrate(int bitrate)
Bitrate in kbps. If zero then it is not known.

Parameters:
bitrate - the bitrate to set
Returns:
this

setFileSize

public TrackMetadataBean.Builder setFileSize(long fileSize)
File size in bytes. -1 if the track is an Internet stream.

Parameters:
fileSize - the fileSize to set
Returns:
this

setOrigin

public TrackMetadataBean.Builder setOrigin(TrackOriginEnum origin)
The track location.

Parameters:
origin - the origin to set
Returns:
this

build

public TrackMetadataBean build(long trackId)
Creates new metadata bean.

Parameters:
trackId - the database track id
Returns:
new bean instance

getData

public TrackMetadataBean.Builder getData(TrackMetadataBean track)
Polls data from given track.

Parameters:
track - copy data from given track.
Returns:
this


Copyright © 2007-2008. All Rights Reserved.