Package xbird.xquery.dm.dtm

Examples of xbird.xquery.dm.dtm.IDocumentTable


            return store.getAttribute(_id, i);
        }

        public DTMAttribute getAttribute(String nsuri, String attname) {
            assert (nsuri != null && 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

            return nodeName().getNamespaceURI();
        }

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

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

        public boolean nilled() {
            final IDocumentTable store = documentTable();
            long attid;
            for(int i = 0; (attid = getAttribute(i)) != -1; i++) {
                assert (attid != -1);
                byte attkind = store.getNodeKindAt(attid);
                if(attkind == NodeKind.ATTRIBUTE) {
                    QualifiedName qname = store.getAttributeName(attid);
                    String nsuri = qname.getNamespaceURI();
                    String attname = qname.getLocalPart();
                    if(XQueryConstants.XSI_URI.equals(nsuri) && "nil".equals(attname)) {
                        String attval = store.getText(attid);
                        if(attval == null) {
                            return false;
                        }
                        return BooleanValue.toBoolean(attval);
                    }
View Full Code Here

            return NodeKind.ELEMENT;
        }

        @Override
        public int getNameCode() {
            final IDocumentTable store = documentTable();
            return store.getNameCode(_id);
        }
View Full Code Here

            return store.getNameCode(_id);
        }

        @Override
        public QualifiedName nodeName() {
            final IDocumentTable store = documentTable();
            return store.getName(_id);
        }
View Full Code Here

            }
            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);
        }
        return colls;
View Full Code Here

        return colls;
    }

    public final IDocumentTable getDocument(Transaction tx, String docName, DynamicContext dynEnv)
            throws DbException {
        final IDocumentTable dtm;
        try {
            dtm = DocumentTableLoader.load(this, docName, dynEnv);
        } catch (IOException e) {
            throw new DbException("loading document failed: " + docName, e);
        }
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.