Class AbstractLineParser
java.lang.Object
com.xceptance.xlt.api.report.external.AbstractLineParser
- Direct Known Subclasses:
PlainDataTableCsvParser,SimpleCsvParser
Simple line parser that provides common functionality to parse given lines. For reading lines a file reader is
responsible that passes the lines to the
parse(java.lang.String) method.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DateFormatGet the date format.Get the parser properties.Get markers for relevant data (e.g. column headlines).abstract ValueSetParse the resource line.protected longParse 'String' time stamp to 'long'.voidsetProperties(Properties properties) Set the parser properties.voidsetValueNames(Set<String> valueNames) Store markers for relevant data (e.g. column headlines or index numbers).
-
Constructor Details
-
AbstractLineParser
public AbstractLineParser()
-
-
Method Details
-
parse
Parse the resource line.- Parameters:
line- line to parse- Returns:
- parsed
ValueSetornullif there is currently nothing to return. This might be in case the line has no value of interest.
-
parseTime
Parse 'String' time stamp to 'long'.- Parameters:
timeString- human readable time stamp like08.08.1977 12:34:56or UNIX time stamp like239891696- Returns:
- time stamp of type 'long' or
-1if parsing failed
-
getDateFormat
Get the date format.- Returns:
- the date format
-
setValueNames
Store markers for relevant data (e.g. column headlines or index numbers).- Parameters:
valueNames- value names
-
getValueNames
Get markers for relevant data (e.g. column headlines).- Returns:
- value names of interest
-
setProperties
Set the parser properties.- Parameters:
properties- the parser properties
-
getProperties
Get the parser properties.- Returns:
- the parser properties
-