From: <rs....@ti...> - 2005-03-02 15:08:47
|
Hello, when are the maxDepth and treeLevelOrder increased? Is this done by checkTree() (ElementImpl.class) Or bij the nativeElementIndexer? My quess is that this is done when reading the input stream (when a xml file is being stored) When storing a document, does eXist first convert the input stream to a t= emporary DOM object to analyse it? eXist uses documentobjects, within these objects values like "the first c= hild id at a certain level" and "the max number of children nodes at a certain= level" are stored. Is this correct? Are these object stored? The creation of the node id's and the spare ID's: which class has the met= hod for this action? The treeLevelOrder in DocumentImpl.java represents the max number of chil= dren @ a certain level: right? What is a datapage? (the pages that are stored in dom.dbx) How can this b= e described, is it an object? Where is it created? Perhaps all newbie questions ;-) oh I got one more: When indexing eXist uses the long value for the id's. Why use a long valu= e and not a double? I know the difference in size (4 vs 8) Does this not increase the num= ber of possible id's, or isn't it possible to identify on double values? ps.: I'm still working out the interview (stumbling uppon new phrases QNa= me etc) ;-) Best regards Ren=E9 Noordegraaf _____________________________________________________________________ Je eigen persoonlijk e-mailadres bij Tiscali? Registreer nu een domeinnaam bij Tiscali. Ga naar http://www.tiscali.nl |
From: Wolfgang M. <wol...@ex...> - 2005-03-04 09:36:19
|
Hi René, > when are the maxDepth and treeLevelOrder increased? > Is this done by checkTree() (ElementImpl.class) > Or bij the nativeElementIndexer? > My quess is that this is done when reading the input stream (when a > xml file is being stored) There are two places: 1) in Indexer.java when scanning the input stream, 2) in ElementImpl during an XUpdate operation. > When storing a document, does eXist first convert the input stream to a temporary > DOM object to analyse it? No, storing is SAX based. Indexer.java uses two passes through the doc: one to analyse the doc (and catch possible validation problems), another one to actually store the nodes. > eXist uses documentobjects, within these objects values like "the first child > id at a certain level" and "the max number of children nodes at a certain > level" are stored. Is this correct? Are these object stored? We only store the max depth of the tree and the "max number of children at a certain level", i.e. the tree level order. The first child ids are calculated when the document is reloaded. Check org.exist.dom.DocumentImpl.write()/read(). > The creation of the node id's and the spare ID's: which class has the method > for this action? ElementImpl.appendChildInternal() does: child.setGID(firstChildID() + children); > The treeLevelOrder in DocumentImpl.java represents the max number of children > @ a certain level: right? yes. > What is a datapage? (the pages that are stored in dom.dbx) How can this be > described, is it an object? Where is it created? Each of the .dbx files stores two types of pages: 1) btree pages, 2) data pages. The btree just maps keys to storage addresses, which point to the storage location of the value within the data page section. The storage address has two components: a) the page number of the data page, b) an in-page id to identify the record within the data page (see StorageAddress.java). Using an in-page id (tid) instead of an absolute offset allows us to relocate records within a page without changing the storage address pointer. dom.dbx is maintained by class DOMFile.java. The pages containing the actual node data are represented by the internal class DOMPage, which wraps around Page. The structure of the pages is described at the top of DOMFile.java. Wolfgang |