parsedtree
Class XMLParser.DefineFigureProcessor

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

private class XMLParser.DefineFigureProcessor
extends XMLParser.SAXEventProcessor

Process events that occur within a <define_figure> 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.DefineFigureProcessor(XMLParser.SAXEventProcessor parent, FigureDefinition figureDefinition, java.util.Hashtable positionMapFromOuterFigure, java.util.Hashtable directionMapFromOuterFigure)
          Creates a new DefineFigureProcessor 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)
          Process elements that occur within a <define_figure> 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.DefineFigureProcessor

XMLParser.DefineFigureProcessor(XMLParser.SAXEventProcessor parent,
                                FigureDefinition figureDefinition,
                                java.util.Hashtable positionMapFromOuterFigure,
                                java.util.Hashtable directionMapFromOuterFigure)
Creates a new DefineFigureProcessor object.

Parameters:
parent - DOCUMENT ME!
figureDefinition - DOCUMENT ME!
positionMapFromOuterFigure - If this figure is defined so that it can be danced in only a single fixed location then postition definitions defined in the outer figure can be used inside the inner figure and this parameter will be a map of such postion definitions. If this figure is moveable then this parameter will be null.
directionMapFromOuterFigure - If this figure is defined so that it can be danced in only a single fixed location then direction definitions defined in the outer figure can be used inside the inner figure and this parameter will be a map of such direction definitions. If this figure is moveable then this parameter will be null.
Method Detail

startElement

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

Specified by:
startElement in class XMLParser.SAXEventProcessor
Parameters:
name - The name of the element found inside the <define_figure> 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!

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!

EndElement

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

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


Copyright © 2003 Nigel Westbury