wt.projmgmt.msproject.mppobject
Class MPPResourceBuilder

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

public class MPPResourceBuilder
extends MPPObjectBuilder

A ContentHandler that builds a MPPResource from the data contained in a section of the document it is parsing.


Field Summary
 
Fields inherited from class wt.projmgmt.msproject.mppobject.MPPObjectBuilder
 
Fields inherited from class wt.projmgmt.msproject.ChildContentHandler
 
Constructor Summary
MPPResourceBuilder(ContentHandler parent)
          Create a handler that builds a MPPResource from a particular portion of the document being scanned.
MPPResourceBuilder(ContentHandler parent, String localName)
          Create a handler that builds a MPPResource from a particular portion of the document being scanned.
 
Method Summary
protected  MPPObject createObject()
          Create the MPPObject that should be populated by this builder.
 MPPResource getResource()
           
protected  boolean isObjectValid(MPPObject mppObj)
          Returns true if the specified object is not null and its name is also not null.
protected  boolean isUnsupported(String namespaceURL, String localName, String qName)
          Returns true if the specified element contains data that should be ignored by this builder.
 
Methods inherited from class wt.projmgmt.msproject.mppobject.MPPObjectBuilder
characters, endElement, getObject, isScopeEnd, reset, setScope, startElement
 
Methods inherited from class wt.projmgmt.msproject.ChildContentHandler
getDocumentLocator, getImportInfo, getParent, getReader, setDocumentLocator, setParent
 
Methods inherited from class wt.projmgmt.msproject.DefaultSAXContentHandler
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
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, skippedEntity, startDocument, startPrefixMapping
 

Constructor Detail

MPPResourceBuilder

public MPPResourceBuilder(ContentHandler parent)
Create a handler that builds a MPPResource from a particular portion of the document being scanned.

If this constructor is used then MPPObjectBuilder.setScope(java.lang.String) must be called to set the scope before the builder is used.

Parameters:
parent - the parent handler

MPPResourceBuilder

public MPPResourceBuilder(ContentHandler parent,
                          String localName)
Create a handler that builds a MPPResource from a particular portion of the document being scanned.

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

Parameters:
parent - the parent handler
localName - the localName of the scoping element
Method Detail

createObject

protected MPPObject createObject()
Description copied from class: MPPObjectBuilder
Create the MPPObject that should be populated by this builder.

Specified by:
createObject in class MPPObjectBuilder

isObjectValid

protected boolean isObjectValid(MPPObject mppObj)
Returns true if the specified object is not null and its name is also not null.

Overrides:
isObjectValid in class MPPObjectBuilder

getResource

public final MPPResource getResource()

isUnsupported

protected boolean isUnsupported(String namespaceURL,
                                String localName,
                                String qName)
Description copied from class: MPPObjectBuilder
Returns true if the specified element contains data that should be ignored by this builder. If this returns true for a particular element, then control will be turned over to a IgnoreContentHandler until the element is complete.

Specified by:
isUnsupported in class MPPObjectBuilder