| java.lang.Object soif.Results
Results | public class Results (Code) | | Example of a pretty print class for handling a result set.
Provides a base class that handles output and manages
related services.
|
Constructor Summary | |
public | Results() Constructor. |
Method Summary | |
public String | getDisplay() Return comma delimited display set. | public String | resultToHTML(SOIF soif, String preField, String postField) Format result SOIF into HTML.
Handles URL hrefs and score formatting/images.
Parameters: soif - target Parameters: preField - HTML string to prepend each field with, e.g. | public String | resultsToHTML(SOIF soif, String preResult, String postResult, String preField, String postField) Format results list SOIF set into HTML.
Handles URL hrefs and score formatting/images.
Parameters: soif - target Parameters: preResult - HTML string to prepend each result with, e.g. | public void | setDisplay(String s) Set the display. | public void | setDisplayAsLink(String s, boolean b) Set fields which should be displayed as links (e.g. | public void | setScoreGif(int low, int high, String gif) Set the gif for a range of scores. | public String | toScoreGifHTML(String s) Given a score, format it returning both percent and image, if any. | public String | toScoreGifHTML(float f) Given a score, format it returning both percentage and image, if any. | public String | toString() |
Results | public Results()(Code) | | Constructor.
|
getDisplay | public String getDisplay()(Code) | | Return comma delimited display set.
|
resultToHTML | public String resultToHTML(SOIF soif, String preField, String postField)(Code) | | Format result SOIF into HTML.
Handles URL hrefs and score formatting/images.
Parameters: soif - target Parameters: preField - HTML string to prepend each field with, e.g. " | " Parameters: postField - HTML string to append each field with, e.g. " | "
resultsToHTML | public String resultsToHTML(SOIF soif, String preResult, String postResult, String preField, String postField)(Code) | | Format results list SOIF set into HTML.
Handles URL hrefs and score formatting/images.
Parameters: soif - target Parameters: preResult - HTML string to prepend each result with, e.g. " | " Parameters: postResult - HTML string to append each result with, e.g. " " Parameters: preField - HTML string to prepend each field with, e.g. "" Parameters: postField - HTML string to append each field with, e.g. " | "
setDisplay | public void setDisplay(String s)(Code) | | Set the display.
Parameters: s - comma delimited list of fields to display |
setDisplayAsLink | public void setDisplayAsLink(String s, boolean b)(Code) | | Set fields which should be displayed as links (e.g. title).
Parameters: s - field Parameters: b - display or not |
setScoreGif | public void setScoreGif(int low, int high, String gif)(Code) | | Set the gif for a range of scores.
Parameters: low - low end of the range, inclusive. Parameters: high - high end of the range, inclusive. Parameters: gif - url for gif |
toScoreGifHTML | public String toScoreGifHTML(String s)(Code) | | Given a score, format it returning both percent and image, if any.
Parameters: s - score, range 0.00 <= s <= 1.00 |
toScoreGifHTML | public String toScoreGifHTML(float f)(Code) | | Given a score, format it returning both percentage and image, if any.
Parameters: f - score, range 0.00 <= f <= 1.00 |
|
|