Package net.opengis.wfs

Examples of net.opengis.wfs.InsertedFeatureType


        String lastHandle = null;
        boolean first = true;

        if (insertResults != null) {
            for (Iterator i = insertResults.getFeature().iterator(); i.hasNext();) {
                InsertedFeatureType insertedFeature = (InsertedFeatureType) i.next();
                String handle = insertedFeature.getHandle();

                if (first || ((lastHandle == null) && (handle != null))
                        || ((lastHandle != null) && (handle != null) && handle.equals(lastHandle))) {
                    if (!first) {
                        //close last one, if not the first time through
                        writer.write("</wfs:InsertResult>");
                    }

                    writer.write("<wfs:InsertResult");

                    if (insertedFeature.getHandle() != null) {
                        writer.write(" handle=\"" + insertedFeature.getHandle() + "\"");
                    }

                    writer.write(">");
                }

                for (Iterator id = insertedFeature.getFeatureId().iterator(); id.hasNext();) {
                    FeatureId featureId = (FeatureId) id.next();
                    writer.write("<ogc:FeatureId fid=\"" + featureId.toString() + "\"/>");
                }

                first = false;
View Full Code Here


        public void setHandle(String handle) {
            eSet(adaptee, "transactionResults.handle", handle);
        }

        public void addInsertedFeature(String handle, FeatureId featureId) {
            InsertedFeatureType insertedFeature = ((WfsFactory)getFactory()).createInsertedFeatureType();
            insertedFeature.setHandle(handle);
            insertedFeature.getFeatureId().add(featureId);

            ((TransactionResponseType)adaptee).getInsertResults().getFeature().add(insertedFeature);
        }
View Full Code Here

        // even if no insert
        // occured, howwever insert results needs to have at least one
        // "FeatureId" eliement, sp
        // we create an FeatureId with an empty fid
        if (result.getInsertResults().getFeature().isEmpty()) {
            InsertedFeatureType insertedFeature = WfsFactory.eINSTANCE.createInsertedFeatureType();
            insertedFeature.getFeatureId().add(filterFactory.featureId("none"));

            result.getInsertResults().getFeature().add(insertedFeature);
        }

        return result;
View Full Code Here

TOP

Related Classes of net.opengis.wfs.InsertedFeatureType

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.