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()
Repository2
getLabel
in interface Repository2
public void addRepository(Repository2 repository)
public Repository2 getRepository(int index)
public int getRepositoryCount()
public void removeRepository(Repository2 repository)
public void addRepositoryChangedListener(RepositoryChangedListener listener)
Repository2
addRepositoryChangedListener
in interface Repository2
public void removeRepositoryChangedListener(RepositoryChangedListener listener)
Repository2
removeRepositoryChangedListener
in interface Repository2
public java.lang.String getName()
Repository2
getName
in interface Repository2
public boolean isReadOnly()
isReadOnly
in interface Repository2
public void deleteInstrument(Instrument instrument) throws java.lang.Exception
InstrumentManager
deleteInstrument
in interface InstrumentManager
java.lang.Exception
public Instrument getInstrument(java.lang.String name)
InstrumentManager
getInstrument
in interface InstrumentManager
public Instrument[] getInstrument(Scale scale)
InstrumentManager
getInstrument
in interface InstrumentManager
public Instrument[] listInstruments()
InstrumentManager
listInstruments
in interface InstrumentManager
public void saveInstrument(Instrument instrument) throws java.lang.Exception
InstrumentManager
saveInstrument
in interface InstrumentManager
java.lang.Exception
public void deleteScale(Scale scale) throws java.lang.Exception
ScaleManager
deleteScale
in interface ScaleManager
java.lang.Exception
public Scale getScale(java.lang.String name)
ScaleManager
getScale
in interface ScaleManager
public java.lang.String[] getScaleNames()
ScaleManager
getScaleNames
in interface ScaleManager
public void saveScale(Scale scale) throws java.lang.Exception
ScaleManager
saveScale
in interface ScaleManager
java.lang.Exception
public void deleteImporter(AbstractMidiImporter importer) throws java.lang.Exception
TransformationManager
deleteImporter
in interface TransformationManager
java.io.IOException
java.lang.Exception
public void deleteTransformation(AbstractTransformation transformation) throws java.lang.Exception
deleteTransformation
in interface TransformationManager
java.lang.Exception
public java.util.ArrayList<AbstractMidiImporter> findImporter(Scale destination)
TransformationManager
findImporter
in interface TransformationManager
public java.util.ArrayList<AbstractTransformation> findTransposition(Scale source, Scale destination)
TransformationManager
findTransposition
in interface TransformationManager
source
- la gamme source de la transpositiondestination
- la gamme destination de la transpositionpublic void saveImporter(AbstractMidiImporter importer) throws java.lang.Exception
saveImporter
in interface TransformationManager
java.lang.Exception
public void saveTransformation(AbstractTransformation transformation) throws java.lang.Exception
saveTransformation
in interface TransformationManager
java.lang.Exception
protected 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()
Disposable
dispose
in interface Disposable