Package org.vfny.geoserver.wfs.requests

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


                    throw new ServiceException(
                        "Transaction INSERT support is not enabled");
                }
                LOGGER.finer( "Transasction Insert:"+element );
                try {
                    InsertRequest insert = (InsertRequest) element;
                    FeatureCollection collection = insert.getFeatures();

                    FeatureReader reader = DataUtilities.reader(collection);
                    FeatureType schema = store.getSchema();

                    // Need to use the namespace here for the lookup, due to our weird
View Full Code Here


    /* 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

        //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

Related Classes of org.vfny.geoserver.wfs.requests.InsertRequest

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.