Package org.deepsymmetry.beatlink.data
Class TrackMetadata
- java.lang.Object
-
- org.deepsymmetry.beatlink.data.TrackMetadata
-
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>rawItemsThe raw dbserver messages containing the metadata when it was read over the network.RekordboxPdb.TrackRowrawRowThe raw row within a rekordbox database export from which this metadata was created, if any.DataReferencetrackReferenceThe unique track identifier that was used to request this track metadata.CdjStatus.TrackTypetrackTypeThe 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 booleanequals(Object o)SearchableItemgetAlbum()Get the album of the track.SearchableItemgetArtist()Get the artist of the track.intgetArtworkId()Get the artwork ID for the track.intgetBitRate()Get the bit rate of the track, if known.ColorItemgetColor()Get the color assigned to the track.StringgetComment()Get the comment assigned to the track.CueListgetCueList()Get the cue list associated with the track.StringgetDateAdded()Get the date the track was added to the collection.intgetDuration()Get the duration of the track, in seconds.SearchableItemgetGenre()Get the genre of the track.SearchableItemgetKey()Get the musical key of the track.SearchableItemgetLabel()Get the label that released the track.SearchableItemgetOriginalArtist()Get the track's original artist.intgetRating()Get the rating assigned the track.SearchableItemgetRemixer()Get the producer who remixed the track.intgetTempo()Get the starting tempo of the track.StringgetTitle()Get the title of the track.intgetYear()Get the year of the track, if known.inthashCode()StringtoString()
-
-
-
Field Detail
-
trackReference
public final DataReference trackReference
The unique track identifier that was used to request this track metadata.
-
trackType
public final CdjStatus.TrackType trackType
The type of track described by this metadata.
-
rawItems
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 benullif the metadata was constructed from aRekordboxPdb.TrackRow.- See Also:
rawRow
-
rawRow
public final RekordboxPdb.TrackRow rawRow
The raw row within a rekordbox database export from which this metadata was created, if any. Will benullif it was read from a dbserver metadata response.- See Also:
rawItems
-
-
Constructor Detail
-
TrackMetadata
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 of 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
public SearchableItem getAlbum()
Get the album of the track.- Returns:
- the track album
-
getArtist
public SearchableItem getArtist()
Get the artist of the track.- Returns:
- the track artist
-
getArtworkId
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
public ColorItem getColor()
Get the color assigned to the track.- Returns:
- the track color
-
getComment
public String getComment()
Get the comment assigned to the track.- Returns:
- the track comment
-
getBitRate
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
public CueList getCueList()
Get the cue list associated with the track. Will benullif 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
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
public int getDuration()
Get the duration of the track, in seconds.- Returns:
- the track length in seconds, when played at 100% pitch
-
getGenre
public SearchableItem getGenre()
Get the genre of the track.- Returns:
- the track genre
-
getKey
public SearchableItem getKey()
Get the musical key of the track.- Returns:
- the track key
-
getLabel
public SearchableItem getLabel()
Get the label that released the track.- Returns:
- the track recording label
-
getOriginalArtist
public SearchableItem getOriginalArtist()
Get the track's original artist.- Returns:
- the artist that originally released the track
-
getRating
public int getRating()
Get the rating assigned the track.- Returns:
- the track rating
-
getRemixer
public SearchableItem getRemixer()
Get the producer who remixed the track.- Returns:
- the track remixer
-
getTempo
public int getTempo()
Get the starting tempo of the track.- Returns:
- the initial track tempo, BPM times 100.
-
getTitle
public String getTitle()
Get the title of the track.- Returns:
- the track title
-
getYear
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.
-
-