com.chaosserver.bilbo.data
Class DirectoryHandler

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--com.chaosserver.bilbo.data.DirectoryHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class DirectoryHandler
extends DefaultHandler

A Sax helper customized to read in the Xml representation of a Directory object.

Since:
Bilbo 1.0

Field Summary
protected  Directory directory
          Holds the directory currently being read in.
protected  FilenameMapping filenameMapping
          Holds the FilenameMapping currently being read in.
protected  Name name
          Holds the Name currently being read in.
 
Constructor Summary
DirectoryHandler()
          Default constructor.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(String uri, String localName, String qName)
           
protected  Directory getDirectory()
          Getter for the Directory object generated by this handler.
 void startElement(String uri, String localName, String qName, Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directory

protected Directory directory
Holds the directory currently being read in.


filenameMapping

protected FilenameMapping filenameMapping
Holds the FilenameMapping currently being read in.


name

protected Name name
Holds the Name currently being read in.

Constructor Detail

DirectoryHandler

public DirectoryHandler()
Default constructor.

Method Detail

getDirectory

protected Directory getDirectory()
Getter for the Directory object generated by this handler.

This method should be called after the handler has been used against an Xml document containing a directory.

Returns:
the Directory read in by the handler

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
SAXException


Copyright © 20020228