wt.projmgmt.msproject
Class IgnoreContentHandler

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

public class IgnoreContentHandler
extends ChildContentHandler

This ContentHandler ignores content over a portion of the document being parsed.


Field Summary
private  String scope
           
 
Fields inherited from class wt.projmgmt.msproject.ChildContentHandler
 
Constructor Summary
IgnoreContentHandler(ContentHandler parent)
          Create a handler that ignores content over a certain scope.
IgnoreContentHandler(ContentHandler parent, String namespaceURL, String localName, String qName)
          Create a handler that ignores content over a certain scope.
 
Method Summary
 void endElement(String namespaceURL, String localName, String qName)
           
protected  boolean isScopeEnd(String namespaceURL, String localName, String qName)
          Return true if the element indicates this handlers end of scope.
 void setScope(String namespaceURL, String localName, String qName)
          Set the scope of this content handler.
 void startElement(String namespaceURL, String localName, String qName, Attributes atts)
           
 
Methods inherited from class wt.projmgmt.msproject.ChildContentHandler
getDocumentLocator, getImportInfo, getParent, getReader, setDocumentLocator, setParent
 
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

scope

private String scope
Constructor Detail

IgnoreContentHandler

public IgnoreContentHandler(ContentHandler parent)
Create a handler that ignores content over a certain scope. If this constructor is used then the scope must be set by calling setScope(java.lang.String, java.lang.String, java.lang.String) before the handler is used.

Parameters:
parent - the parent handler

IgnoreContentHandler

public IgnoreContentHandler(ContentHandler parent,
                            String namespaceURL,
                            String localName,
                            String qName)
Create a handler that ignores content over a certain scope.

When the end tag for the specified scope element is encontered, control is passed back to the parent handler.

Parameters:
parent - the parent handler
namespaceURL - the namespaceURL of the scoping element
localName - the localName of the scoping element
qName - the qualified name of the scoping element
Method Detail

setScope

public void setScope(String namespaceURL,
                     String localName,
                     String qName)
Set the scope of this content handler.


isScopeEnd

protected boolean isScopeEnd(String namespaceURL,
                             String localName,
                             String qName)
Return true if the element indicates this handlers end of scope.


startElement

public final 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 final void endElement(String namespaceURL,
                             String localName,
                             String qName)
                      throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultSAXContentHandler
Throws:
SAXException