PrintGame
Class LabyrinthXMLContentHandler

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byPrintGame.LabyrinthXMLContentHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class LabyrinthXMLContentHandler
extends org.xml.sax.helpers.DefaultHandler


Constructor Summary
LabyrinthXMLContentHandler()
           
 
Method Summary
 void characters(char[] charArray, int start, int length)
          ----------------------------------------------------------------------------- Receive notification of character data inside an element.
 void convertLabyrinthData()
          ----------------------------------------------------------------------------- Generates a twodimensional character-array which is an ASCII representation of the labyrinthfield.
 void endDocument()
          ----------------------------------------------------------------------------- Receive notification of the end of the document.
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qualName)
          ----------------------------------------------------------------------------- Receive notification of the end of an element.
 int getBuildAngles()
           
 int getBuildLoops()
           
 int getBuildPlaces()
           
 int getBuildTrees()
           
 java.lang.String getDiamondPicture()
           
 char getDiamondSymbol()
           
 int getHeight()
           
 java.lang.String getInstructionFileName()
           
 char[][] getLabyrinth()
           
 java.lang.String getLevelName()
           
 int getMaxWayLenght()
           
 int getMinWayLenght()
           
 int getNumDiamonds()
           
 int getNumWayCells()
           
 char getOneSymbol()
           
 java.lang.String getRobotPicture()
           
 Direction getStartingDirection()
           
 java.lang.String getStartPicture()
           
 char getStartSymbol()
           
 char getThreeSymbol()
           
 char getTwoSymbol()
           
 java.lang.String getWallPicture()
           
 char getWallSymbol()
           
 java.lang.String getWayPicture()
           
 char getWaySymbol()
           
 int getWidth()
           
 char getZeroSymbol()
           
 boolean isCreateLabyrinth()
           
 boolean isInstructionList()
           
 boolean isLoadLabyrinth()
           
 boolean isStyle()
           
 boolean isXMLError()
           
 void setDocument(java.lang.String document)
           
 void setDocumentBase(java.net.URL document_base)
           
 void startDocument()
          ----------------------------------------------------------------------------- Receive notification of the beginning of the document.
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qualName, org.xml.sax.Attributes attribs)
          ----------------------------------------------------------------------------- Receive notification of the start of an element.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabyrinthXMLContentHandler

public LabyrinthXMLContentHandler()
Method Detail

setDocumentBase

public void setDocumentBase(java.net.URL document_base)

setDocument

public void setDocument(java.lang.String document)

startDocument

public void startDocument()
----------------------------------------------------------------------------- Receive notification of the beginning of the document.


startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qualName,
                         org.xml.sax.Attributes attribs)
----------------------------------------------------------------------------- Receive notification of the start of an element.

Parameters:
localName - - The local name (without prefix), or the empty string if Namespace processing is not being performed.
qualName - - The qualified name (with prefix), or the empty string if qualified names are not available.

characters

public void characters(char[] charArray,
                       int start,
                       int length)
----------------------------------------------------------------------------- Receive notification of character data inside an element.

Parameters:
charArray - - The characters.
start - - The start position in the character array.
length - - The number of characters to use from the character array.

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qualName)
----------------------------------------------------------------------------- Receive notification of the end of an element.

Parameters:
localName - - The local name (without prefix), or the empty string if Namespace processing is not being performed.

endDocument

public void endDocument()
                 throws org.xml.sax.SAXParseException
----------------------------------------------------------------------------- Receive notification of the end of the document.

Throws:
org.xml.sax.SAXParseException

convertLabyrinthData

public void convertLabyrinthData()
                          throws org.xml.sax.SAXParseException
----------------------------------------------------------------------------- Generates a twodimensional character-array which is an ASCII representation of the labyrinthfield.

Throws:
org.xml.sax.SAXParseException

isXMLError

public boolean isXMLError()

getLevelName

public java.lang.String getLevelName()

getWidth

public int getWidth()

getHeight

public int getHeight()

getStartSymbol

public char getStartSymbol()

getWallSymbol

public char getWallSymbol()

getDiamondSymbol

public char getDiamondSymbol()

getWaySymbol

public char getWaySymbol()

getZeroSymbol

public char getZeroSymbol()

getOneSymbol

public char getOneSymbol()

getTwoSymbol

public char getTwoSymbol()

getThreeSymbol

public char getThreeSymbol()

getStartingDirection

public Direction getStartingDirection()

getLabyrinth

public char[][] getLabyrinth()

getNumDiamonds

public int getNumDiamonds()

getNumWayCells

public int getNumWayCells()

getMinWayLenght

public int getMinWayLenght()

getMaxWayLenght

public int getMaxWayLenght()

getBuildAngles

public int getBuildAngles()

getBuildTrees

public int getBuildTrees()

getBuildPlaces

public int getBuildPlaces()

getBuildLoops

public int getBuildLoops()

getWallPicture

public java.lang.String getWallPicture()

getWayPicture

public java.lang.String getWayPicture()

getRobotPicture

public java.lang.String getRobotPicture()

getDiamondPicture

public java.lang.String getDiamondPicture()

getStartPicture

public java.lang.String getStartPicture()

isLoadLabyrinth

public boolean isLoadLabyrinth()

isCreateLabyrinth

public boolean isCreateLabyrinth()

isStyle

public boolean isStyle()

isInstructionList

public boolean isInstructionList()

getInstructionFileName

public java.lang.String getInstructionFileName()