public class Repository2Collection extends java.lang.Object implements Repository2, Disposable
| Constructor and Description |
|---|
Repository2Collection(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRepository(Repository2 repository) |
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) |
void |
dispose()
Dispose the resources associated to an object
|
protected Repository2 |
findDefaultWriteRepository() |
java.util.ArrayList<AbstractMidiImporter> |
findImporter(Scale destination)
look for an importer for a destination Scale
|
<T> java.util.List<T> |
findRepository(java.lang.Class<T> repositoryType)
Find a repository by it's type
|
Repository2 |
findRepositoryAssociatedTo(AbstractMidiImporter importer) |
Repository2 |
findRepositoryAssociatedTo(Instrument instrument) |
Repository2 |
findRepositoryAssociatedTo(Scale scale) |
java.util.ArrayList<AbstractTransformation> |
findTransposition(Scale source,
Scale destination)
Look for all the transformation for a source and a destination scale
|
Instrument[] |
getInstrument(Scale scale)
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
|
Repository2 |
getRepository(int index) |
int |
getRepositoryCount() |
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()
return the merge of repositories readonly property
|
Instrument[] |
listInstruments()
Get All instruments
|
void |
removeRepository(Repository2 repository) |
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 getLabel()
Repository2getLabel in interface Repository2public void addRepository(Repository2 repository)
public Repository2 getRepository(int index)
public int getRepositoryCount()
public void removeRepository(Repository2 repository)
public void addRepositoryChangedListener(RepositoryChangedListener listener)
Repository2addRepositoryChangedListener in interface Repository2public void removeRepositoryChangedListener(RepositoryChangedListener listener)
Repository2removeRepositoryChangedListener in interface Repository2public java.lang.String getName()
Repository2getName in interface Repository2public boolean isReadOnly()
isReadOnly in interface Repository2public void deleteInstrument(Instrument instrument) throws java.lang.Exception
InstrumentManagerdeleteInstrument in interface InstrumentManagerjava.lang.Exceptionpublic Instrument getInstrument(java.lang.String name)
InstrumentManagergetInstrument in interface InstrumentManagerpublic Instrument[] getInstrument(Scale scale)
InstrumentManagergetInstrument in interface InstrumentManagerpublic Instrument[] listInstruments()
InstrumentManagerlistInstruments in interface InstrumentManagerpublic void saveInstrument(Instrument instrument) throws java.lang.Exception
InstrumentManagersaveInstrument in interface InstrumentManagerjava.lang.Exceptionpublic void deleteScale(Scale scale) throws java.lang.Exception
ScaleManagerdeleteScale in interface ScaleManagerjava.lang.Exceptionpublic Scale getScale(java.lang.String name)
ScaleManagergetScale in interface ScaleManagerpublic java.lang.String[] getScaleNames()
ScaleManagergetScaleNames in interface ScaleManagerpublic void saveScale(Scale scale) throws java.lang.Exception
ScaleManagersaveScale in interface ScaleManagerjava.lang.Exceptionpublic void deleteImporter(AbstractMidiImporter importer) throws java.lang.Exception
TransformationManagerdeleteImporter in interface TransformationManagerjava.io.IOExceptionjava.lang.Exceptionpublic void deleteTransformation(AbstractTransformation transformation) throws java.lang.Exception
deleteTransformation in interface TransformationManagerjava.lang.Exceptionpublic 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 saveImporter(AbstractMidiImporter importer) throws java.lang.Exception
saveImporter in interface TransformationManagerjava.lang.Exceptionpublic void saveTransformation(AbstractTransformation transformation) throws java.lang.Exception
saveTransformation in interface TransformationManagerjava.lang.Exceptionprotected Repository2 findDefaultWriteRepository()
public Repository2 findRepositoryAssociatedTo(Scale scale)
public Repository2 findRepositoryAssociatedTo(Instrument instrument)
public Repository2 findRepositoryAssociatedTo(AbstractMidiImporter importer)
public <T> java.util.List<T> findRepository(java.lang.Class<T> repositoryType)
repositoryType - the wished repositoriespublic void dispose()
Disposabledispose in interface Disposable