Package xbird.xquery.dm.dtm

Examples of xbird.xquery.dm.dtm.LazyDTMDocument


                String fname = rsc.getFirst();
                File docFile = new File(colDir, fname + IDocumentTable.DTM_SEGMENT_FILE_SUFFIX);
                if(!docFile.exists()) {
                    throw new GridException("Document not found: " + docFile.getAbsolutePath());
                }
                LazyDTMDocument doc = new LazyDTMDocument(fname, col, DynamicContext.DUMMY);
                Lock lock = rsc.getSecond();
                assert (lock != null);
                doc.setLock(lock);
                docList.add(doc);
            }
        }
        return new NodeSequence<DTMDocument>(docList, DynamicContext.DUMMY);
    }
View Full Code Here


                String fname = rsc.getFirst();
                File docFile = new File(colDir, fname + IDocumentTable.DTM_SEGMENT_FILE_SUFFIX);
                if(!docFile.exists()) {
                    throw new GridException("Document not found: " + docFile.getAbsolutePath());
                }
                LazyDTMDocument doc = new LazyDTMDocument(fname, col, DynamicContext.DUMMY);
                Lock lock = rsc.getSecond();
                assert (lock != null);
                doc.setLock(lock);
                docList.add(doc);
            }
        }
        return new NodeSequence<DTMDocument>(docList, DynamicContext.DUMMY);
    }
View Full Code Here

        return null;
    }

    public boolean next(IFocus<E> focus) throws XQueryException {
        final ReclaimingFocus rfocus = (ReclaimingFocus) focus;
        LazyDTMDocument toReclaim = rfocus.pollReclaim();
        if(toReclaim != null) {
            toReclaim.reclaim();
        }

        final int pos = focus.getContextPosition();
        if(pos < src.size()) {
            E item = src.get(pos);
            if(item instanceof LazyDTMDocument) {
                LazyDTMDocument lazydoc = (LazyDTMDocument) item;
                lazydoc.preload();
                rfocus.setToReclaim(lazydoc);
            }
            rfocus.setContextItem(item);
            return true;
        } else {
View Full Code Here

        public LazyDTMDocument pollReclaim() {
            if(toReclaim == null) {
                return null;
            }
            final LazyDTMDocument ret = toReclaim;
            this.toReclaim = null;
            return ret;
        }
View Full Code Here

            if(filterExp != null && !dname.matches(filterExp)) {
                continue;
            }
            final DTMDocument doc;
            if(lazy) {
                doc = new LazyDTMDocument(dname, this, dynEnv);
            } else {
                doc = getDocument(null, dname, dynEnv);
            }
            colls.put(dname, doc);
        }
View Full Code Here

            if(filterExp != null && !dname.matches(filterExp)) {
                continue;
            }
            final DTMDocument doc;
            if(lazy) {
                doc = new LazyDTMDocument(dname, this, dynEnv);
            } else {
                IDocumentTable doctbl = getDocument(null, dname, dynEnv);
                doc = new DocumentTableModel(doctbl, true).documentNode();
            }
            colls.put(dname, doc);
View Full Code Here

    public boolean next(IFocus<E> focus) throws XQueryException {
        final int pos = focus.getContextPosition();
        if(pos < src.size()) {
            ReclaimingFocus rfocus = (ReclaimingFocus) focus;
            LazyDTMDocument toReclaim = rfocus.pollReclaim();
            if(toReclaim != null) {
                toReclaim.reclaim();
            }
            E item = src.get(pos);
            if(item instanceof LazyDTMDocument) {
                LazyDTMDocument lazydoc = (LazyDTMDocument) item;
                lazydoc.preload();
                rfocus.setToReclaim(lazydoc);
            }
            rfocus.setContextItem(item);
            return true;
        } else {
View Full Code Here

        public LazyDTMDocument pollReclaim() {
            if(toReclaim == null) {
                return null;
            }
            final LazyDTMDocument ret = toReclaim;
            this.toReclaim = null;
            return ret;
        }
View Full Code Here

TOP

Related Classes of xbird.xquery.dm.dtm.LazyDTMDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.