Package com.xceptance.xlt.api.report.external

# Class AbstractLineParser

java.lang.Object
com.xceptance.xlt.api.report.external.AbstractLineParser

Direct Known Subclasses:
  `PlainDataTableCsvParser`, `SimpleCsvParser`

public abstract class AbstractLineParser extends Object
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
  Constructor
  Description
  `AbstractLineParser()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected DateFormat`
  `getDateFormat()`
  Get the date format.
  `Properties`
  `getProperties()`
  Get the parser properties.
  `Set<String>`
  `getValueNames()`
  Get markers for relevant data (e.g. column headlines).
  `abstract ValueSet`
  `parse(String line)`
  Parse the resource line.
  `protected long`
  `parseTime(String timeString)`
  Parse 'String' time stamp to 'long'.
  `void`
  `setProperties(Properties properties)`
  Set the parser properties.
  `void`
  `setValueNames(Set<String> valueNames)`
  Store markers for relevant data (e.g. column headlines or index numbers).

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AbstractLineParser

    public AbstractLineParser()

- ## Method Details

  - ### parse

    public abstract ValueSet parse(String line)
    Parse the resource line.
    Parameters:
      `line` - line to parse
    Returns:
      parsed `ValueSet` or `null` if there is currently nothing to return. This might be in case the line has no value of interest.

  - ### parseTime

    protected long parseTime(String timeString)
    Parse 'String' time stamp to 'long'.
    Parameters:
      `timeString` - human readable time stamp like `08.08.1977 12:34:56` or UNIX time stamp like `239891696`
    Returns:
      time stamp of type 'long' or `-1` if parsing failed

  - ### getDateFormat

    protected DateFormat getDateFormat()
    Get the date format.
    Returns:
      the date format

  - ### setValueNames

    public void setValueNames(Set<String> valueNames)
    Store markers for relevant data (e.g. column headlines or index numbers).
    Parameters:
      `valueNames` - value names

  - ### getValueNames

    public Set<String> getValueNames()
    Get markers for relevant data (e.g. column headlines).
    Returns:
      value names of interest

  - ### setProperties

    public void setProperties(Properties properties)
    Set the parser properties.
    Parameters:
      `properties` - the parser properties

  - ### getProperties

    public Properties getProperties()
    Get the parser properties.
    Returns:
      the parser properties