Package org.geoserver.wfsv

Examples of org.geoserver.wfsv.VersioningTransactionConverter


    public void write(Object value, OutputStream output, Operation operation)
        throws IOException, ServiceException {
        final FeatureDiffReader[] diffReaders = (FeatureDiffReader[]) value;

        // create a new feature collcetion type with just the numbers
        VersioningTransactionConverter converter = new VersioningTransactionConverter();
        final TransactionType transaction = converter.convert(diffReaders, TransactionType.class);

        //declare wfs schema location
        BaseRequestType gft = (BaseRequestType) operation.getParameters()[0];

        Encoder encoder = new Encoder(configuration, configuration.schema());
View Full Code Here


   
                // now we need to merge the readers into a global set of changes, skip
                // the changes on the conflicting features, and turn everything into a
                // transaction (easy no?)
                FeatureDiffReader differences = new MergingFeatureDiffReader(readers);
                transaction = new VersioningTransactionConverter().convert(differences,
                        TransactionType.class);
            } else {
                // no local changes to return, it happens only if we never had local changes
                // in the current history
                transaction = WfsFactory.eINSTANCE.createTransactionType();
View Full Code Here

                    LOGGER.log(Level.INFO, "About to compute PostDiff changes. Last central revision known to client " + clientCentralRevision + ", last GetDiff central revision " + getDiffCentralRevision);
                    if (getDiffCentralRevision == null || clientCentralRevision >= getDiffCentralRevision) {
                        // either first time or we don't need to make jumps
                        LOGGER.log(Level.INFO, "First PostDiff or clientRevion same as the last central one, computing diff from " + fromRevision +  " to LAST");
                        FeatureDiffReader fdr = fs.getDifferences(fromRevision, "LAST", null, null);
                        centralChanges = new VersioningTransactionConverter().convert(fdr,
                                TransactionType.class);
                    } else  {
                        // we need to jump over the last local changes
                        String before = String.valueOf(getDiffCentralRevision - 1);
                        String after = String.valueOf(getDiffCentralRevision);
                        LOGGER.log(Level.INFO, "Client revision lower than the server one, computing diff from " + fromRevision +  " to " + before + " and merging with diffs from " + after + " to LAST");
                        FeatureDiffReader fdr1 = fs.getDifferences(fromRevision, before, null, null);
                        FeatureDiffReader fdr2 = fs.getDifferences(after, "LAST", null, null);
                        FeatureDiffReader[] fdr = new FeatureDiffReader[] { fdr1, fdr2 };
                        centralChanges = new VersioningTransactionConverter().convert(fdr,
                                TransactionType.class);
                    }

                    // what is the latest change on this layer? (worst case it's the last GetDiff
                    // from this Unit)
View Full Code Here

                    LOGGER.log(Level.INFO, "About to compute PostDiff changes. Last central revision known to client " + clientCentralRevision + ", last GetDiff central revision " + getDiffCentralRevision);
                    if (getDiffCentralRevision == null || clientCentralRevision >= getDiffCentralRevision) {
                        // either first time or we don't need to make jumps
                        LOGGER.log(Level.INFO, "First PostDiff or clientRevion same as the last central one, computing diff from " + fromRevision +  " to LAST");
                        FeatureDiffReader fdr = fs.getDifferences(fromRevision, "LAST", null, null);
                        centralChanges = new VersioningTransactionConverter().convert(fdr,
                                TransactionType.class);
                    } else  {
                        // we need to jump over the last local changes
                        String before = String.valueOf(getDiffCentralRevision - 1);
                        String after = String.valueOf(getDiffCentralRevision);
                        LOGGER.log(Level.INFO, "Client revision lower than the server one, computing diff from " + fromRevision +  " to " + before + " and merging with diffs from " + after + " to LAST");
                        FeatureDiffReader fdr1 = fs.getDifferences(fromRevision, before, null, null);
                        FeatureDiffReader fdr2 = fs.getDifferences(after, "LAST", null, null);
                        FeatureDiffReader[] fdr = new FeatureDiffReader[] { fdr1, fdr2 };
                        centralChanges = new VersioningTransactionConverter().convert(fdr,
                                TransactionType.class);
                    }

                    // what is the latest change on this layer? (worst case it's the last GetDiff
                    // from this Unit)
View Full Code Here

   
                // now we need to merge the readers into a global set of changes, skip
                // the changes on the conflicting features, and turn everything into a
                // transaction (easy no?)
                FeatureDiffReader differences = new MergingFeatureDiffReader(readers);
                transaction = new VersioningTransactionConverter().convert(differences,
                        TransactionType.class);
            } else {
                // no local changes to return, it happens only if we never had local changes
                // in the current history
                transaction = WfsFactory.eINSTANCE.createTransactionType();
View Full Code Here

TOP

Related Classes of org.geoserver.wfsv.VersioningTransactionConverter

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.