Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6
    • Component/s: Diff
    • Tags:
    • Backlog priority:
      350
    • Impact type:
      API added

      Description

      The DocumentDiffService should expose extension points to

      Configure XMLUnit for the diff, what is currently hard-coded:
      protected void configureXMLUnit() {
        XMLUnit.setIgnoreWhitespace(true);
        XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true);
      }
      
      Configure the diff itself, what is currently hard-coded:
      protected void configureDiff(Diff diff) {
        diff.overrideDifferenceListener(new IgnoreStructuralDifferenceListener());   
        diff.overrideElementQualifier(new ElementNameAndAttributeQualifier());
      }
      
      Contribute a "second-level" differ for a given type of property.

      The first-level diff detects the document properties that are different between the 2 docs, for example dc:title.
      For now it also holds the different values on both sides: left and right, for example: {{

      {left = My first doc / right = My second doc}

      }}.

      The second-level diff would use the type held by the first-level diff of a property to call the specific differ for this type on the document's property.
      This implies a refactoring of the PropertyDiff implementations. The first-level diff no more needs to hold the different values, but the type of diff and a reference to the property itself (xpath like).
      For example a structure like {{

      {type = "complexList", xpath = "mySchema:complexListField[1]/complexListItem[2]/stringItem[1]"}

      }}.

      This way to access the second-level diff for a property, the system would just have to call the appropriate differ contributed for the diff type. If no differ is associated to the diff type, a fallback is done on the default one.

      Example of a contribution of a complexList differ:

      <propertyDiffer type="complexList" class="ComplexListPropertyDiffer"/>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ataillefer Antoine Taillefer
                Reporter:
                ataillefer Antoine Taillefer
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d