Package org.outerj.daisy.diff.html.ancestor

Examples of org.outerj.daisy.diff.html.ancestor.AncestorComparatorResult


      AncestorComparator acthis = new AncestorComparator(getTextNode(i)
          .getParentTree());
      AncestorComparator acother = new AncestorComparator(leftComparator
          .getTextNode(j).getParentTree());

      AncestorComparatorResult result = acthis.getResult(acother, locale);

      if (result.isChanged()) {

        Modification mod = new Modification(ModificationType.CHANGED,
            ModificationType.CHANGED);

        if (!changedIDUsed) {
          mod.setFirstOfID(true);
          if (nextLastModified.size() > 0) {
            lastModified = nextLastModified;
            nextLastModified = new ArrayList<Modification>();
          }
        } else if (result.getChanges() != null
            && !result.getChanges().equals(changes)) {
          changedID++;
          mod.setFirstOfID(true);
          if (nextLastModified.size() > 0) {
            lastModified = nextLastModified;
            nextLastModified = new ArrayList<Modification>();
          }
        }

        if (lastModified.size() > 0) {
          mod.setPrevious(lastModified.get(0));
          if (lastModified.get(0).getNext() == null) {
            for (Modification lastMod : lastModified) {
              lastMod.setNext(mod);
            }
          }
        }
        nextLastModified.add(mod);

        mod.setChanges(result.getChanges());
        mod.setHtmlLayoutChanges(result.getHtmlLayoutChanges());
        mod.setID(changedID);

        getTextNode(i).setModification(mod);
        changes = result.getChanges();
        changedIDUsed = true;
      } else if (changedIDUsed) {
        changedID++;
        changedIDUsed = false;
      }
View Full Code Here

TOP

Related Classes of org.outerj.daisy.diff.html.ancestor.AncestorComparatorResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.