Package org.jjazz.rhythmdatabase.api
Interface RhythmInfo
- All Superinterfaces:
Serializable
A description of a Rhythm for catalog purpose.
A RhythmInfo contains descriptive information of a Rhythm instance. It allows to defer creation of Rhythm instances when possible, because Rhythm instance creation can be very time consuming when dealing with hundreds of file-based Rhythms. The RhythmDatabase provides methods to get RhythmInfo/Rhythm instances.
This is an immutable class.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkConsistency
(RhythmProvider rp, Rhythm r) Check that this RhythmInfo object matches data from the specified rhythm.getFile()
Optional file from which this rhythm is loaded.getName()
int
The unique id of the provider of the target rhythm.String[]
getTags()
The unique Id of the target rhythm.boolean
True if this RhythmInfo if for an AdaptedRhythm.
-
Method Details
-
checkConsistency
Check that this RhythmInfo object matches data from the specified rhythm.- Parameters:
rp
- The RhythmProvider for rr
-- Returns:
- False if inconsistency detected
-
isAdaptedRhythm
boolean isAdaptedRhythm()True if this RhythmInfo if for an AdaptedRhythm.- Returns:
-
getUniqueId
String getUniqueId()The unique Id of the target rhythm.- Returns:
-
getRhythmProviderId
String getRhythmProviderId()The unique id of the provider of the target rhythm.- Returns:
-
getAuthor
String getAuthor() -
getRhythmParametersInfos
List<RhythmParameterInfo> getRhythmParametersInfos() -
getRhythmVoiceInfos
List<RhythmVoiceInfo> getRhythmVoiceInfos() -
getDescription
String getDescription() -
getFeatures
RhythmFeatures getFeatures() -
getFile
File getFile()Optional file from which this rhythm is loaded.- Returns:
- Can't be null, but can be an empty path ("") if no file associated.
-
getName
String getName() -
getPreferredTempo
int getPreferredTempo() -
getTags
String[] getTags() -
getTimeSignature
TimeSignature getTimeSignature() -
getVersion
String getVersion()
-