Package org.geotools.xml

Examples of org.geotools.xml.Node


        HTTPType httpType = ows10Factory.createHTTPType();
        dcpType.setHTTP(httpType);

        List<Node> httpChildren = node.getChildren("HTTP");
        for (Node http : httpChildren) {
            Node get = http.getChild("Get");
            if (get != null) {
                RequestMethodType methodType = createRequestMethodType(ows10Factory, get);
                httpType.getGet().add(methodType);
            }
            Node post = http.getChild("Post");
            if (post != null) {
                RequestMethodType methodType = createRequestMethodType(ows10Factory, post);
                httpType.getPost().add(methodType);
            }
        }
View Full Code Here


    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
        Ows10Factory ows10Factory = Ows10Factory.eINSTANCE;

        OperationsMetadataType om = ows10Factory.createOperationsMetadataType();

        Node request = node.getChild("Request");

        OperationType operation;

        operation = getCapabilities(request.getChild("GetCapabilities"), ows10Factory);
        addOperation(om, operation);

        operation = dft(request.getChild("DescribeFeatureType"), ows10Factory);
        addOperation(om, operation);

        operation = getFeature(request.getChild("GetFeature"), ows10Factory);
        addOperation(om, operation);
       
        Node nodeOp = request.getChild("Transaction");
        if (nodeOp != null) {
            operation = createOperation("Transaction", nodeOp, ows10Factory);
            addOperation(om, operation);
        }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private void addParameter(Node node, Ows10Factory ows10Factory, OperationType operationType,
            String parameterName) {
        Node paramParentNode = node.getChild(parameterName);
        List<String> paramValues = childNames(paramParentNode);

        DomainType domain = ows10Factory.createDomainType();
        domain.setName(parameterName);
View Full Code Here

    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
       
        ElementSetNameType result = (ElementSetNameType) createEObject(value);
        result.setValue(ElementSetType.get((String) value));
        Node typeNames = node.getAttribute("typeNames");
        if(typeNames != null) {
            result.setTypeNames((List<QName>) typeNames.getValue());
        }
       
       
        return result;
    }
View Full Code Here

    @Override
    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
        SimpleLiteral sl = Csw20Factory.eINSTANCE.createSimpleLiteral();
        sl.setName(instance.getName());
        sl.setValue(value);
        Node scheme = node.getAttribute("scheme");
        if(scheme != null) {
            sl.setScheme((URI) scheme.getValue());
        }
       
        return sl;
    }
View Full Code Here

    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {

        List<Expression> expressions = new ArrayList();
        for (Iterator itr = node.getChildren().iterator(); itr.hasNext();) {
            Node child = (Node) itr.next();

            if (child.getValue() instanceof Expression) {
                expressions.add((Expression) child.getValue());
            }
            else if (child.getValue() instanceof Text) {
                expressions.add(filterFactory.literal(((Text)child.getValue()).getValue()));
            }
        }
       
        if (expressions.isEmpty()) {
            return null;
View Full Code Here

        container.registerComponentImplementation(GeometryFactory.class);
        container.registerComponentImplementation(GMLLinearRingTypeBinding.class);
    }

    public void testCoordFour() throws Exception {
        Node node = createNode(ring, new ElementInstance[] { coord1, coord2, coord3, coord4 },
                new Object[] {
                    createCoordinateSequence(new Coordinate(1, 2)),
                    createCoordinateSequence(new Coordinate(3, 4)),
                    createCoordinateSequence(new Coordinate(5, 6)),
                    createCoordinateSequence(new Coordinate(1, 2))
View Full Code Here

        assertEquals(linearRing.getPointN(3).getX(), 1d, 0);
        assertEquals(linearRing.getPointN(3).getY(), 2d, 0);
    }

    public void testCoordLessThanFour() throws Exception {
        Node node = createNode(ring, new ElementInstance[] { coord1, coord2, coord3 },
                new Object[] {
                    createCoordinateSequence(new Coordinate(1, 2)),
                    createCoordinateSequence(new Coordinate(3, 4)),
                    createCoordinateSequence(new Coordinate(1, 2))
                }, null, null);
View Full Code Here

            //ok
        }
    }

    public void testCoordMoreThanFour() throws Exception {
        Node node = createNode(ring,
                new ElementInstance[] { coord1, coord2, coord3, coord4, coord5 },
                new Object[] {
                    createCoordinateSequence(new Coordinate(1, 2)),
                    createCoordinateSequence(new Coordinate(3, 4)),
                    createCoordinateSequence(new Coordinate(5, 6)),
View Full Code Here

        assertEquals(linearRing.getPointN(4).getX(), 1d, 0);
        assertEquals(linearRing.getPointN(4).getY(), 2d, 0);
    }

    public void testCoordinatesFour() throws Exception {
        Node node = createNode(ring, new ElementInstance[] { coords },
                new Object[] {
                    createCoordinateSequence(
                        new Coordinate[] {
                            new Coordinate(1, 2), new Coordinate(3, 4), new Coordinate(5, 6),
                            new Coordinate(1, 2)
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.