| OLD | NEW |
| (Empty) |
| 1 // Copyright 2012 Google Inc. All Rights Reserved. | |
| 2 | |
| 3 /** | |
| 4 * @fileoverview Defines a result type interface. | |
| 5 * @author peterxiao@google.com (Peter Xiao) | |
| 6 */ | |
| 7 | |
| 8 goog.provide('cvox.AbstractResult'); | |
| 9 | |
| 10 goog.require('cvox.SearchUtil'); | |
| 11 | |
| 12 /** | |
| 13 * @constructor | |
| 14 */ | |
| 15 cvox.AbstractResult = function() { }; | |
| 16 | |
| 17 /** | |
| 18 * Checks the result if it is an unknown result. | |
| 19 * @param {Element} result Result to be checked. | |
| 20 * @return {boolean} Whether or not the element is an unknown result. | |
| 21 */ | |
| 22 cvox.AbstractResult.prototype.isType = function(result) { | |
| 23 return false; | |
| 24 }; | |
| 25 | |
| 26 /** | |
| 27 * Speak a generic search result. | |
| 28 * @param {Element} result Generic result to be spoken. | |
| 29 * @return {boolean} Whether or not the result was spoken. | |
| 30 */ | |
| 31 cvox.AbstractResult.prototype.speak = function(result) { | |
| 32 return false; | |
| 33 }; | |
| 34 | |
| 35 /** | |
| 36 * Extracts the wikipedia URL from knowledge panel. | |
| 37 * @param {Element} result Result to extract from. | |
| 38 * @return {?string} URL. | |
| 39 */ | |
| 40 cvox.AbstractResult.prototype.getURL = cvox.SearchUtil.extractURL; | |
| 41 | |
| 42 /** | |
| 43 * Returns the node to sync to. | |
| 44 * @param {Element} result Result. | |
| 45 * @return {?Node} Node to sync to. | |
| 46 */ | |
| 47 cvox.AbstractResult.prototype.getSyncNode = function(result) { | |
| 48 return result; | |
| 49 }; | |
| OLD | NEW |