Package xbird.xquery.dm.dtm

Examples of xbird.xquery.dm.dtm.IDocumentTable


        public final DTMNodeBase nextSibling(NodeTest filter) {
            if(_id == 0L) {
                return null;
            }
            final IDocumentTable store = documentTable();
            final DocumentTableModel model = getDataModel();
            for(long nid = store.nextSibling(_id); nid != 0L; nid = store.nextSibling(nid)) {
                byte nodekind = store.getNodeKindAt(nid);
                DTMNodeBase probe = getPrototype(model, nodekind, nid);
                if(filter.accepts(probe)) {
                    return model.createNode(probe.nodeKind(), probe.getPosition());
                }
            }
View Full Code Here


        public DTMElement parent() {
            final DocumentTableModel model = getDataModel();
            if(_id == BLOCKS_PER_NODE) {
                return model.createNode(NodeKind.DOCUMENT, 0);
            }
            final IDocumentTable store = documentTable();
            final long pid = store.parent(_id);
            if(pid == 0L) {
                return null;
            }
            return model.createNode(store.getNodeKindAt(pid), pid);
        }
View Full Code Here

            }
            return model.createNode(store.getNodeKindAt(pid), pid);
        }

        public DTMNodeBase previousSibling() {
            final IDocumentTable store = documentTable();
            final long prevSib = store.previousSibling(_id);
            if(prevSib == -1L) {
                return null;
            }
            final DocumentTableModel model = getDataModel();
            return model.createNode(store.getNodeKindAt(prevSib), prevSib);
        }
View Full Code Here

            final DocumentTableModel model = getDataModel();
            return model.createNode(store.getNodeKindAt(prevSib), prevSib);
        }

        public String stringValue() {
            final IDocumentTable store = documentTable();
            return store.stringValue(_id);
        }
View Full Code Here

            }
        }

        @Override
        public DTMNodeBase firstChild() {
            final IDocumentTable store = documentTable();
            final long cid = store.firstChild(_id);
            if(cid == -1) {
                return null;
            }
            final DocumentTableModel model = getDataModel();
            return model.createNode(store.getNodeKindAt(cid), cid);
        }
View Full Code Here

            return model.createNode(store.getNodeKindAt(cid), cid);
        }

        public long getAttribute(int i) {
            assert (i >= 0);
            final IDocumentTable store = documentTable();
            return store.getAttribute(_id, i);
        }
View Full Code Here

            return store.getAttribute(_id, i);
        }

        public DTMAttribute getAttribute(String nsuri, String attname) {
            assert (attname != null);
            final IDocumentTable store = documentTable();
            int attcnt = store.getAttributeCountAt(_id);
            for(int i = 0; i < attcnt; i++) {
                long attid = store.getAttribute(_id, i);
                assert (attid != -1);
                assert (store.getNodeKindAt(attid) != NodeKind.ATTRIBUTE);
                QualifiedName qname = store.getAttributeName(attid);
                String attUri = qname.getNamespaceURI();
                String attName = qname.getLocalPart();
                if(nsuri == null || nsuri.equals(attUri)) {
                    if(attname.equals(attName)) {
                        final DocumentTableModel model = getDataModel();
View Full Code Here

            }
            return null;
        }

        public int getAttributesCount() {
            final IDocumentTable store = documentTable();
            return store.getAttributeCountAt(_id);
        }
View Full Code Here

            return store.getAttributeCountAt(_id);
        }

        public long getNamespaceDecl(int i) {
            assert (i >= 0);
            final IDocumentTable store = documentTable();
            return store.getNamespaceDecl(_id, i);
        }
View Full Code Here

            final DocumentTableModel model = getDataModel();
            return new DTMNamespace(model, nsid);
        }

        public int getNamespaceDeclCount() {
            final IDocumentTable store = documentTable();
            return store.getNamespaceCountAt(_id);
        }
View Full Code Here

TOP

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

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.