net.charlesames.music.ensemble
Class NoteListOpcode

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.NoteListOpcode
All Implemented Interfaces:
EntityContainer

public class NoteListOpcode
extends EnsembleEntity

NoteListOpcode objects define the text used to identify various types of statement in MUSIC-N note lists.

Author:
Charles Ames

Nested Class Summary
 
Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity
EnsembleEntity.AttributeTable
 
Constructor Summary
NoteListOpcode(Ensemble ensemble, TypeOfOpcode opcodeType, java.lang.String defaultValue)
          Constructor for NoteListOpcode instances.
 
Method Summary
static XmlSpec createXmlSpec()
          Create an XML specification for the EnsembleVoiceMidiData class.
 boolean equals(EnsembleEntity other)
          Check if this entity has the same class and content as another entity.
static NoteListOpcode fromXmlNode(org.w3c.dom.Element element, Ensemble ensemble)
          Dereference a NoteListOpcode instance and fill it with loaded data.
 java.lang.String getDefaultValue()
          Getter for the DefaultValue property.
 TypeOfOpcode getOpcodeType()
          Getter for the OpcodeType property.
 java.lang.String getPath()
          Return a description of this entity and its containers.
 java.lang.String getValue()
          Getter for the Value property.
 void setValue(java.lang.String value)
          Getter for the Value property.
 
Methods inherited from class net.charlesames.music.ensemble.EnsembleEntity
buildDescription, copyToClipboard, createIndentCell, createXmlSpec, describeFeature, getContainer, 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, getReferenceCount, getStatus, getText, hasContainer, incrementReferenceCount, isModifiable, methodHasOverride, predecessor, resequenceEntities, setContainer, setModifiable, shiftEntitiesDown, shiftEntityDown, shiftEntityUp, successor, wipe
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NoteListOpcode

public NoteListOpcode(Ensemble ensemble,
                      TypeOfOpcode opcodeType,
                      java.lang.String defaultValue)
Constructor for NoteListOpcode instances.

Parameters:
ensemble - The Ensemble under which the NoteListOpcode is created.
opcodeType - The opcode type. Each NoteListOpcode defined under an Ensemble must be of a unique type.
defaultValue - The default value.
Method Detail

getOpcodeType

public TypeOfOpcode getOpcodeType()
Getter for the OpcodeType property.

Returns:
The opcode type.

getValue

public java.lang.String getValue()
Getter for the Value property. The Value property contains the actual text used to generate note-list statements.

Returns:
The current value.

setValue

public void setValue(java.lang.String value)
Getter for the Value property. The Value property contains the actual text used to generate note-list statements.

Parameters:
value - The intended value.

getDefaultValue

public java.lang.String getDefaultValue()
Getter for the DefaultValue property.

Returns:
The default value.

getPath

public java.lang.String getPath()
Description copied from class: Entity
Return a description of this entity and its containers.

Specified by:
getPath in interface EntityContainer
Overrides:
getPath in class Entity
Returns:
A description of this entity and its containers.

fromXmlNode

public static NoteListOpcode fromXmlNode(org.w3c.dom.Element element,
                                         Ensemble ensemble)
Dereference a NoteListOpcode instance and fill it with loaded data.

Parameters:
element - The XML element that provides the NoteListOpcode data
ensemble - The Ensemble which contains the NoteListOpcode instance.
Returns:
The dereferenced NoteListOpcode instance.

createXmlSpec

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

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

equals

public boolean equals(EnsembleEntity other)
Description copied from class: EnsembleEntity
Check if this entity has the same class and content as another entity.

Overrides:
equals in class EnsembleEntity
Parameters:
other - The other entity.
Returns:
True if the two entities have the same class and content; false otherwise.