org.apache.batik.parser

Class TimingParser

public abstract class TimingParser extends AbstractParser

An abstract base class for SMIL timing value parsers.
Field Summary
protected static intTIME_ACCESSKEY
protected static intTIME_ACCESSKEY_SVG12
protected static intTIME_EVENTBASE
protected static intTIME_INDEFINITE
protected static intTIME_MEDIA_MARKER
protected static intTIME_OFFSET
protected static intTIME_REPEAT
protected static intTIME_SYNCBASE
protected static intTIME_WALLCLOCK
protected booleanuseSVG11AccessKeys
Allows the use of accessKey() timing specifiers with a single character, as specified in SVG 1.1.
protected booleanuseSVG12AccessKeys
Allows the use of accessKey() timing specifiers with a DOM 3 key name, as specified in SVG 1.2.
Constructor Summary
TimingParser(boolean useSVG11AccessKeys, boolean useSVG12AccessKeys)
Creates a new TimingParser.
Method Summary
protected floatparseClockValue()
Parses a clock value.
protected intparseDigits()
Parses a sequence of digits and returns the integer.
protected floatparseFraction()
Parses a '.' and a sequence of digits and returns the float.
protected Object[]parseIDValue(boolean escaped)
Parses a timing specifier that starts with a word.
protected StringparseName()
Parses an XML name with optional escaping in the middle.
protected floatparseOffset()
Parses an offset value.
protected Object[]parseTimingSpecifier()
Parses a timing specifier.
protected floatparseUnit()
Parses a time unit and returns the float for the multiplier.
protected CalendarparseWallclockValue()
Parses a wallclock value and returns it as a Calendar.

Field Detail

TIME_ACCESSKEY

protected static final int TIME_ACCESSKEY

TIME_ACCESSKEY_SVG12

protected static final int TIME_ACCESSKEY_SVG12

TIME_EVENTBASE

protected static final int TIME_EVENTBASE

TIME_INDEFINITE

protected static final int TIME_INDEFINITE

TIME_MEDIA_MARKER

protected static final int TIME_MEDIA_MARKER

TIME_OFFSET

protected static final int TIME_OFFSET

TIME_REPEAT

protected static final int TIME_REPEAT

TIME_SYNCBASE

protected static final int TIME_SYNCBASE

TIME_WALLCLOCK

protected static final int TIME_WALLCLOCK

useSVG11AccessKeys

protected boolean useSVG11AccessKeys
Allows the use of accessKey() timing specifiers with a single character, as specified in SVG 1.1.

useSVG12AccessKeys

protected boolean useSVG12AccessKeys
Allows the use of accessKey() timing specifiers with a DOM 3 key name, as specified in SVG 1.2.

Constructor Detail

TimingParser

public TimingParser(boolean useSVG11AccessKeys, boolean useSVG12AccessKeys)
Creates a new TimingParser.

Parameters: useSVG11AccessKeys allows the use of accessKey() timing specifiers with a single character useSVG12AccessKeys allows the use of accessKey() with a DOM 3 key name

Method Detail

parseClockValue

protected float parseClockValue()
Parses a clock value.

parseDigits

protected int parseDigits()
Parses a sequence of digits and returns the integer.

parseFraction

protected float parseFraction()
Parses a '.' and a sequence of digits and returns the float.

parseIDValue

protected Object[] parseIDValue(boolean escaped)
Parses a timing specifier that starts with a word.

Parameters: escaped whether a backslash appeared before this timing specifier

parseName

protected String parseName()
Parses an XML name with optional escaping in the middle.

parseOffset

protected float parseOffset()
Parses an offset value.

parseTimingSpecifier

protected Object[] parseTimingSpecifier()
Parses a timing specifier. Returns an array of Objects of the form:

parseUnit

protected float parseUnit()
Parses a time unit and returns the float for the multiplier.

parseWallclockValue

protected Calendar parseWallclockValue()
Parses a wallclock value and returns it as a Calendar.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.