net.charlesames.music.musicxml
Class MidiInstrument

java.lang.Object
  extended by net.charlesames.utility.common.Disposable
      extended by net.charlesames.music.musicxml.MusicXmlEntity
          extended by net.charlesames.music.musicxml.MidiInstrument

public class MidiInstrument
extends MusicXmlEntity

The MidiInstrument class implements the MusicXML <midi-instrument> element.

Author:
Charles Ames

Method Summary
 void dispose()
          Release resources engaged by this object, thus rendering it amenable to garbage collection.
 boolean equals(MusicXmlEntity other)
          Test if this MusicXML entity has the same content as another object.
static MidiInstrument fromXmlNode(org.w3c.dom.Element element, ScorePart container)
          Create a new MidiInstrument instance and fill it with loaded data.
 int getBank()
          Setter for the Bank property
 int getChannel()
          Setter for the Channel property
 int getElevation()
          Setter for the Elevation property
 java.lang.String getID()
          Getter for the ID property.
 int getKey()
          Setter for the Key property
 int getPan()
          Setter for the Pan property
 int getProgram()
          Setter for the Program property
 double getVolume()
          Setter for the Volume property
 void putXmlData(org.w3c.dom.Element element)
           
 void setBank(int bank)
          Setter for the Bank property.
 void setChannel(int channel)
          Setter for the Channel property.
 void setElevation(int degrees)
          Setter for the Elevation property.
 void setKey(int key)
          Setter for the Key property.
 void setPan(int degrees)
          Setter for the Pan property.
 void setProgram(int program)
          Setter for the Program property.
 void setVolume(double volume)
          Setter for the Volume property.
 org.w3c.dom.Node toXmlNode(org.w3c.dom.Node parent)
          Serialize the content of a MusicXML entity into an XML element.
 
Methods inherited from class net.charlesames.music.musicxml.MusicXmlEntity
getContainer, makeDirty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

dispose

public void dispose()
Description copied from class: Disposable
Release resources engaged by this object, thus rendering it amenable to garbage collection.

Specified by:
dispose in class Disposable

getID

public java.lang.String getID()
Getter for the ID property.

Returns:
The ID value.

getBank

public int getBank()
Setter for the Bank property

Returns:
The current Bank value.

setBank

public void setBank(int bank)
Setter for the Bank property.

Parameters:
bank - The intended Bank value.

getChannel

public int getChannel()
Setter for the Channel property

Returns:
The current Channel value.

setChannel

public void setChannel(int channel)
Setter for the Channel property.

Parameters:
channel - The intended Channel value.

getProgram

public int getProgram()
Setter for the Program property

Returns:
The current Program value.

setProgram

public void setProgram(int program)
Setter for the Program property.

Parameters:
program - The intended Program value.

getKey

public int getKey()
Setter for the Key property

Returns:
The current Key value.

setKey

public void setKey(int key)
Setter for the Key property.

Parameters:
key - The intended Key value.

getVolume

public double getVolume()
Setter for the Volume property

Returns:
The current Volume value.

setVolume

public void setVolume(double volume)
Setter for the Volume property.

Parameters:
volume - The intended Volume value.

getPan

public int getPan()
Setter for the Pan property

Returns:
The current Pan value.

setPan

public void setPan(int degrees)
Setter for the Pan property.

Parameters:
degrees - The intended Pan value.

getElevation

public int getElevation()
Setter for the Elevation property

Returns:
The current Elevation value.

setElevation

public void setElevation(int degrees)
Setter for the Elevation property.

Parameters:
degrees - The intended Elevation value.

fromXmlNode

public static MidiInstrument fromXmlNode(org.w3c.dom.Element element,
                                         ScorePart container)
Create a new MidiInstrument instance and fill it with loaded data.

Parameters:
element - The XML element that provides the MidiInstrument data
container - The ScorePart which will contain the new MidiInstrument instance.
Returns:
The newly created MidiInstrument instance.

toXmlNode

public org.w3c.dom.Node toXmlNode(org.w3c.dom.Node parent)
Description copied from class: MusicXmlEntity
Serialize the content of a MusicXML entity into an XML element.

Specified by:
toXmlNode in class MusicXmlEntity
Parameters:
parent - The XML element which is to receive the data.
Returns:
The newly created XML element.

putXmlData

public void putXmlData(org.w3c.dom.Element element)

equals

public boolean equals(MusicXmlEntity other)
Description copied from class: MusicXmlEntity
Test if this MusicXML entity has the same content as another object.

Overrides:
equals in class MusicXmlEntity
Parameters:
other - The other object.
Returns:
True if both objects have the same content; false otherwise.