movements
Class MovementGenerator
java.lang.Object
movements.MovementGenerator
- public class MovementGenerator
- extends java.lang.Object
DOCUMENT ME!
- Version:
- $Revision: 1.2 $
- Author:
- $author$
|
Method Summary |
DanceData |
buildDanceDataFromXML(org.xml.sax.InputSource source,
int ticksPerBar)
Creates a DanceData object from a dance specification given in XML format. |
java.util.Iterator |
getWarningsIterator()
Get the warnings, if any, that were generated during the previous call to the
buildDanceDataFromXML method. |
void |
Trace()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MovementGenerator
public MovementGenerator()
buildDanceDataFromXML
public DanceData buildDanceDataFromXML(org.xml.sax.InputSource source,
int ticksPerBar)
throws org.xml.sax.SAXException,
java.io.IOException,
AnimationException,
MusicException
- Creates a DanceData object from a dance specification given in XML format.
- Parameters:
source - The XML input. The XML must contain a dance specification.ticksPerBar - All times are given using a 'tick'. It is recommended
that you use 24 ticks per bar.
- Returns:
- A DanceData object. This object can provide the position of each person at any
point of time, including the direction in which the person is facing.
This object can also give the position of each hand at any point of time.
- Throws:
org.xml.sax.SAXException - An error occured parsing the XML. Either the XML is not well
formed or it did not pass the initial parsing.
java.io.IOException - An error occured reading the input.
AnimationException - An error occured in the XML. This error prevents animation.
Errors of this kind tend to be more complex. These errors are generated during
the final process of creating the DanceData object from the XML tree.
MusicException - An error occured in the music. The music is contained
in an element and must be in abc format. The abc format is a widely
used format and there are many country dance tunes available on the Internet
in abc format. Because of this, and because the country dance animation project
is more concerned with the XML describing the animation, the error messages
for errors in the music are very terse and not that helpful.
getWarningsIterator
public java.util.Iterator getWarningsIterator()
- Get the warnings, if any, that were generated during the previous call to the
buildDanceDataFromXML method.
- Returns:
- An iterator that iterates over a collection of
String objects.
Each String object contains the text for a single warning.
If there were no warnings then the iterator will iterate over an empty collection.
The iterator will remain valid even if a subsequent call to buildDanceDataFromXML
is made. The iterator will continue to iterate over the original collection of warnings.
Trace
public void Trace()
Copyright © 2003 Nigel Westbury