Package org.apache.xindice.xml

Examples of org.apache.xindice.xml.NamespaceMap


        if (query == null) {
            throw new Exception(MISSING_QUERY_PARAM);
        }

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

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


     * Sets the query string to be used when executing update
     */
    public void setQString(String query) throws SAXException {
        super.setQString(query);
        if (nsMap == null) {
            nsMap = new NamespaceMap();
        }
        nsMap.includeNamespaces(super.namespaces, !API_NS_PRECEDENCE);
    }
View Full Code Here

        if(xupdate == null) {
            xupdate = "";
        } else if(xupdate.length() > 0) {
            // do xupdate
            try {
                NodeSet result = col.queryCollection("XUpdate", xupdate, new NamespaceMap());
                printResult(result, output);
            } catch (DBException e) {
                log.error(e);
            }
        }
View Full Code Here

        printQueryForm(output, query, path, ns);
        output.print("<br />\n");
        output.flush();

        if (query.length() > 0) { // print result
            NamespaceMap nsMap = new NamespaceMap();
            int index = 0;
            for (int i = 0; i < nsSize; i++) {
                nsMap.setNamespace(ns[index++], ns[index++]);
            }
            try {
                NodeSet result = col.queryCollection("XPath", query, nsMap);
                printQuery(result, output, query, path);
            } catch (DBException e) {
View Full Code Here

     * Maps a Hashtable containing namespace definitions into a Xindice
     * NamespaceMap.
     */
    public static NamespaceMap mapNamespaces(Map namespaces) {
        if (namespaces != null && namespaces.size() > 0) {
            return new NamespaceMap(namespaces);
        }

        return null;
    }
View Full Code Here

     * Sets the query string to be used when executing update
     */
    public void setQString(String query) throws SAXException {
        super.setQString(query);
        if (nsMap == null) {
            nsMap = new NamespaceMap();
        }
        nsMap.includeNamespaces(super.namespaces, !API_NS_PRECEDENCE);
    }
View Full Code Here

        if (query == null) {
            throw new Exception(MISSING_QUERY_PARAM);
        }

        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 {
View Full Code Here

     * Maps a Hashtable containing namespace definitions into a Xindice
     * NamespaceMap.
     */
    public static NamespaceMap mapNamespaces(Hashtable namespaces) {
        if (namespaces != null && namespaces.size() > 0) {
            return new NamespaceMap(namespaces);
        }

        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.xindice.xml.NamespaceMap

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.