public class StorageRepositoryImpl extends java.lang.Object implements Repository2
| Modifier and Type | Method and Description |
|---|---|
void |
addRepositoryChangedListener(RepositoryChangedListener listener)
Add a change listener to the repository
|
void |
deleteImporter(AbstractMidiImporter importer)
delete an importer
|
void |
deleteInstrument(Instrument instrument)
delete an instrument
|
void |
deleteScale(Scale scale)
delete the scale
|
void |
deleteTransformation(AbstractTransformation transformation) |
java.util.ArrayList<AbstractMidiImporter> |
findImporter(Scale destination)
look for an importer for a destination Scale
|
java.util.ArrayList<AbstractTransformation> |
findTransposition(Scale source,
Scale destination)
Look for all the transformation for a source and a destination scale
|
protected void |
fireInstrumentsChanged() |
protected void |
fireScalesChanged() |
protected void |
fireTransformationAndImporterChanged() |
Instrument[] |
getInstrument(Scale gamme)
Get the instruments associated to a scale
|
Instrument |
getInstrument(java.lang.String name)
Get an instrument by name
|
java.lang.String |
getLabel()
get the display name (localized)
|
java.lang.String |
getName()
Get the name of the repository
|
Scale |
getScale(java.lang.String name)
get a scale from its name
|
java.lang.String[] |
getScaleNames()
get the scale names contained in the scale manager
|
boolean |
isReadOnly()
Inform if the repository is readonly (cannot modify the scales /
instruments .. and so on ..)
|
Instrument[] |
listInstruments()
Get All instruments
|
void |
removeRepositoryChangedListener(RepositoryChangedListener listener)
remove a repositoryChangeListener
|
void |
saveImporter(AbstractMidiImporter importer) |
void |
saveInstrument(Instrument instrument)
Save an instrument
|
void |
saveScale(Scale scale)
save the scale
|
void |
saveTransformation(AbstractTransformation transformation) |
public java.lang.String getName()
Repository2getName in interface Repository2public java.lang.String getLabel()
Repository2getLabel in interface Repository2public Instrument getInstrument(java.lang.String name)
InstrumentManagergetInstrument in interface InstrumentManagerpublic Instrument[] getInstrument(Scale gamme)
InstrumentManagergetInstrument in interface InstrumentManagerpublic Instrument[] listInstruments()
InstrumentManagerlistInstruments in interface InstrumentManagerpublic java.lang.String[] getScaleNames()
ScaleManagergetScaleNames in interface ScaleManagerpublic Scale getScale(java.lang.String name)
ScaleManagergetScale in interface ScaleManagerpublic java.util.ArrayList<AbstractMidiImporter> findImporter(Scale destination)
TransformationManagerfindImporter in interface TransformationManagerpublic java.util.ArrayList<AbstractTransformation> findTransposition(Scale source, Scale destination)
TransformationManagerfindTransposition in interface TransformationManagersource - la gamme source de la transpositiondestination - la gamme destination de la transpositionpublic void addRepositoryChangedListener(RepositoryChangedListener listener)
Repository2addRepositoryChangedListener in interface Repository2protected void fireScalesChanged()
protected void fireInstrumentsChanged()
protected void fireTransformationAndImporterChanged()
public void removeRepositoryChangedListener(RepositoryChangedListener listener)
Repository2removeRepositoryChangedListener in interface Repository2public void saveImporter(AbstractMidiImporter importer) throws java.lang.Exception
saveImporter in interface TransformationManagerjava.lang.Exceptionpublic void deleteImporter(AbstractMidiImporter importer) throws java.lang.Exception
TransformationManagerdeleteImporter in interface TransformationManagerjava.io.IOExceptionjava.lang.Exceptionpublic void deleteInstrument(Instrument instrument) throws java.lang.Exception
InstrumentManagerdeleteInstrument in interface InstrumentManagerjava.lang.Exceptionpublic void saveScale(Scale scale) throws java.lang.Exception
ScaleManagersaveScale in interface ScaleManagerjava.lang.Exceptionpublic void deleteScale(Scale scale) throws java.lang.Exception
ScaleManagerdeleteScale in interface ScaleManagerjava.lang.Exceptionpublic void deleteTransformation(AbstractTransformation transformation) throws java.lang.Exception
deleteTransformation in interface TransformationManagerjava.lang.Exceptionpublic void saveInstrument(Instrument instrument) throws java.lang.Exception
InstrumentManagersaveInstrument in interface InstrumentManagerjava.lang.Exceptionpublic void saveTransformation(AbstractTransformation transformation) throws java.lang.Exception
saveTransformation in interface TransformationManagerjava.lang.Exceptionpublic boolean isReadOnly()
Repository2isReadOnly in interface Repository2