net.charlesames.music.musicxml
Class PartGroup

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

public class PartGroup
extends MusicXmlEntity

The PartGroup class implements the MusicXML <part-group> 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 PartGroup fromXmlNode(org.w3c.dom.Element element, MusicXmlEntity container)
          Create a new PartGroup instance and fill it with loaded data.
 java.lang.String getAbbreviation()
          Getter for the Abbreviation property.
 YesNo getBarline()
          Getter for the Barline property.
static PartGroup getInstance(MusicXmlEntity container)
          Create a new PartGroup instance.
 java.lang.String getName()
          Getter for the Name property.
 int getNumber()
          Getter for the Number property.
 GroupSymbol getSymbol()
          Getter for the Symbol property.
 StartStop getType()
          Getter for the Type property.
 void putXmlData(org.w3c.dom.Element element)
           
 void setAbbreviation(java.lang.String abbreviation)
          Setter for the Abbreviation property.
 void setBarline(YesNo barline)
          Setter for the Barline property.
 void setName(java.lang.String name)
          Setter for the Name property.
 void setNumber(int number)
          Setter for the Number property.
 void setSymbol(GroupSymbol symbol)
          Setter for the Symbol property.
 void setType(StartStop type)
          Setter for the Type 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

getInstance

public static PartGroup getInstance(MusicXmlEntity container)
Create a new PartGroup instance.

Parameters:
container - The MusicXmlEntity which will contain the new PartGroup instance.
Returns:
The newly created PartGroup instance.

getName

public java.lang.String getName()
Getter for the Name property.

Returns:
The current part-group name.

setName

public void setName(java.lang.String name)
Setter for the Name property.

Parameters:
name - The intended part-group name.

getAbbreviation

public java.lang.String getAbbreviation()
Getter for the Abbreviation property.

Returns:
The current part-group name abbreviation.

setAbbreviation

public void setAbbreviation(java.lang.String abbreviation)
Setter for the Abbreviation property.

Parameters:
abbreviation - The intended part-group name abbreviation.

getNumber

public int getNumber()
Getter for the Number property.

Returns:
The current part-group identifier.

setNumber

public void setNumber(int number)
Setter for the Number property.

Parameters:
number - The intended part-group identifier.

getType

public StartStop getType()
Getter for the Type property.

Returns:
The current part-group type.

setType

public void setType(StartStop type)
Setter for the Type property.

Parameters:
type - The intended part-group type.

getSymbol

public GroupSymbol getSymbol()
Getter for the Symbol property.

Returns:
The current part-group symbol value.

setSymbol

public void setSymbol(GroupSymbol symbol)
Setter for the Symbol property.

Parameters:
symbol - The intended part-group symbol.

getBarline

public YesNo getBarline()
Getter for the Barline property.

Returns:
The current part-group barline indicator.

setBarline

public void setBarline(YesNo barline)
Setter for the Barline property.

Parameters:
barline - The intended part-group barline indicator.

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)

fromXmlNode

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

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

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.