Package org.geotools.xml

Examples of org.geotools.xml.Node


       
        List sections = node.getChildren("Section");

        if (null != sections) {
            for (Iterator iterator = sections.iterator(); iterator.hasNext();) {
                Node child = (Node) iterator.next();
                child.setValue(Section.get((String)child.getValue()));
            }
           
        }

        return super.parse(instance, node, value);
View Full Code Here


        return map;
    }

    private void mapBinding(Map map, List attributes) {
        for (Iterator i = attributes.iterator(); i.hasNext();) {
            Node attribute = (Node) i.next();
            String name = attribute.getComponent().getName();
            Object value = attribute.getValue();

            if (map.containsKey(name)) {
                List values;
                Object obj = map.get(name);
View Full Code Here

    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {
        List positions = node.getChildren("pos");

        if (!positions.isEmpty() && (positions.size() == 2)) {
            Node n1 = (Node) positions.get(0);
            Node n2 = (Node) positions.get(1);
            GeneralDirectPosition p1 = (GeneralDirectPosition) n1.getValue();
            GeneralDirectPosition p2 = (GeneralDirectPosition) n2.getValue();

            GeneralEnvelope envelope = new GeneralEnvelope(p1, p2);
           
            if (p1.getDimension() == 2 && p1.getDimension() == 2) {
                envelope.setCoordinateReferenceSystem(DefaultGeographicCRS.WGS84);
View Full Code Here

        if (name == null) {
            return false;
        }

        for (int i = 0; i < children.size(); i++) {
            Node child = (Node) children.get(i);

            if (name.equals(child.getComponent().getName())) {
                return true;
            }
        }

        return false;
View Full Code Here

        if (clazz == null) {
            return false;
        }

        for (int i = 0; i < children.size(); i++) {
            Node child = (Node) children.get(i);

            if (child.getValue() == null) {
                continue;
            }

            if (clazz.isAssignableFrom(child.getValue().getClass())) {
                return true;
            }
        }

        return false;
View Full Code Here

        if (name == null) {
            return matches;
        }

        for (Iterator itr = children.iterator(); itr.hasNext();) {
            Node child = (Node) itr.next();

            if (name.equals(child.getComponent().getName())) {
                matches.add(child);
            }
        }

        return matches;
View Full Code Here

        if (clazz == null) {
            return matches;
        }

        for (Iterator itr = children.iterator(); itr.hasNext();) {
            Node child = (Node) itr.next();

            if (child.getValue() == null) {
                continue;
            }

            if (clazz.isAssignableFrom(child.getValue().getClass())) {
                matches.add(child);
            }
        }

        return matches;
View Full Code Here

        if (name == null) {
            return null;
        }

        for (Iterator itr = children.iterator(); itr.hasNext();) {
            Node child = (Node) itr.next();

            if (name.equals(child.getComponent().getName())) {
                return child;
            }
        }

        return null;
View Full Code Here

        if (clazz == null) {
            return null;
        }

        for (Iterator itr = children.iterator(); itr.hasNext();) {
            Node child = (Node) itr.next();

            if (child.getValue() == null) {
                continue;
            }

            if (clazz.isAssignableFrom(child.getValue().getClass())) {
                return child;
            }
        }

        return null;
View Full Code Here

        if (clazz == null) {
            return false;
        }

        for (Iterator itr = attributes.iterator(); itr.hasNext();) {
            Node att = (Node) itr.next();

            if (att.getValue() == null) {
                continue;
            }

            if (clazz.isAssignableFrom(att.getValue().getClass())) {
                return true;
            }
        }

        return false;
View Full Code Here

TOP

Related Classes of org.geotools.xml.Node

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.