Package org.structr.web.diff

Examples of org.structr.web.diff.MoveOperation


          case 7// same tree index (1), same node (2), same content (4) => node is completely unmodified
            break;

          case 6// same content (2), same node (4), NOT same tree index => node has moved
            newParent  = newNode.getProperty(DOMNode.parent);
            changeSet.add(new MoveOperation(hashMappedExistingNodes, getHashOrNull(newParent), getSiblingHashes(newNode), newNode, existingNode));
            break;

          case 5// same tree index (1), NOT same node, same content (5) => node was deleted and restored, maybe the identification information was lost
            break;

          case 4// NOT same tree index, NOT same node, same content (4) => different node, content is equal by chance?
            break;

          case 3: // same tree index, same node, NOT same content => node was modified but not moved
            changeSet.add(new UpdateOperation(hashMappedExistingNodes, existingNode, newNode));
            break;

          case 2// NOT same tree index, same node (2), NOT same content => node was moved and changed
            newParent  = newNode.getProperty(DOMNode.parent);
            changeSet.add(new UpdateOperation(hashMappedExistingNodes, existingNode, newNode));
            changeSet.add(new MoveOperation(hashMappedExistingNodes, getHashOrNull(newParent), getSiblingHashes(newNode), newNode, existingNode));
            break;

          case 1// same tree index (1), NOT same node, NOT same content => ignore
            break;
View Full Code Here

TOP

Related Classes of org.structr.web.diff.MoveOperation

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.