Package org.apache.xindice.core.data

Examples of org.apache.xindice.core.data.NodeSet


            Node node = xctxt.getDTM(ctxtNode).getNode(ctxtNode);
            NodeListImpl list = new NodeListImpl(null);
            list.add(node);

            Searcher searcher = new Searcher(list, analyzer);
            NodeSet nodes = searcher.search(query);

            return nodes.hasMoreNodes() ? XBoolean.S_TRUE : XBoolean.S_FALSE;
        } catch (ParseException e) {
            throw new TransformerException("Error in text query", e);
        }
    }
View Full Code Here


                attribIndex++;
                String selector = (String) attribs.get("select");

                // If we found an XPath selector we need to execute the commands.
                if (selector != null) {
                    NodeSet ns = col.queryCollection("XPath", selector, nsMap);
                    Document lastDoc = null;
                    while (ns != null && ns.hasMoreNodes()) {
                        DBNode node = (DBNode) ns.getNextNode();
                        Document doc = node.getOwnerDocument();

                        if (doc == lastDoc) {
                            continue; // We only have to process it once
                        } else {
View Full Code Here

    /* see superclass for documentation */
    public ResourceSet query(String name, String queryLang, String query, Hashtable nsMap) throws XMLDBException {

        checkOpen();
        try {
            NodeSet nodeSet;
            if (name != null) {
                nodeSet = col.queryDocument(queryLang, query, QueryUtil.mapNamespaces(nsMap), name);
            } else {
                nodeSet = col.queryCollection(queryLang, query, QueryUtil.mapNamespaces(nsMap));
            }
View Full Code Here

        }

        Collection col = getCollection((String) message.get(COLLECTION));
        NamespaceMap nsMap = QueryUtil.mapNamespaces((Hashtable) message.get(NAMESPACES));

        NodeSet ns;
        if (message.containsKey(NAME)) {
            ns = col.queryDocument(type, query, nsMap, message.get(NAME));
        } else {
            ns = col.queryCollection(type, query, nsMap);
        }
View Full Code Here

TOP

Related Classes of org.apache.xindice.core.data.NodeSet

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.