protegeproject / protege-client

Provides client functionality for the Protege Desktop application to connect to an OWL Ontology Server.
16 stars 9 forks source link

Getting the latest changes shouldn't always anchor from R0 #72

Open johardi opened 8 years ago

johardi commented 8 years ago

Currently, this is hard-coded in this line:

ChangeHistory latestChanges = getLatestChanges(sdoc, DocumentRevision.START_REVISION);

The anchoring revision should come from the latest revision (i.e., head revision) of the local ontology copy, such that (as an illustration):

ChangeHistory latestChanges = getLatestChanges(sdoc, localCopy.getHeadRevision());
bdionne commented 8 years ago

this call is made after you load the snapshot, which only happens on an open. Pretty sure you want this to start from R0

johardi commented 8 years ago

It will work correctly for the first snapshot because the snapshot captures the very beginning of the ontology. But it will no longer be valid for the subsequent snapshots which may come from a particular revision.

bdionne commented 8 years ago

I think it will actually, when we create new snapshots, the server history goes away, so this initial load will always use R0.

What might be different is when we start to persist local history. Then the server pull will be with respect to the local head