featureversioning interface api - STEMLab/geotools GitHub Wiki

Description

This is a request for an addition to the GeoTools api to provide a framework for FeatureVersioning. This is based largely on a simplified form of the defunct versioned PostGIS project. I have altered interfaces to use feature instead of simplefeature so that it would be more useful for complex features in the future.

Status

This proposal is withdrawn.

Voting has not started yet:

Tasks

This section is used to make sure your proposal is complete (did you remember documentation?) and has enough paid or volunteer time lined up to be a success

  1. API changed based on BEFORE / AFTER
  2. Update default implementation
  3. Update wiki (both module matrix and upgrade to to 2.5 pages) |
  4. Remove deprecated code from GeoTools project
  5. Update the user guide
  6. Update or provided sample code in demo
  7. review user documentation

API Changes

FeatureSourceVersioning

NEW

package org.geotools.data;
import java.io.IOException;
import org.geotools.feature.FeatureCollection;
import org.geotools.feature.FeatureSource;
import org.opengis.filter.Filter;
public interface FeatureSourceVersioning <T extends FeatureType, F extends Feature> extends FeatureSource<T, F>{
    public FeatureCollection getLog(String fromVersion, String toVersion, Filter filter, String[] userIds, int maxRows) throws IOException;
    public FeatureDiffReader getDifferences(String fromVersion, String toVersion, Filter filter, String[] userIds) throws IOException;
    public String getVersion() throws IOException, UnsupportedOperationException;
}

FeatureVersioning

NEW

package org.geotools.data;
import java.io.IOException;
import org.opengis.filter.Filter;
public interface FeatureVersioning <T extends FeatureType, F extends Feature>  extends FeatureLocking<T, F>, FeatureSourceVersioning<T, F>{
    public void rollback(String toVersion, Filter filter, String[] users) throws IOException;
}

FeatureDiffReader

NEW

package org.geotools.data;
import java.io.IOException;
import java.util.NoSuchElementException;
import org.opengis.feature.FeatureType;
public interface FeatureDiffReader {
    public String getFromVersion();
    public String getToVersion();
    public FeatureType getSchema();
    public FeatureDiff next() throws IOException, NoSuchElementException;
    public boolean hasNext() throws IOException;
    public void close() throws IOException;
}

FeatureDiff

NEW

package org.geotools.data;
import java.util.List;
import org.opengis.feature.Feature;
public interface FeatureDiff {
    public String getID();
    public String getMessage();
    public Feature getFeature();
    public Feature getOldFeature();
}

Documentation Changes

list the pages effected by this proposal

⚠️ **GitHub.com Fallback** ⚠️