jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoTools
  • GEOT-3939

PropertyDataStore history support

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: property plugin
  • Labels:
    None

Description

Implement history support for PropertyDataStore (based on ResourceID http://docs.codehaus.org/display/GEOTOOLS/ResourceId).

Why:
1. PropertyDataStore is handy for testing GeoServer
2. It would be good to have a reference implementation of ResourceId that does not require the setup of "GeoGit"
3. Versioned PostGIS is stuck

The downside is that it is still based on AbstractDataStore.

Implementation approach is to use a side car "foo.history" file. The file can be added to during commit() using simple append from the transaction state diff.

In the interests of keeping this simple we will use a format similar to that provided by the RFC. We will use a "timestamp" created during commit to mark up each entry. This will serve as our magic "version" string required by ResourceId; it will also serve to let us handle the data range based a queries.

fid|version=value|value2|value2|value3

We have a number of ResourceID scenarios to handle:

1) Query all history for a specific FID

This is easy we can can traverse the history file in order; be remembering the "last" version we will be able to return the correct ResourceID information with a date range:

fid1|version1=value|value2|value2|value3
fid1|version2=value|value2|value2|value3
fid1|version3=value|value2|value2|value3
fid1|version4=value|value2|value2|value3
fid1|version5=value|value2|value2|value3

From the above example:

  • "version5" is the latest value represented in the main property file.
  • When we return a ResourceID for index 3 we will build a ResourceId using:
    new ResourceIdImpl( fid, String.valueOf(version),new Date(version), new Date(previousVersion));

2) Query a specific "index"

Handled in a similar manner as above; in this case we will need to count the number of times fid encountered in order

3. Query using "previous" or "next" or date range...

These ones require us to hold on to the previous unparsed feature content; on the off chance it ends up being the one requested (i.e. via previous or date range).

Activity

  • All
  • Comments
  • History
  • Activity
There are no comments yet on this issue.

People

  • Assignee:
    Jody Garnett
    Reporter:
    Jody Garnett
Vote (0)
Watch (0)

Dates

  • Created:
    03/Nov/11 1:54 AM
    Updated:
    03/Nov/11 2:26 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.