Package org.geotools.xml.impl

Examples of org.geotools.xml.impl.NodeImpl


*
* @source $URL$
*/
public class GML2ParsingUtilsTest extends TestCase {
    public void testCRS() throws Exception {
        NodeImpl node = new NodeImpl(null);

        AttributeImpl att = new AttributeImpl(null);
        att.setName("srsName");

        NodeImpl attNode = new NodeImpl(att);
        attNode.setValue(new URI("EPSG:4326"));
        node.addAttribute(attNode);

        CoordinateReferenceSystem crs = GML2ParsingUtils.crs(node);
        assertNotNull(crs);

        attNode.setValue(new URI("http://www.opengis.net/gml/srs/epsg.xml#4326"));
        crs = GML2ParsingUtils.crs(node);
        assertNotNull(crs);
    }
View Full Code Here


        return (Binding) container.getComponentInstance(type);
    }

    Node createNode(InstanceComponent instance, ElementInstance[] elements, Object[] elementValues,
        AttributeInstance[] attributes, Object[] attValues) {
        NodeImpl node = new NodeImpl(instance);

        if ((elements != null) && (elements.length > 0)) {
            for (int i = 0; i < elements.length; i++) {
                node.addChild(new NodeImpl(elements[i], elementValues[i]));
            }
        }

        if ((attributes != null) && (attributes.length > 0)) {
            for (int i = 0; i < attributes.length; i++) {
                node.addAttribute(new NodeImpl(attributes[i], attValues[i]));
            }
        }

        return node;
    }
View Full Code Here

TOP

Related Classes of org.geotools.xml.impl.NodeImpl

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.