| java.lang.Object com.sun.perseus.parser.AbstractParser com.sun.perseus.parser.ClockParser
All known Subclasses: com.sun.perseus.parser.TimeConditionParser,
ClockParser | public class ClockParser extends AbstractParser (Code) | | Parser for SVG Clock values, as originally defined in the SMIL spec:
Clock-val ::= Full-clock-val | Partial-clock-val
| Timecount-val
Full-clock-val ::= Hours ":" Minutes ":" Seconds ("." Fraction)?
Partial-clock-val ::= Minutes ":" Seconds ("." Fraction)?
Timecount-val ::= Timecount ("." Fraction)? (Metric)?
Metric ::= "h" | "min" | "s" | "ms"
Hours ::= DIGIT+; any positive number
Minutes ::= 2DIGIT; range from 00 to 59
Seconds ::= 2DIGIT; range from 00 to 59
Fraction ::= DIGIT+
Timecount ::= DIGIT+
2DIGIT ::= DIGIT DIGIT
DIGIT ::= [0-9]
author: Chris Campbell version: $Id: ClockParser.java,v 1.3 2006/04/21 06:40:23 st125089 Exp $ |
Method Summary | |
public long | parseClock(String clockString) Parses a clock value. | protected long | parseClock(boolean eos) Parses a clock value, beginning at the current character.
Parameters: eos - if true, then there should be no morecharacters at the end of the string (excess characters will producean IllegalArgumentException ); if false, the parser willtreat whitespace and ';' characters as if it marked the end of string. |
MILLIS_PER_HOUR | final public static int MILLIS_PER_HOUR(Code) | | Number of milliseconds in an hour
|
MILLIS_PER_MINUTE | final public static int MILLIS_PER_MINUTE(Code) | | Number of milliseconds in a minute
|
MILLIS_PER_SECOND | final public static int MILLIS_PER_SECOND(Code) | | Number of milliseconds in a second
|
MINUTES_PER_HOUR | final public static int MINUTES_PER_HOUR(Code) | | Number of minutes in an hour
|
SECONDS_PER_MINUTE | final public static int SECONDS_PER_MINUTE(Code) | | Number of seconds in a minute
|
parseClock | public long parseClock(String clockString)(Code) | | Parses a clock value. This method throws an
IllegalArgumentException if the input argument's
syntax does not conform to that of a clock value, as defined
by the SMIL specification.
Parameters: clockString - the value to convert to a long offset value. long offset value corresponding to the input argument. |
parseClock | protected long parseClock(boolean eos)(Code) | | Parses a clock value, beginning at the current character.
Parameters: eos - if true, then there should be no morecharacters at the end of the string (excess characters will producean IllegalArgumentException ); if false, the parser willtreat whitespace and ';' characters as if it marked the end of string. a long offset value. |
|
|