musiccreator
Class DefinitionArray

java.lang.Object
  extended by musiccreator.DefinitionArray

public class DefinitionArray
extends java.lang.Object


Constructor Summary
DefinitionArray(java.lang.String filename)
          Creates a new instance of DefinitionArray.
 
Method Summary
 void clear()
          Clears the definition tree prior to loading a new one.
 ChordDef get(int whichGroup, int whichChordDef)
          Returns a specific chord from a specific chord group
 ChordDef getNextChord()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefinitionArray

public DefinitionArray(java.lang.String filename)
                throws java.io.FileNotFoundException
Creates a new instance of DefinitionArray. This constructor reads the file specified by filename into a DOM tree. It then implements a recursive-descent parser to parse each node of the tree into an internal structure.

Parameters:
filename - The XML file to read.
Throws:
java.io.FileNotFoundException
Method Detail

getNextChord

public ChordDef getNextChord()

get

public ChordDef get(int whichGroup,
                    int whichChordDef)
Returns a specific chord from a specific chord group

Parameters:
whichGroup - Group to search
whichChordDef - Index of chord definition
Returns:
Chord definition at [whichGroup][whichChordDef]

clear

public void clear()
Clears the definition tree prior to loading a new one.