wt.projmgmt.msproject
Class PlanContentHandler

java.lang.Object
  extended bywt.projmgmt.msproject.DefaultSAXContentHandler
      extended bywt.projmgmt.msproject.PlanContentHandler
All Implemented Interfaces:
ContentHandler, ContentHandler

public class PlanContentHandler
extends DefaultSAXContentHandler
implements ContentHandler

This is the top level content handler for importing a Microsoft Project XML file.


Field Summary
private  MPPPlanBuilder builder
           
private  ObjectContentHandler childHandler
           
private  IgnoreContentHandler ignoreHandler
           
private  ImportInfo importInfo
           
private  Locator locator
           
private static int MAP_INIT_CAPACITY
           
private  XMLReader reader
           
 
Constructor Summary
PlanContentHandler(XMLReader reader)
          Create a handler that uses the specified XMLReader.
PlanContentHandler(XMLReader reader, ImportInfo info)
          Create a handler that uses the specified XMLReader and ImportInfo.
 
Method Summary
 void endElement(String namespaceURL, String localName, String qName)
           
 Locator getDocumentLocator()
          Get the handler's Locator.
 ImportInfo getImportInfo()
          Get the ImportInfo that is used to control this handler's (and its children's) parsing.
 MPPPlan getPlan()
           
 XMLReader getReader()
          Get the handler's XMLReader.
protected  boolean ignoreData(String namespaceURL, String localName, String qName)
          Return true if the data contained in the specified element should be (or has been) ignored.
 void setDocumentLocator(Locator locator)
          Set the handler's Locator.
 void startElement(String namespaceURL, String localName, String qName, Attributes atts)
           
 
Methods inherited from class wt.projmgmt.msproject.DefaultSAXContentHandler
characters, endDocument, endPrefixMapping, ignorableWhitespace, outputEndElement, outputStartElement, processingInstruction, skippedEntity, startDocument, startPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, skippedEntity, startDocument, startPrefixMapping
 

Field Detail

MAP_INIT_CAPACITY

private static final int MAP_INIT_CAPACITY
See Also:
Constant Field Values

importInfo

private final ImportInfo importInfo

reader

private final XMLReader reader

locator

private Locator locator

builder

private final MPPPlanBuilder builder

ignoreHandler

private final IgnoreContentHandler ignoreHandler

childHandler

private final ObjectContentHandler childHandler
Constructor Detail

PlanContentHandler

public PlanContentHandler(XMLReader reader)
Create a handler that uses the specified XMLReader.

Parameters:
reader - the XMLReader that uses this handler

PlanContentHandler

public PlanContentHandler(XMLReader reader,
                          ImportInfo info)
Create a handler that uses the specified XMLReader and ImportInfo.

Parameters:
reader - the XMLReader that uses this handler
info - the import info that should be used to control parsing
Method Detail

getImportInfo

public final ImportInfo getImportInfo()
Get the ImportInfo that is used to control this handler's (and its children's) parsing.

Specified by:
getImportInfo in interface ContentHandler

getReader

public XMLReader getReader()
Description copied from interface: ContentHandler
Get the handler's XMLReader.

Specified by:
getReader in interface ContentHandler

getDocumentLocator

public final Locator getDocumentLocator()
Get the handler's Locator.

Specified by:
getDocumentLocator in interface ContentHandler

setDocumentLocator

public final void setDocumentLocator(Locator locator)
Set the handler's Locator.

Specified by:
setDocumentLocator in interface ContentHandler
Overrides:
setDocumentLocator in class DefaultSAXContentHandler

getPlan

public final MPPPlan getPlan()

startElement

public void startElement(String namespaceURL,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultSAXContentHandler
Throws:
SAXException

endElement

public void endElement(String namespaceURL,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultSAXContentHandler
Throws:
SAXException

ignoreData

protected boolean ignoreData(String namespaceURL,
                             String localName,
                             String qName)
Return true if the data contained in the specified element should be (or has been) ignored.