net.charlesames.music.musicxml
Class MusicXmlEntity

java.lang.Object
  extended by net.charlesames.utility.common.Disposable
      extended by net.charlesames.music.musicxml.MusicXmlEntity
Direct Known Subclasses:
Beam, Clef, Credit, CreditWords, Defaults, DirectionType, Identification, IdentificationCreator, IdentificationEncoding, IdentificationEncodingSupport, KeySignature, Measure, MeasurePrint, MidiInstrument, MusicXmlScore, Notation, PageLayout, PageMargins, Part, PartGroup, PedalTuning, Pitch, Scaling, ScoreInstrument, ScorePart, Sound, StaffLayout, Stem, SystemLayout, SystemMargins, TimedEvent, TimeSignature, Unpitched, Wedge

public abstract class MusicXmlEntity
extends Disposable

This abstract class serves as base for all music.musicxml classes.

Author:
Charles Ames

Method Summary
 boolean equals(MusicXmlEntity other)
          Test if this MusicXML entity has the same content as another object.
 MusicXmlEntity getContainer()
          Get the parent object.
 void makeDirty()
          Signal that the document has experienced a change which should be saved to the MusicXML file.
abstract  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.utility.common.Disposable
dispose
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContainer

public MusicXmlEntity getContainer()
Get the parent object.

Returns:
The parent object.

toXmlNode

public abstract org.w3c.dom.Node toXmlNode(org.w3c.dom.Node parent)
Serialize the content of a MusicXML entity into an XML element.

Parameters:
parent - The XML element which is to receive the data.
Returns:
The newly created XML element.

makeDirty

public void makeDirty()
Signal that the document has experienced a change which should be saved to the MusicXML file.


equals

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

Parameters:
other - The other object.
Returns:
True if both objects have the same content; false otherwise.