net.charlesames.music.ensemble
Class EnsembleCredit

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

public class EnsembleCredit
extends EnsembleEntity

The EnsembleCredit class documents information such as the composer name and copyright date. The parent of a EnsembleCredit instance is always an Ensemble.

Author:
Charles Ames

Nested Class Summary
 
Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity
EnsembleEntity.AttributeTable
 
Method Summary
 EnsembleCredit copy(Ensemble ensemble, int id, java.lang.String name)
          Create a new Credit instance and copy the attributes of the present Credit instance into the new instance.
static XmlSpec createXmlSpec()
          Create an XML specification for the EnsembleCredit class.
 boolean equals(EnsembleEntity other)
          Test if this Credit instance has the same attributes as another credit instance.
static EnsembleCredit fromXmlNode(org.w3c.dom.Element element, Ensemble ensemble)
          Create a new Credit instance and fill it with loaded data.
 java.lang.String getContent()
           
 java.lang.String getPath()
          Return a description of this entity and its containers.
 void getXmlData(org.w3c.dom.Element element)
          Read data from an XML Element.
 void setContent(java.lang.String content)
           
 void wipe()
          Clear all data in this Entity instance.
 
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, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

copy

public EnsembleCredit copy(Ensemble ensemble,
                           int id,
                           java.lang.String name)
Create a new Credit instance and copy the attributes of the present Credit instance into the new instance.

Parameters:
ensemble - The Ensemble within which the new Credit will be created.
id - The new credit id. Must be unique for credits within the ensemble.
name - The new credit name. Must be unique for credits within the ensemble.
Returns:
The newly created Credit instance.

getContent

public java.lang.String getContent()
Returns:
The current credit text.

setContent

public void setContent(java.lang.String content)
Parameters:
content - The desired credit text.

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.

getXmlData

public void getXmlData(org.w3c.dom.Element element)
Description copied from class: WriteableEntity
Read data from an XML Element.

Overrides:
getXmlData in class WriteableEntity
Parameters:
element - The source Element.

equals

public boolean equals(EnsembleEntity other)
Test if this Credit instance has the same attributes as another credit instance.

Overrides:
equals in class EnsembleEntity
Parameters:
other - The other Credit instance.
Returns:
True if the two Credit instances share the same attributes; false otherwise.

wipe

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

Overrides:
wipe in class Entity

fromXmlNode

public static EnsembleCredit fromXmlNode(org.w3c.dom.Element element,
                                         Ensemble ensemble)
Create a new Credit instance and fill it with loaded data.

Parameters:
element - The XML element that provides the Credit data
ensemble - The Ensemble which will contain the new Credit.
Returns:
The newly created Credit instance.

createXmlSpec

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

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