Examples of InsertRequest


Examples of org.vfny.geoserver.wfs.requests.InsertRequest

    /* These tests need a geom_test feature type with an info.xml and
     * an info.xml added to rail to properly work. */
    public void testXml1() throws Exception {
        // make base comparison objects       
        InsertRequest insert = new InsertRequest();

        insert.setHandle("insert 1");
        insert.addFeature(testFeature);

        TransactionRequest baseRequest = new TransactionRequest();
        baseRequest.addSubRequest(insert);
        baseRequest.setHandle("my insert");

View Full Code Here

Examples of org.vfny.geoserver.wfs.requests.InsertRequest

        //assertTrue(runXmlTest(baseRequest, "insert1", true));
    }

    public void testXml2() throws Exception {
        // make base comparison objects       
        InsertRequest insert = new InsertRequest();
        insert.setHandle("insert 2");
        insert.addFeature(testFeature);

        TransactionRequest baseRequest = new TransactionRequest();
        baseRequest.addSubRequest(insert);

        Coordinate[] points = {
            new Coordinate(5, 5), new Coordinate(5, 15), new Coordinate(15, 15),
            new Coordinate(15, 5), new Coordinate(5, 5)
        };
        PrecisionModel precModel = new PrecisionModel();
        int srid = 2035;
        LinearRing shell = new LinearRing(points, precModel, srid);
        Polygon the_geom = new Polygon(shell, precModel, srid);

        Integer featureId = new Integer(23);
        String name = "polygon2";
        Object[] attributes = { featureId, the_geom, name };

        //try{
        Feature feature2 = schema.create(attributes, String.valueOf(featureId));

        insert.addFeature(feature2);
        baseRequest.setHandle("my second insert");

        // run test      
        //assertTrue(runXmlTest(baseRequest, "insert2", true));
    }
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.