net.charlesames.music.ensemble
Class EnsembleInstrumentVoice

java.lang.Object
  extended by net.charlesames.utility.common.Disposable
      extended by net.charlesames.utility.entity.Entity
          extended by net.charlesames.utility.entity.WriteableEntity
              extended by net.charlesames.music.ensemble.EnsembleEntity
                  extended by net.charlesames.music.ensemble.EnsembleInstrumentVoice
All Implemented Interfaces:
EntityContainer

public class EnsembleInstrumentVoice
extends EnsembleEntity

The EnsembleInstrumentVoice class implements a cross reference between an EnsembleInstrument and an EnsembleVoice which is capable of using the instrument.

Author:
Charles Ames

Nested Class Summary
 
Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity
EnsembleEntity.AttributeTable
 
Constructor Summary
EnsembleInstrumentVoice(EnsembleInstrument container, int id)
          Constructor for EnsembleInstrumentVoice instances.
 
Method Summary
static XmlSpec createXmlSpec()
          Create an XML specification for the EnsembleInstrumentVoice class.
static EnsembleInstrumentVoice fromXmlNode(org.w3c.dom.Element element, EnsembleInstrument instrument)
          Create a new EnsembleInstrumentVoice instance and fill it with loaded data.
 EnsembleInstrument getContainer()
          Getter for the Container property.
 EnsembleVoice getVoice()
          Get the EnsembleVoice identified by this cross-reference object.
 void wipe()
          Clear all data in this Entity instance.
 
Methods inherited from class net.charlesames.music.ensemble.EnsembleEntity
buildDescription, copyToClipboard, createIndentCell, createXmlSpec, describeFeature, equals, getEnsemble, logError, predecessor, toString
 
Methods inherited from class net.charlesames.utility.entity.WriteableEntity
check, clearXmlSpecs, createXmlSpec, getTagName, getXmlData, getXmlSpec, getXmlSpec, initializeXsd, isPersistent, logError, logError, makeDirty, putXmlData, save, setID, setName, setPersistent, setStatus, toXmlNode
 
Methods inherited from class net.charlesames.utility.entity.Entity
decrementReferenceCount, dereferenceHandle, dispose, equals, getHandle, getID, getName, getPath, 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

EnsembleInstrumentVoice

public EnsembleInstrumentVoice(EnsembleInstrument container,
                               int id)
Constructor for EnsembleInstrumentVoice instances.

Parameters:
container - The EnsembleInstrument which contains this voice.
id - The voice id.
Method Detail

getContainer

public EnsembleInstrument getContainer()
Description copied from class: Entity
Getter for the Container property.

Overrides:
getContainer in class EnsembleEntity
Returns:
The assigned Container value.

getVoice

public EnsembleVoice getVoice()
Get the EnsembleVoice identified by this cross-reference object.

Returns:
The EnsembleVoice identified by this cross-reference object.

wipe

public void wipe()
Description copied from class: Entity
Clear all data in this Entity instance.

Overrides:
wipe in class Entity

fromXmlNode

public static EnsembleInstrumentVoice fromXmlNode(org.w3c.dom.Element element,
                                                  EnsembleInstrument instrument)
Create a new EnsembleInstrumentVoice instance and fill it with loaded data.

Parameters:
element - The XML element that provides the EnsembleInstrumentVoice data
instrument - The EnsembleInstrument which will contain the new EnsembleInstrumentVoice.
Returns:
The newly created EnsembleInstrumentVoice instance.

createXmlSpec

public static XmlSpec createXmlSpec()
Create an XML specification for the EnsembleInstrumentVoice class.

Returns:
The newly created XmlSpec instance.
Throws:
java.lang.RuntimeException - when an XmlSpec instance already exists for the EnsembleInstrumentVoice class.