IP Library › Granted Patent US 7,451,396
Granted Patent B2
US 7,451,396 · App. 10/756,141 · Granted Nov 11, 2008

Method for synchronization of a line-oriented text document and a stream-oriented text document

Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,451,396
App. No.
10/756,141
Granted
Nov 11, 2008
Kind
B2
Abstract

A method for synchronizing the contents of a line-oriented text document and a stream-oriented text document. The line-oriented text document has a sequence number area. The line-oriented text document listens for a change in the content of the stream-oriented text document and vice versa. When a change is detected in one document, listening in the other document is suspended and a complementary document change is implemented in the other document. Document adjustments resulting from such a complementary change are listened for separately, and echoed similarly into the original document.

Claims (61)

1. A computer implemented method for synchronizing the contents of a line-oriented document and a corresponding stream-oriented document, the computer implemented method comprising:

loading a line-oriented document and a corresponding stream-oriented document in a memory of a data processing system, wherein the corresponding stream-oriented document is associated with a stream-oriented document event listener API, wherein the line-oriented document is associated with a line-oriented document event listener API, and wherein the line-oriented document comprises records having a text element area and a corresponding sequence number area comprising a line delimiter to indicate an end of a record;

detecting, by the line-oriented document event listener API, a line-oriented document change event, wherein the line-oriented document change event occurs in response to a change in the line-oriented document;

detecting, by the stream-oriented document event listener API, a stream-oriented document change event, wherein the stream-oriented document change event occurs in response to a change in the stream-oriented document;

responsive to detecting the line-oriented document change event, translating line-oriented event text coordinates into stream-oriented text coordinates and determining a complementary document change that is required to update the corresponding stream-oriented document;

implementing the complementary document change in the corresponding stream-oriented document;

responsive to detecting the stream-oriented document change event, translating the stream-oriented event text coordinates into the line-oriented text coordinates and determining the complementary document change that is required to update the line-oriented document; and

implementing the complementary document change in the line-oriented document.

2. The computer implemented method of claim 1 further comprising:

registering the line-oriented document event listener API associated with the line-oriented document;

registering the stream-oriented document event listener API associated with the stream-oriented document; and

registering a document adjustment listener associated with the line-oriented document.

3. The computer implemented method of claim 1 , wherein, the corresponding sequence number area comprises a numeric component and a textual component, and wherein the numeric component is defined by an initial number and an increment related to the position of the text element area in the line-oriented document.

4. The computer implemented method of claim 1 wherein determining the complementary document event in the stream oriented document further comprises:

suspending the stream-oriented document event listener API; and

re-registering the stream-oriented document event listener API after the complementary document change is implemented in the stream-oriented document.

5. The computer implemented method of claim 1 wherein determining the complementary document change in the line-oriented document further comprises:

suspending the line-oriented document event listener API; and

re-registering the line-oriented document event listener API after the complementary document event is implemented in the line-oriented document.

6. The computer implemented method of claim 5 further comprising detecting, by the document adjustment listener, a document adjustment event, wherein the document adjustment event occurs when there is a change in the line-oriented document.

7. The computer implemented method of claim 6 wherein responsive to detecting a document adjustment event further comprises:

suspending the stream-oriented document event listener API;

translating document adjustment event text coordinates into stream-oriented text coordinates; and

implementing the complementary document event in the stream-oriented document.

8. The computer implemented method of claim 7 further comprising determining the complementary document change that is required to update the line-oriented document.

9. A computer program product embodied in a computer readable medium for synchronizing the contents of a line-oriented document and a corresponding stream-oriented document, the computer readable medium comprising:

instructions for loading a line-oriented document and a corresponding stream-oriented document in a memory of a data processing system, wherein the corresponding stream-oriented document is associated with a stream-oriented document event listener API, wherein the line-oriented document is associated with a line-oriented document event listener API, and wherein the line-oriented document comprises records having a text element area and a corresponding sequence number area comprising a line delimiter to indicate an end of a record;

instructions for detecting a line-oriented document change event, wherein the line-oriented document change event occurs in response to a change in the line-oriented document;

instructions for detecting a stream-oriented document change event, wherein the corresponding stream-oriented document change event occurs in response to a change in the stream-oriented document;

responsive to detecting the line-oriented document change event, instructions for translating line-oriented event text coordinates into stream-oriented text coordinates and instructions for determining a complementary document event that is required to update the stream-oriented document;

instructions implementing the complementary document event in the corresponding stream-oriented document;

responsive to detecting the stream-oriented document change event, instructions for translating the stream-oriented event text coordinates into the line-oriented text coordinates and instructions for determining the complementary document event that is required to update the line-oriented document; and

instructions for implementing the complementary document event in the line-oriented document.

10. The computer program product of claim 9 further comprising:

instructions for registering the line-oriented document event listener API associated with the line-oriented document;

instructions for registering the stream-oriented document event listener API associated with the stream-oriented document; and

instructions for registering an line-oriented document adjustment listener associated with the line-oriented document.

11. The computer program product of claim 9 wherein determining the complementary document event in the stream oriented document further comprises:

instructions for suspending the stream-oriented document event listener API; and

instructions for re-registering the stream-oriented document event listener API after the complementary document event is implemented in the stream-oriented document.

12. The computer program product of claim 9 wherein determining the complementary document event in the line-oriented document further comprises:

instructions for suspending the line-oriented document event listener API; and

instructions for re-registering the line-oriented document event listener API after the complementary document change is implemented in the line-oriented document.

13. The computer program product of claim 12 further comprising instructions for detecting a document adjustment event, wherein the document adjustment event occurs when there is a change in the line-oriented document.

14. The computer program product of claim 13 further comprising instructions for determining the complementary document change that is required to update the line-oriented document.

15. A data processing system comprising a processor for synchronizing the contents of a line-oriented document and a corresponding stream-oriented document, the data processing system comprising:

loading means for loading a line-oriented document and a corresponding stream-oriented document in a memory of a data processing system, wherein the corresponding stream-oriented document is associated with a stream-oriented document event listener API, wherein the line-oriented document is associated with a line-oriented document event listener API, and wherein the line-oriented document comprises records having a text element area and a corresponding sequence number area including a line delimiter to indicate an end of a record;

detecting means for detecting a line-oriented document change event, wherein the line-oriented document change event occurs in response to a change in the line-oriented document;

detecting means for detecting a stream-oriented document change event, wherein the stream-oriented document change event occurs in response to a change in the stream-oriented document;

responsive to detecting the line-oriented document change event, translating means translating line-oriented event text coordinates into stream-oriented text coordinates and determining means for determining a complementary document event that is required to update the corresponding stream-oriented document;

implementing means for implementing the complementary document event in the corresponding stream-oriented document;

responsive to detecting means detecting the stream-oriented document change event, translating means translating the stream-oriented event text coordinates into the line-oriented text coordinates and determining means for determining the complementary document event that is required to update the line-oriented document; and

implementing means for implementing the complementary document event in the line-oriented document.

16. The data processing system of claim 15 wherein determining the complementary document event in the stream oriented document further comprises:

suspending means for suspending the stream-oriented document event listener API; and

re-registering means for re-registering the stream-oriented document event listener API after the complementary document event is implemented in the stream-oriented document.

17. The data processing system of claim 15 wherein determining the complementary document event in the line-oriented document further comprises:

suspending means for suspending the line-oriented document event listener API; and

re-registering means for re-registering the line-oriented document event listener API after the complementary document event is implemented in the line-oriented document.

18. The data processing system of claim 17 further comprising detecting means for detecting a document adjustment event, wherein the document adjustment event occurs when there is a change in the line-oriented document.

19. The data processing system of claim 18 further comprising determining means for determining the complementary document event that is required to update the line-oriented document.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 13, 2004
From: STORISTEAUNU, ADRIAN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 014906/0497 →
Priority Claims (1)
CA 2447361 · Oct 29, 2003 · national
Continuity (1)
Related Publication 20050097434A1 · May 5, 2005