| java.lang.Object org.tigris.scarab.util.IssueIdParser
IssueIdParser | public class IssueIdParser (Code) | | This class contains logic for finding issue ids in generic text.
author: John McNally version: $Id: IssueIdParser.java 7604 2003-04-09 22:55:31Z jmcnally $ |
Method Summary | |
public static String | getIssueIdFromToken(Module module, String token) Assumption is the token will contain at most one issue id.
A number is a potential valid id within the given module.
A syntactically correct id will be checked against the db
to make sure a valid issue exists. | public static List | getIssueIdTokens(Module module, String text) Parses text for any valid issue ids and returns matches. | public static Map | getIssueIds(Module module, String text) A Map of ids where the keys are the tokens such as "issue#35" and the
value is the unique id, "PACS35". | public static List | tokenizeText(Module module, String text) Parses text for any valid issue ids. |
getIssueIdFromToken | public static String getIssueIdFromToken(Module module, String token)(Code) | | Assumption is the token will contain at most one issue id.
A number is a potential valid id within the given module.
A syntactically correct id will be checked against the db
to make sure a valid issue exists. if the token does not
result in a valid issue, null is returned. Otherwise the
id will be returned including the module code.
Parameters: module - a Module value Parameters: token - a String value a String value |
getIssueIdTokens | public static List getIssueIdTokens(Module module, String text) throws TorqueException(Code) | | Parses text for any valid issue ids and returns matches.
The regular expression to determine ids is given by the module
|
getIssueIds | public static Map getIssueIds(Module module, String text) throws TorqueException(Code) | | A Map of ids where the keys are the tokens such as "issue#35" and the
value is the unique id, "PACS35".
|
tokenizeText | public static List tokenizeText(Module module, String text) throws TorqueException(Code) | | Parses text for any valid issue ids. The text is broken up
into tokens at potential id boundaries. if a token corresponds
to a valid issue id, a List is returned with [0] as the
token and [1] is the id. if a token does not contain an id
the text is added as a String.
|
|
|