OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * boilerpipe | 6 * boilerpipe |
7 * | 7 * |
8 * Copyright (c) 2009 Christian Kohlschütter | 8 * Copyright (c) 2009 Christian Kohlschütter |
9 * | 9 * |
10 * The author licenses this file to You under the Apache License, Version 2.0 | 10 * The author licenses this file to You under the Apache License, Version 2.0 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 webTextBuilder.lineBreak(node); | 108 webTextBuilder.lineBreak(node); |
109 } | 109 } |
110 | 110 |
111 @Override | 111 @Override |
112 public void dataTable(Element e) { | 112 public void dataTable(Element e) { |
113 flushBlock(groupNumber); | 113 flushBlock(groupNumber); |
114 document.addTable(new WebTable(e)); | 114 document.addTable(new WebTable(e)); |
115 } | 115 } |
116 | 116 |
117 @Override | 117 @Override |
| 118 public void tag(WebTag tag) { |
| 119 flushBlock(groupNumber); |
| 120 document.addTag(tag); |
| 121 } |
| 122 |
| 123 @Override |
118 public void embed(WebElement embedNode) { | 124 public void embed(WebElement embedNode) { |
119 flushBlock(groupNumber); | 125 flushBlock(groupNumber); |
120 document.addEmbed(embedNode); | 126 document.addEmbed(embedNode); |
121 } | 127 } |
122 | 128 |
123 private void enterAnchor() { | 129 private void enterAnchor() { |
124 webTextBuilder.enterAnchor(); | 130 webTextBuilder.enterAnchor(); |
125 } | 131 } |
126 | 132 |
127 private void exitAnchor() { | 133 private void exitAnchor() { |
(...skipping 22 matching lines...) Expand all Loading... |
150 * Returns a {@link WebDocument} containing the extracted {@link WebText} | 156 * Returns a {@link WebDocument} containing the extracted {@link WebText} |
151 * s. NOTE: Only call this after parsing. | 157 * s. NOTE: Only call this after parsing. |
152 */ | 158 */ |
153 public WebDocument toWebDocument() { | 159 public WebDocument toWebDocument() { |
154 // Just to be sure. | 160 // Just to be sure. |
155 flushBlock(groupNumber); | 161 flushBlock(groupNumber); |
156 return document; | 162 return document; |
157 } | 163 } |
158 | 164 |
159 } | 165 } |
OLD | NEW |