anl.aida.util
Class StandardIndexLineParser
java.lang.Object
anl.aida.util.StandardIndexLineParser
public class StandardIndexLineParser
- extends java.lang.Object
Parses a line in the standard index format. The format is:
date_in_millis:::url:::title:::author
with author being optional.
Method Summary |
java.lang.String[] |
parse(java.lang.String line,
java.lang.String[] result)
Parses the line into four strings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DELIMITER
private static final java.lang.String DELIMITER
- See Also:
- Constant Field Values
TIMESTAMP
public static final int TIMESTAMP
- See Also:
- Constant Field Values
URL
public static final int URL
- See Also:
- Constant Field Values
TITLE
public static final int TITLE
- See Also:
- Constant Field Values
AUTHOR
public static final int AUTHOR
- See Also:
- Constant Field Values
StandardIndexLineParser
public StandardIndexLineParser()
parse
public java.lang.String[] parse(java.lang.String line,
java.lang.String[] result)
- Parses the line into four strings. One each for the
timestamp in milliseconds, url, title, and author.
The result is returned in a String[]. This will
use the specified String[] if it is not null and
of length 4. The constants TIMESTAMP etc. can be
used as indices into the returned array.
- Parameters:
line
- the line to parseresult
- an optional array to store the results in
- Returns:
- the parsed results.