Index: trunk/parsers/wikidom/lib/hype/models/es.DocumentModel.js |
— | — | @@ -68,40 +68,60 @@ |
69 | 69 | } ); |
70 | 70 | }; |
71 | 71 | |
72 | | -/* |
73 | | -// High-level operations |
| 72 | +/** |
| 73 | + * |
| 74 | + * @method |
| 75 | + * @param {Integer} offset |
| 76 | + * @param {Array} data |
| 77 | + * @returns {es.Transaction} |
| 78 | + */ |
| 79 | +es.DocumentModel.prototype.prepareInsert = function( offset, data ) { |
| 80 | + // |
| 81 | +}; |
74 | 82 | |
75 | | -es.DocumentModel.prototype.prepareInsertContent = function( offset, content ) { |
76 | | - // retain ^ .. offset |
77 | | - // insert content |
78 | | - // retain offset .. $ |
| 83 | +/** |
| 84 | + * |
| 85 | + * @method |
| 86 | + * @param {es.Range} range |
| 87 | + * @returns {es.Transaction} |
| 88 | + */ |
| 89 | +es.DocumentModel.prototype.prepareRemove = function( range ) { |
| 90 | + // |
79 | 91 | }; |
80 | | -es.DocumentModel.prototype.prepareRemoveContent = function( range ) { |
81 | | - // retain ^ .. range.start |
82 | | - // retain range.end .. $ |
| 92 | + |
| 93 | +/** |
| 94 | + * |
| 95 | + * @returns {es.Transaction} |
| 96 | + */ |
| 97 | +es.DocumentModel.prototype.prepareAnnotateContent = function( range, method, annotation ) { |
| 98 | + // |
83 | 99 | }; |
84 | | -es.DocumentModel.prototype.prepareAnnotateContent = function( range, annotations ) { |
85 | | - // retain ^ .. range.start |
86 | | - // start annotations |
87 | | - // retain range.start .. range.end |
88 | | - // end annotations |
89 | | - // retain range.end .. $ |
| 100 | + |
| 101 | +/** |
| 102 | + * |
| 103 | + * @returns {es.Transaction} |
| 104 | + */ |
| 105 | +es.DocumentModel.prototype.prepareAnnotateElement = function( index, method, annotation ) { |
| 106 | + // |
90 | 107 | }; |
91 | | -es.DocumentModel.prototype.prepareInsertBlock = function( offset, type, attributes, content ) { |
92 | | - // retain ^ .. offset |
93 | | - // insert elementStart (type, attributes) |
94 | | - // insert content |
95 | | - // insert elementEnd (type, attributes) |
96 | | - // retain offset .. $ |
| 108 | + |
| 109 | +/** |
| 110 | + * |
| 111 | + */ |
| 112 | +es.DocumentModel.prototype.commit = function( transaction ) { |
| 113 | + // |
97 | 114 | }; |
98 | | -es.DocumentModel.prototype.prepareRemoveBlock = function( offset ) { |
99 | | - // retain ^ .. offset |
100 | | - // retain findMatchingElementEnd( offset ) .. $ |
| 115 | + |
| 116 | +/** |
| 117 | + * |
| 118 | + */ |
| 119 | +es.DocumentModel.prototype.rollback = function( transaction ) { |
| 120 | + // |
101 | 121 | }; |
102 | | -*/ |
103 | 122 | |
104 | | -// Low-level operations |
105 | 123 | /* |
| 124 | + * SCRATCH CODE |
| 125 | + * |
106 | 126 | es.DocumentModel.newFromPlainObject = function( obj ) { |
107 | 127 | |
108 | 128 | }; |