Ignore:
Timestamp:
11/24/06 14:20:40 (6 years ago)
Author:
sys
Message:

cleanup incrementalSax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Res_Xalan/org/apache/xml/dtm/ref/DTMDocumentImpl.java

    r7031 r7489  
    9797        protected String m_documentBaseURI; 
    9898 
    99   /** If we're building the model incrementally on demand, we need to 
    100    * be able to tell the source when to send us more data. 
    101    * 
    102    * Note that if this has not been set, and you attempt to read ahead 
    103    * of the current build point, we'll probably throw a null-pointer 
    104    * exception. We could try to wait-and-retry instead, as a very poor 
    105    * fallback, but that has all the known problems with multithreading 
    106    * on multiprocessors and we Don't Want to Go There. 
    107    * 
    108    * @see setIncrementalSAXSource 
    109    */ 
    110   private IncrementalSAXSource m_incrSAXSource=null; 
    111  
    112  
    11399        // ========= DTM data structure declarations. ============== 
    114100 
     
    163149                m_xsf = xstringfactory; 
    164150        } 
    165  
    166   /** Bind a IncrementalSAXSource to this DTM. If we discover we need nodes 
    167    * that have not yet been built, we will ask this object to send us more 
    168    * events, and it will manage interactions with its data sources. 
    169    * 
    170    * Note that we do not actually build the IncrementalSAXSource, since we don't 
    171    * know what source it's reading from, what thread that source will run in, 
    172    * or when it will run. 
    173    * 
    174    * @param source The IncrementalSAXSource that we want to recieve events from 
    175    * on demand. 
    176    */ 
    177   public void setIncrementalSAXSource(IncrementalSAXSource source) 
    178   { 
    179     m_incrSAXSource=source; 
    180  
    181     // Establish SAX-stream link so we can receive the requested data 
    182     source.setContentHandler(this); 
    183     source.setLexicalHandler(this); 
    184  
    185     // Are the following really needed? IncrementalSAXSource doesn't yet 
    186     // support them, and they're mostly no-ops here... 
    187     //source.setErrorHandler(this); 
    188     //source.setDTDHandler(this); 
    189     //source.setDeclHandler(this); 
    190   } 
    191151 
    192152        /** 
     
    319279  public org.xml.sax.ContentHandler getContentHandler() 
    320280  { 
    321     if (m_incrSAXSource instanceof IncrementalSAXSource_Filter) 
    322       return (ContentHandler) m_incrSAXSource; 
    323     else 
    324281      return this; 
    325282  } 
     
    337294  public LexicalHandler getLexicalHandler() 
    338295  { 
    339  
    340     if (m_incrSAXSource instanceof IncrementalSAXSource_Filter) 
    341       return (LexicalHandler) m_incrSAXSource; 
    342     else 
    343296      return this; 
    344297  } 
     
    395348  public boolean needsTwoThreads() 
    396349  { 
    397     return null!=m_incrSAXSource; 
     350    return false; 
    398351  } 
    399352 
Note: See TracChangeset for help on using the changeset viewer.