Claims (4)
1. Способ согласования результатов анализа электронных чернил документа с текущей версией этого документа, содержащий этапы, на которых1. A method for reconciling the results of an electronic ink analysis of a document with the current version of this document, comprising the steps of
создают независимый от документа объект контекста из текущего объекта контекста документа,create a document-independent context object from the current document context object,
создают копию независимого от документа объекта контекста,Create a copy of a document-independent context object
модифицируют копию независимого от документа объекта контекста в процессе анализа документа для включения результатов анализа электронных чернил независимого от документа объекта контекста,modify the copy of the document-independent context object in the process of analyzing the document to include the results of the analysis of electronic ink of the document-independent context object,
принимают вторую версию текущего объекта контекста,accept the second version of the current context object,
для каждого узла чернил в независимом от документа объекте контекста, когда имеется соответствующий узел в текущем объекте контекста, добавляют этот узел в хэш-таблицу, в которой задается соответствие уникальных идентификаторов узлов в независимом от документа объекте контекста ссылкам на узлы в текущем объекте контекста,for each ink node in a document-independent context object, when there is a corresponding node in the current context object, add this node to the hash table, which sets the correspondence of unique identifiers of nodes in the document-independent context object to the links to nodes in the current context object,
для каждого узла в независимом от документа объекте контекста определяют, отличается ли упомянутый соответствующий узел во второй версии текущего объекта контекста от упомянутого каждого узла, иfor each node in a document-independent context object, it is determined whether said corresponding node in the second version of the current context object is different from said each node, and
для каждого узла в независимом от документа объекте контекста, когда узел в независимом от документа объекте контекста отличается от упомянутого соответствующего узла во второй версии текущего объекта контекста, добавляют этот узел в список узлов, для которых изменения не распространяются.for each node in a document-independent context object, when a node in a document-independent context object differs from the corresponding node in the second version of the current context object, add this node to the list of nodes for which changes are not propagated.
2. Способ по п.1, дополнительно содержащий этапы, на которых2. The method according to claim 1, further comprising stages in which
для каждого узла в независимом от документа объекте контекста осуществляют поиск соответствующего узла в модифицированной копии независимого от документа объекта контекста и осуществляют поиск соответствующего узла во второй версии текущего объекта контекста,for each node in a document-independent context object, search for the corresponding node in a modified copy of the document-independent context object and search for the corresponding node in the second version of the current context object,
определяют, удален ли этот соответствующий узел из модифицированной копии независимого от документа объекта контекста, иdetermining whether this corresponding node has been removed from the modified copy of the document-independent context object, and
когда упомянутый соответствующий узел удален из модифицированной копии независимого от документа объекта контекста, добавляют этот соответствующий узел в список узлов, для которых изменения не распространяются.when said corresponding node is removed from the modified copy of the document-independent context object, this corresponding node is added to the list of nodes for which the changes are not propagated.
3. Способ по п.1, дополнительно содержащий этапы, на которых3. The method according to claim 1, additionally containing stages, in which
анализируют каждый узел в копии независимого от документа объекта контекста, иanalyze each node in a copy of a document-independent context object, and
когда анализируемый узел не находится в списке узлов, для которых изменения не распространяются, распространяют изменения в анализируемом узле от соответствующего узла в копии независимого от документа объекта контекста на упомянутый соответствующий узел во второй версии текущего объекта контекста.when the analyzed node is not in the list of nodes for which changes are not propagated, the changes in the analyzed node from the corresponding node in the copy of the document-independent context object are propagated to the corresponding node in the second version of the current context object.
4. Способ по п.1, дополнительно содержащий этапы, на которых4. The method according to claim 1, additionally containing stages, in which
для каждого узла в независимом от документа объекте контекста определяют, удален ли соответствующий узел из модифицированной копии независимого от документа объекта контекста, иfor each node in a document-independent context object, it is determined whether the corresponding node is removed from the modified copy of the document-independent context object, and
для каждого узла в независимом от документа объекте контекста, когда упомянутый соответствующий узел во второй версии текущего объекта контекста не отличается и когда упомянутый соответствующий узел удален из модифицированной копии независимого от документа объекта контекста, добавляют идентифицирующие узлы в список удаленных узлов, иfor each node in the document-independent context object, when the corresponding node in the second version of the current context object is not different and when the corresponding node is removed from the modified copy of the document-independent context object, identifying nodes are added to the list of deleted nodes, and
удаляют узлы в списке удаленных узлов после того, как все изменения распространены на вторую версию текущего объекта контекста.
delete nodes in the list of remote nodes after all changes are propagated to the second version of the current context object.