|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.utility.common.Disposable
net.charlesames.utility.entity.Entity
net.charlesames.utility.entity.WriteableEntity
net.charlesames.music.ensemble.EnsembleEntity
net.charlesames.music.ensemble.ContainerOfChoirsAndContours
net.charlesames.music.ensemble.EnsembleChoir
public class EnsembleChoir
Instances of the EnsembleChoir class define hierarchical groupings for voice specifications, contour specifications,
MIDI controls, and sub-choirs.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity |
|---|
EnsembleEntity.AttributeTable |
| Constructor Summary | |
|---|---|
EnsembleChoir(EnsembleEntity container,
int id,
java.lang.String name)
Constructor for EnsembleChoir instances |
|
| Method Summary | |
|---|---|
MidiControl |
addMidiControl(TypeOfMidiControl controlType)
Add a new MidiControl to a choir. |
boolean |
check(HtmlBuilder builder)
Check this component for errors and inconsistencies |
void |
checkNewContourID(int id)
Check if the indicated ID is usable for a new EnsembleContour. |
void |
checkNewContourIndex(int index)
Check if the indicated index is usable for a new EnsembleContour. |
void |
checkNewContourName(java.lang.String name)
Check if the indicated name is usable for a new EnsembleContour. |
EnsembleContour |
createContour(java.lang.String name,
int id,
CalculationMode calculationMode)
Add a new contour specification to a choir. |
MusicXmlPart |
createMusicXmlPart(java.lang.String name)
Create a new MusicXmlPart instance using the next available id. |
MusicXmlPart |
createMusicXmlPart(java.lang.String name,
int id)
Create a new MusicXmlPart instance. |
EnsembleContour |
createVelocityContour()
Add a standard Velocity EnsembleContour with a corresponding MIDI control. |
EnsembleVoice |
createVoice(java.lang.String voiceName)
Adds an EnsembleVoice to the choir using the next available voice ID. |
EnsembleVoice |
createVoice(java.lang.String voiceName,
int voiceID)
Adds an EnsembleVoice to the choir. |
static XmlSpec |
createXmlSpec()
Create an XML specification for the EnsembleChoir class. |
boolean |
equals(EnsembleEntity other)
Check if this entity has the same class and content as another entity. |
static EnsembleChoir |
fromXmlNode(org.w3c.dom.Element element,
ContainerOfChoirsAndContours container)
Create a new Choir instance and fill it with loaded data. |
static EnsembleChoir |
fromXmlNode(org.w3c.dom.Element element,
EnsembleInstrument instrument)
Create a new {code EnsembleChoir} instance and fill it with loaded data. |
EnsembleVoice |
getAnyVoice()
Searches for any voice specification defined under this Ensemble or Choir, or from any sub-choir. |
EnsembleContour |
getChildContour(int id)
Search by id for a EnsembleContour which is defined in any sub-choir of this choir. |
EnsembleContour |
getChildContour(java.lang.String name)
Search by name for a EnsembleContour which is defined in any sub-choir of this choir. |
MidiControl |
getChildControl(TypeOfMidiControl controlType)
Search by name for a MidiControl which is defined in any sub-choir of this choir. |
EnsembleContour |
getContour(int id)
Searches the EnsembleContours defined under this choir by id. |
EnsembleContour |
getContour(java.lang.String name)
Searches the EnsembleContours defined under this choir by name. |
java.util.SortedMap<java.lang.Integer,EnsembleContour> |
getContoursByID()
|
java.util.SortedMap<java.lang.String,EnsembleContour> |
getContoursByName()
|
int |
getDefaultContourID()
Generate a usable contour ID. |
java.lang.String |
getLongName()
Generates a long name which a user interface can use in the name field of an entity-creation dialog. |
MidiControl |
getMidiControl(TypeOfMidiControl controlType)
Search the MidiControls defined under this choir by control type. |
java.util.SortedMap<java.lang.String,MidiControl> |
getMidiControls()
|
int |
getMusicXmlPartGroupNumber()
Get the MusicXML part-group number. |
GroupSymbol |
getMusicXmlPartGroupSymbol()
Get the MusicXML part-group display type. |
java.util.SortedMap<java.lang.Integer,MusicXmlPart> |
getMusicXmlPartsByID()
Get the choir-specific collection of MusicXmlPart instances. |
java.util.SortedMap<java.lang.String,MusicXmlPart> |
getMusicXmlPartsByName()
Get the choir-specific collection of MusicXmlPart instances. |
EnsembleContour |
getParentContour(int id)
Search by id for a contour which is defined in this choir or one of its parents. |
EnsembleContour |
getParentContour(java.lang.String name)
Search by name for a EnsembleContour which is defined in this choir or one of its parents. |
MidiControl |
getParentControl(TypeOfMidiControl controlType)
Search by control type for a MidiControl which is defined in this choir or one of its parents. |
java.lang.String |
getPath()
Return a description of this entity and its containers. |
void |
getSubchoirPaths(java.util.List<java.lang.String> result)
Compile a list of sub-choir paths |
EnsembleVoice |
getVoice(java.lang.String name)
Searches the EnsembleVoices defined under this choir by name. |
java.util.SortedMap<java.lang.Integer,EnsembleVoice> |
getVoicesByID()
Get the collection of EnsembleVoice instances associated with this choir. |
java.util.SortedMap<java.lang.String,EnsembleVoice> |
getVoicesByName()
Get the collection of EnsembleVoice instances associated with this choir. |
boolean |
hasExistingContour(int id)
Check if this choir employs the indicated id. |
boolean |
hasExistingContour(java.lang.String name)
|
boolean |
hasExistingControl(TypeOfMidiControl controlType)
Tests if a MidiControl exists for a indicated controlType. |
void |
removeContour(java.lang.String name)
Remove a contour specification. |
void |
removeMidiControl(TypeOfMidiControl controlType)
|
void |
removeVoice(int id)
Remove an existing EnsembleVoice from the choir. |
void |
removeVoice(java.lang.String name)
Remove an existing EnsembleVoice from the choir. |
void |
resolve()
|
boolean |
setID(int id)
Setter for the ID property. |
void |
setMusicXmlPartGroupNumber(int musicXmlPartGroupNumber)
Set the MusicXML part-group number. |
void |
setMusicXmlPartGroupSymbol(GroupSymbol musicXmlPartGroupSymbol)
Set the MusicXML part-group display type. |
boolean |
setName(java.lang.String name)
Setter for the Name property. |
void |
shiftContourDown(int id)
Increments a contour's id by 1. |
void |
shiftContourUp(int id)
Decrements a contour specification's id by 1. |
void |
wipe()
Clear all data in this Entity instance. |
| Methods inherited from class net.charlesames.music.ensemble.ContainerOfChoirsAndContours |
|---|
checkNewChoirID, checkNewChoirName, clear, createChoir, getChoir, getChoirsByID, getChoirsByName, getContainer, getDefaultChoirID, getDefaultVoiceName, getEnsemble, hasChoirName, removeChoir, resequenceChoirs, shiftChoirDown, shiftChoirsDown, shiftChoirUp |
| Methods inherited from class net.charlesames.music.ensemble.EnsembleEntity |
|---|
buildDescription, copyToClipboard, createIndentCell, createXmlSpec, describeFeature, logError, predecessor, toString |
| Methods inherited from class net.charlesames.utility.entity.WriteableEntity |
|---|
clearXmlSpecs, createXmlSpec, getTagName, getXmlData, getXmlSpec, getXmlSpec, initializeXsd, isPersistent, logError, logError, makeDirty, putXmlData, save, setPersistent, setStatus, toXmlNode |
| Methods inherited from class net.charlesames.utility.entity.Entity |
|---|
decrementReferenceCount, dereferenceHandle, dispose, equals, getHandle, getID, getName, getReferenceCount, getStatus, getText, hasContainer, incrementReferenceCount, isModifiable, methodHasOverride, predecessor, resequenceEntities, setContainer, setModifiable, shiftEntitiesDown, shiftEntityDown, shiftEntityUp, successor |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EnsembleChoir(EnsembleEntity container,
int id,
java.lang.String name)
EnsembleChoir instances
container - Can be either an Ensemble or a EnsembleChoirid - Must be unique under the container.name - Must be unique under the container.| Method Detail |
|---|
public java.lang.String getLongName()
public boolean setID(int id)
EntityID property.
setID in class WriteableEntityid - The intended ID value.
ID change actually happened; false otherwise.public boolean setName(java.lang.String name)
EntityName property.
setName in class WriteableEntityname - The intended Name value.
Name change actually happened; false otherwise.public int getMusicXmlPartGroupNumber()
public void setMusicXmlPartGroupNumber(int musicXmlPartGroupNumber)
musicXmlPartGroupNumber - The intended MusicXML part-group number.public GroupSymbol getMusicXmlPartGroupSymbol()
public void setMusicXmlPartGroupSymbol(GroupSymbol musicXmlPartGroupSymbol)
musicXmlPartGroupSymbol - The assigned MusicXML part-group display type; none suppresses group creation.public java.lang.String getPath()
Entity
getPath in interface EntityContainergetPath in class Entitypublic java.util.SortedMap<java.lang.Integer,EnsembleVoice> getVoicesByID()
EnsembleVoice instances associated with this choir.
EnsembleVoice instances, sorted by ID.public java.util.SortedMap<java.lang.String,EnsembleVoice> getVoicesByName()
EnsembleVoice instances associated with this choir.
EnsembleVoice instances, sorted by name.public java.util.SortedMap<java.lang.String,EnsembleContour> getContoursByName()
public java.util.SortedMap<java.lang.Integer,EnsembleContour> getContoursByID()
EnsembleContour instances (contour specifications) defined by this choir, indexed by id.public EnsembleContour getParentContour(java.lang.String name)
EnsembleContour which is defined in this choir or one of its parents.
name - The indicated name.
public EnsembleContour getChildContour(java.lang.String name)
EnsembleContour which is defined in any sub-choir of this choir.
name - The indicated name.
public boolean hasExistingContour(java.lang.String name)
name - The indicated name.
EnsembleContour or child EnsembleContour with the indicated name;
false otherwise.public void checkNewContourName(java.lang.String name)
ContainerOfChoirsAndContoursEnsembleContour.
checkNewContourName in class ContainerOfChoirsAndContoursname - The indicated name.public EnsembleContour getParentContour(int id)
id - The indicated id.
public EnsembleContour getChildContour(int id)
EnsembleContour which is defined in any sub-choir of this choir.
id - The indicated id.
public boolean hasExistingContour(int id)
id - The indicated id.
EnsembleContour or child EnsembleContour with the indicated id;
false otherwise.public void checkNewContourID(int id)
EnsembleContour.
checkNewContourID in class ContainerOfChoirsAndContoursid - The indicated ID.public void checkNewContourIndex(int index)
ContainerOfChoirsAndContoursEnsembleContour.
checkNewContourIndex in class ContainerOfChoirsAndContoursindex - The indicated index.public int getDefaultContourID()
public EnsembleContour createContour(java.lang.String name,
int id,
CalculationMode calculationMode)
name - The new contour name. May not already be used by any parent or child choir.id - The new contour id. May not already be used by any parent or child choir.calculationMode -
EnsembleContour instance.public EnsembleContour createVelocityContour()
EnsembleContour with a corresponding MIDI control.
EnsembleContour instance.public void removeContour(java.lang.String name)
name - The contour name.public EnsembleContour getContour(java.lang.String name)
EnsembleContours defined under this choir by name.
name - The indicated name.
public EnsembleContour getContour(int id)
EnsembleContours defined under this choir by id.
id - The indicated id.
public void shiftContourUp(int id)
id - The contour id.public void shiftContourDown(int id)
id - The contour id.
public EnsembleVoice createVoice(java.lang.String voiceName,
int voiceID)
EnsembleVoice to the choir.
voiceName - The new voice name. May not already be used by any parent or child choir.voiceID - The new voice id. May not already be used by any parent or child choir.
EnsembleVoice instance.public EnsembleVoice createVoice(java.lang.String voiceName)
EnsembleVoice to the choir using the next available voice ID.
voiceName - The new voice name. May not already be used by any parent or child choir.
EnsembleVoice instance.public void removeVoice(java.lang.String name)
EnsembleVoice from the choir.
name - The voice name.public void removeVoice(int id)
EnsembleVoice from the choir.
id - The voice id.public EnsembleVoice getVoice(java.lang.String name)
EnsembleVoices defined under this choir by name.
name - The indicated name.
public EnsembleVoice getAnyVoice()
ContainerOfChoirsAndContours
getAnyVoice in class ContainerOfChoirsAndContourspublic java.util.SortedMap<java.lang.String,MusicXmlPart> getMusicXmlPartsByName()
MusicXmlPart instances.
MusicXmlPart instances indexed by name.public java.util.SortedMap<java.lang.Integer,MusicXmlPart> getMusicXmlPartsByID()
MusicXmlPart instances.
MusicXmlPart instances indexed by id.public void resolve()
resolve in class ContainerOfChoirsAndContourspublic boolean check(HtmlBuilder builder)
WriteableEntity
check in class ContainerOfChoirsAndContoursbuilder - Accumulates an HTML formatted record of each error or inconsistency found.
public java.util.SortedMap<java.lang.String,MidiControl> getMidiControls()
MidiControls defined under this choir, indexed by control name.public MidiControl getParentControl(TypeOfMidiControl controlType)
MidiControl which is defined in this choir or one of its parents.
controlType - The indicated control type.
MidiControl with the indicated control type (null if not found).public MidiControl getChildControl(TypeOfMidiControl controlType)
MidiControl which is defined in any sub-choir of this choir.
controlType - The indicated control type.
MidiControl found with the indicated name (null if not found).public boolean hasExistingControl(TypeOfMidiControl controlType)
MidiControl exists for a indicated controlType.
controlType - The indicated controlType.
public MidiControl addMidiControl(TypeOfMidiControl controlType)
MidiControl to a choir.
controlType - The new control's type. May not already be used by any parent or child choir.
MidiControl.public void removeMidiControl(TypeOfMidiControl controlType)
controlType - public MidiControl getMidiControl(TypeOfMidiControl controlType)
MidiControls defined under this choir by control type.
controlType - The indicated control type.
MidiControl with the indicated control type (null if not found).
public MusicXmlPart createMusicXmlPart(java.lang.String name,
int id)
MusicXmlPart instance.
name - The new MusicXML part name. Must not be used by any existing MusicXmlPart.id - The new MusicXML part id. Must not be used by any existing MusicXmlPart.
MusicXmlPart instance.
java.lang.IllegalArgumentException - If the ensemble already has a MusicXmlPart with the indicated id or name.public MusicXmlPart createMusicXmlPart(java.lang.String name)
MusicXmlPart instance using the next available id.
name - The new MusicXML part name. Must not be used by any existing MusicXmlPart.
MusicXmlPart instance.
public static EnsembleChoir fromXmlNode(org.w3c.dom.Element element,
ContainerOfChoirsAndContours container)
element - The XML element that provides the Choir datacontainer - The Choir or Ensemble which will contain the new Choir.
public void wipe()
EntityEntity instance.
wipe in class ContainerOfChoirsAndContourspublic void getSubchoirPaths(java.util.List<java.lang.String> result)
result - The list which is to receive each path string.
public static EnsembleChoir fromXmlNode(org.w3c.dom.Element element,
EnsembleInstrument instrument)
element - The XML element that provides the {code EnsembleChoir} datainstrument - The {link EnsembleInstrument} which will contain the new {code EnsembleChoir}.
public static XmlSpec createXmlSpec()
EnsembleChoir class.
XmlSpec instance.
java.lang.RuntimeException - when an XmlSpec instance already exists for the EnsembleChoir class.public boolean equals(EnsembleEntity other)
EnsembleEntity
equals in class ContainerOfChoirsAndContoursother - The other entity.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||