- Timestamp:
- 11/24/06 14:20:40 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Res_Xalan/org/apache/xml/dtm/ref/DTMDocumentImpl.java
r7031 r7489 97 97 protected String m_documentBaseURI; 98 98 99 /** If we're building the model incrementally on demand, we need to100 * 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 ahead103 * of the current build point, we'll probably throw a null-pointer104 * exception. We could try to wait-and-retry instead, as a very poor105 * fallback, but that has all the known problems with multithreading106 * on multiprocessors and we Don't Want to Go There.107 *108 * @see setIncrementalSAXSource109 */110 private IncrementalSAXSource m_incrSAXSource=null;111 112 113 99 // ========= DTM data structure declarations. ============== 114 100 … … 163 149 m_xsf = xstringfactory; 164 150 } 165 166 /** Bind a IncrementalSAXSource to this DTM. If we discover we need nodes167 * that have not yet been built, we will ask this object to send us more168 * events, and it will manage interactions with its data sources.169 *170 * Note that we do not actually build the IncrementalSAXSource, since we don't171 * 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 from175 * 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 data182 source.setContentHandler(this);183 source.setLexicalHandler(this);184 185 // Are the following really needed? IncrementalSAXSource doesn't yet186 // support them, and they're mostly no-ops here...187 //source.setErrorHandler(this);188 //source.setDTDHandler(this);189 //source.setDeclHandler(this);190 }191 151 192 152 /** … … 319 279 public org.xml.sax.ContentHandler getContentHandler() 320 280 { 321 if (m_incrSAXSource instanceof IncrementalSAXSource_Filter)322 return (ContentHandler) m_incrSAXSource;323 else324 281 return this; 325 282 } … … 337 294 public LexicalHandler getLexicalHandler() 338 295 { 339 340 if (m_incrSAXSource instanceof IncrementalSAXSource_Filter)341 return (LexicalHandler) m_incrSAXSource;342 else343 296 return this; 344 297 } … … 395 348 public boolean needsTwoThreads() 396 349 { 397 return null!=m_incrSAXSource;350 return false; 398 351 } 399 352
Note: See TracChangeset
for help on using the changeset viewer.