Examples of XmlXpathFilterData


Examples of org.geotools.data.complex.xml.XmlXpathFilterData

            return (xpath != null) && !"".equals(xpath.trim());
        }

        public Object get(Object object, String xpath, Class target) {

            XmlXpathFilterData xmlResponse = (XmlXpathFilterData) object;
            String indexXpath = createIndexedXpath(xmlResponse, xpath);

            List<String> ls = XmlXpathUtilites.getXPathValues(xmlResponse.getNamespaces(),
                    indexXpath, xmlResponse.getDoc());
            if (ls != null && !ls.isEmpty()) {
                return ls.get(0);
            }
            return null;
        }
View Full Code Here

Examples of org.geotools.data.complex.xml.XmlXpathFilterData

    public Object evaluate(Object object) {
        if (object == null || !(object instanceof XmlXpathFilterData)) {
            return null;
        }
        XmlXpathFilterData data = (XmlXpathFilterData) object;
        Document doc = data.getDoc();
        String xpath = data.getItemXpath();
        NamespaceSupport ns = data.getNamespaces();

        // append the parameter from AsXpath() to the prefix
        xpath += XmlMappingFeatureIterator.XPATH_SEPARATOR
                + (params.get(0) == null ? "" : params.get(0).toString());
        // then evaluate xpath from the xmlResponse
View Full Code Here

Examples of org.geotools.data.complex.xml.XmlXpathFilterData

            }
        } else {
            validFeatureIndex = new ArrayList<Integer>();
            int nodeIndex = 1;
            while (nodeIndex <= nodeCount && validFeatureIndex.size() <= maxFeatures) {      
                XmlXpathFilterData peek = new XmlXpathFilterData(namespaces, doc, nodeIndex, itemXpath);
                if (postFilter.evaluate(peek)) {
                   validFeatureIndex.add(nodeIndex);
                }
                nodeIndex++;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.