Conflict Implementation Notes

From MWCSWiki

Jump to: navigation, search

This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page

Cases (from Conflict UI):

  1. No conflict
  2. Addressed conflict
  3. Unaddressed (or partially addressed) conflict
  4. User disputes statement
  5. Unaddressed disputed statements
  6. User asserts a disputed statement

Pseudocode for figuring out which case applies to each Field:

<pre> User u for each Field f:

   for each FieldValue fv:
       if fv denied by any User:
           undisputed = false
   if undisputed:
       case 1
   else:
       list<FieldValue> asserted
       list<FieldValue> denied
       list<FieldValue> unaddressed
       for each FieldValue fv:
           if u asserts fv:
               asserted.add(fv)
           else if u denies fv:
               denied.add(fv)
           else:
               unaddressed.add(fv)
       if unaddressed.size == 0 && asserted.size > 0:
           case 2/6
       else if unaddressed.size == 0 && asserted.size == 0:
           case 4
       else:
           case 3/5

</pre>

So in order for this to work, we have to keep track of which users assert or deny/dispute/disagree with which statements. Each statement needs two lists of of users to keep track of this. (These lists will also be used by the persistence layer -- to persist a FieldValue, create the appropriate reified statement, then go through the lists of users and make appropriate agree/disagree statements.) Users may or may not need to hold on to lists of statements they agree/disagree with. We also need to be able to get a list of FieldValues for a particular Field.

Personal tools