- java.lang.Object
-
- org.deepsymmetry.beatlink.data.TrackMetadata
-
@API(status=STABLE) public class TrackMetadata extends Object
Represents rekordbox metadata (title, artist, etc.) about tracks loaded into players on a DJ Link network.- Author:
- James Elliott
-
-
Field Summary
Fields Modifier and Type Field Description List<Message>
rawItems
The raw dbserver messages containing the metadata when it was read over the network.RekordboxPdb.TrackRow
rawRow
The raw row within a rekordbox database export from which this metadata was created, if any.DataReference
trackReference
The unique track identifier that was used to request this track metadata.CdjStatus.TrackType
trackType
The type of track described by this metadata.
-
Constructor Summary
Constructors Constructor Description TrackMetadata(DataReference reference, Database database, CueList cueList)
Constructor for when reading from a rekordbox export file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
SearchableItem
getAlbum()
Get the album of the track.SearchableItem
getArtist()
Get the artist of the track.int
getArtworkId()
Get the artwork ID for the track.int
getBitRate()
Get the bit rate of the track, if known.ColorItem
getColor()
Get the color assigned to the track.String
getComment()
Get the comment assigned to the track.CueList
getCueList()
Get the cue list associated with the track.String
getDateAdded()
Get the date the track was added to the collection.int
getDuration()
Get the duration of the track, in seconds.SearchableItem
getGenre()
Get the genre of the track.SearchableItem
getKey()
Get the musical key of the track.SearchableItem
getLabel()
Get the label that released the track.SearchableItem
getOriginalArtist()
Get the track's original artist.int
getRating()
Get the rating assigned the track.SearchableItem
getRemixer()
Get the producer who remixed the track.int
getTempo()
Get the starting tempo of the track.String
getTitle()
Get the title of the track.int
getYear()
Get the year of the track, if known.int
hashCode()
String
toString()
-
-
-
Field Detail
-
trackReference
@API(status=STABLE) public final DataReference trackReference
The unique track identifier that was used to request this track metadata.
-
trackType
@API(status=STABLE) public final CdjStatus.TrackType trackType
The type of track described by this metadata.
-
rawItems
@API(status=STABLE) public final List<Message> rawItems
The raw dbserver messages containing the metadata when it was read over the network. Can be used to analyze fields that have not yet been reliably understood, and is also used for storing the metadata in a file. Will benull
if the metadata was constructed from aRekordboxPdb.TrackRow
.- See Also:
rawRow
-
rawRow
@API(status=STABLE) public final RekordboxPdb.TrackRow rawRow
The raw row within a rekordbox database export from which this metadata was created, if any. Will benull
if it was read from a dbserver metadata response.- See Also:
rawItems
-
-
Constructor Detail
-
TrackMetadata
@API(status=STABLE) public TrackMetadata(DataReference reference, Database database, CueList cueList)
Constructor for when reading from a rekordbox export file. Finds the desired track in the exported database, along with all the related records, and sets all the interpreted fields based on the parsed database structures.- Parameters:
reference
- the unique track reference for which track metadata is desireddatabase
- the database from which the row was loaded, in order to find related rowscueList
- the cues associated with the track, if any- Throws:
NoSuchElementException
- if the specified track is not found in the database
-
-
Method Detail
-
getAlbum
@API(status=STABLE) public SearchableItem getAlbum()
Get the album of the track.- Returns:
- the track album
-
getArtist
@API(status=STABLE) public SearchableItem getArtist()
Get the artist of the track.- Returns:
- the track artist
-
getArtworkId
@API(status=STABLE) public int getArtworkId()
Get the artwork ID for the track. Will be zero for tracks that have no artwork.- Returns:
- the value that can be used to request the artwork image, if any, associated with the track
-
getColor
@API(status=STABLE) public ColorItem getColor()
Get the color assigned to the track.- Returns:
- the track color
-
getComment
@API(status=STABLE) public String getComment()
Get the comment assigned to the track.- Returns:
- the track comment
-
getBitRate
@API(status=STABLE) public int getBitRate()
Get the bit rate of the track, if known.- Returns:
- the audio bit rate of the track, in kilobits per second , or 0 if unknown or variable.
-
getCueList
@API(status=STABLE) public CueList getCueList()
Get the cue list associated with the track. Will benull
if no hot cues, loops, or memory points are found in the track.- Returns:
- the hot cues, loops and memory points stored for the track, if any
-
getDateAdded
@API(status=STABLE) public String getDateAdded()
Get the date the track was added to the collection. This information seems to propagate from iTunes.- Returns:
- the date the track was added to the collection, in the form "YYYY-MM-DD"
-
getDuration
@API(status=STABLE) public int getDuration()
Get the duration of the track, in seconds.- Returns:
- the track length in seconds, when played at 100% pitch
-
getGenre
@API(status=STABLE) public SearchableItem getGenre()
Get the genre of the track.- Returns:
- the track genre
-
getKey
@API(status=STABLE) public SearchableItem getKey()
Get the musical key of the track.- Returns:
- the track key
-
getLabel
@API(status=STABLE) public SearchableItem getLabel()
Get the label that released the track.- Returns:
- the track recording label
-
getOriginalArtist
@API(status=STABLE) public SearchableItem getOriginalArtist()
Get the track's original artist.- Returns:
- the artist that originally released the track
-
getRating
@API(status=STABLE) public int getRating()
Get the rating assigned the track.- Returns:
- the track rating
-
getRemixer
@API(status=STABLE) public SearchableItem getRemixer()
Get the producer who remixed the track.- Returns:
- the track remixer
-
getTempo
@API(status=STABLE) public int getTempo()
Get the starting tempo of the track.- Returns:
- the initial track tempo, BPM times 100.
-
getTitle
@API(status=STABLE) public String getTitle()
Get the title of the track.- Returns:
- the track title
-
getYear
@API(status=STABLE) public int getYear()
Get the year of the track, if known.- Returns:
- the year the track was created, or 0 if rekordbox is not indexing by year.
-
-