parsedtree
Class XMLParser.DanceProcessor

java.lang.Object
  extended byparsedtree.XMLParser.SAXEventProcessor
      extended byparsedtree.XMLParser.DefineFigureProcessor
          extended byparsedtree.XMLParser.DanceProcessor
Enclosing class:
XMLParser

private class XMLParser.DanceProcessor
extends XMLParser.DefineFigureProcessor

Process events that occur within a <dance> element.

Version:
$Revision: 1.3 $
Author:
$author$

Field Summary
(package private)  java.util.Hashtable directionMap
          Map of named directions.
protected  FigureDefinition figureDefinition
           
protected  XMLParser.SAXEventProcessor parent
           
protected  ParticipantsInScope participantsInScope
          List of all paricipants in this figure and all units that are formed within this figure.
(package private)  java.util.Hashtable positionMap
          Map of named positions.
 
Constructor Summary
(package private) XMLParser.DanceProcessor(XMLParser.SAXEventProcessor parent)
          Creates a new DanceProcessor object.
 
Method Summary
 void characters(char[] ch, int start, int length)
          DOCUMENT ME!
 XMLParser.SAXEventProcessor EndElement(java.lang.String name)
          DOCUMENT ME!
 void startElement(java.lang.String name, org.xml.sax.Attributes atts)
          DOCUMENT ME! Process elements that occur within a <dance> element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

figureDefinition

protected FigureDefinition figureDefinition

participantsInScope

protected ParticipantsInScope participantsInScope
List of all paricipants in this figure and all units that are formed within this figure. The units are added and removed from this list as they are formed and disbanded. The participants are always in the list. (Note: if a participant is taking part in a unit at a given point of time then the paricipant cannot take part in any action on his/her own. So just because a participant is in the list does not mean he/she is allowed as a participant. You might think it would be sensible to remove people from this list while they are forming part of a unit. However that would make error messages less helpful because you would get a 'not found' error rather than a 'already participating in a unit' error).


positionMap

java.util.Hashtable positionMap
Map of named positions. Positions (usually specified as a pair of cartesian co-ordinates) can be given names using a <define_position> element. These names can then be used instead of a pair of numeric values in the 'place' attributes.


directionMap

java.util.Hashtable directionMap
Map of named directions. Directions (usually specified by the angle in degrees from a line going in a downwards direction) can be given names using a <define_direction> element. These names can then be used instead of a numeric value in the 'direction' and 'facing' attributes.


parent

protected XMLParser.SAXEventProcessor parent
Constructor Detail

XMLParser.DanceProcessor

XMLParser.DanceProcessor(XMLParser.SAXEventProcessor parent)
Creates a new DanceProcessor object.

Parameters:
parent - DOCUMENT ME!
Method Detail

startElement

public void startElement(java.lang.String name,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
DOCUMENT ME! Process elements that occur within a <dance> element.

Overrides:
startElement in class XMLParser.DefineFigureProcessor
Parameters:
name - The name of the element found inside the <dance> element.
atts - A map object that contains the names and values of all the attributes for the element.
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

EndElement

public XMLParser.SAXEventProcessor EndElement(java.lang.String name)
                                       throws org.xml.sax.SAXException
DOCUMENT ME!

Overrides:
EndElement in class XMLParser.DefineFigureProcessor
Parameters:
name - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
DOCUMENT ME!

Overrides:
characters in class XMLParser.SAXEventProcessor
Parameters:
ch - DOCUMENT ME!
start - DOCUMENT ME!
length - DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!


Copyright © 2003 Nigel Westbury