Package org.geotools.data.complex.PathAttributeList

Examples of org.geotools.data.complex.PathAttributeList.Pair


            final Expression sourceExpression = attMapping.getIdentifierExpression();
           
            List<Pair> ls = elements.get(attMapping.getParentLabel());
            if (ls != null) {
                for (int i = 0; i < ls.size(); i++) {
                    Pair parentAttribute = ls.get(i);                   
                    String instancePath = attMapping.getInstanceXpath();                   
                    int count = 1;
                    String countXpath = parentAttribute.getXpath();
                    // if instance path not set, then element exists, with one instance
                    if (instancePath != null) {
                        countXpath = countXpath + XPATH_SEPARATOR + instancePath;
                    }

                    for (int j = 0; j < count; j++) {
                        final String bracketIndex = "";
                        String xpath;
                        if (instancePath == null) {
                            xpath = parentAttribute.getXpath() + XPATH_SEPARATOR
                                    + sourceExpression.toString();
                        } else {
                            xpath = parentAttribute.getXpath() + XPATH_SEPARATOR
                                    + instancePath + bracketIndex
                                    + XPATH_SEPARATOR + sourceExpression.toString();
                        }
                        String label = getFullQueryPath(attMapping);
View Full Code Here


    private void addSetterAttributes(PathAttributeList elements) {
        for (AttributeMapping attMapping : setterAttributes) {
            List<Pair> ls = elements.get(attMapping.getParentLabel());
            if (ls != null) {
                for (int i = 0; i < ls.size(); i++) {
                    Pair parentPair = ls.get(i);
                    final Expression sourceExpression = attMapping.getSourceExpression();
                    String prefix = parentPair.getXpath();

                    Expression usedXpath = getValue(prefix, sourceExpression,
                            attMapping);

                    String label = getFullQueryPath(attMapping);
View Full Code Here

            if (ls != null) {
                final Expression sourceExpression = attMapping.getSourceExpression();
                final Expression idExpression = attMapping.getIdentifierExpression();

                for (int i = 0; i < ls.size(); i++) {
                    Pair parentPair = ls.get(i);
                    Attribute setterTarget = parentPair.getAttribute();
                    // find the root attribute mapping from the xpath
                    // get the full xpath query including
                    StepList xpath = attMapping.getTargetXPath().clone();
                    Object value = getValue(parentPair.getXpath(), sourceExpression, target);
                   
                    xpath.get(0).setIndex(i+1);
                                                                                                                                        
                    if (value != null) {
                        if (value instanceof Collection) {
View Full Code Here

            final Expression idExpression = attMapping.getIdentifierExpression();

            List<Pair> ls = elements.get(attMapping.getParentLabel());
            if (ls != null) {
                for (int i = 0; i < ls.size(); i++) {
                    Pair parentAttribute = ls.get(i);
                    String countXpath = parentAttribute.getXpath();
                    // if instance path not set, then only count the root node
                    if (attMapping.getInstanceXpath() != null) {
                        countXpath += XPATH_SEPARATOR + attMapping.getInstanceXpath();                       
                    }
                    int count = XmlXpathUtilites.countXPathNodes(mapping.getNamespaces(),
View Full Code Here

TOP

Related Classes of org.geotools.data.complex.PathAttributeList.Pair

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.