org.rrd4j.core

## Class XmlReader

- java.lang.Object
- - org.rrd4j.core.DataImporter
  - - org.rrd4j.core.XmlReader

- All Implemented Interfaces:
    Closeable, AutoCloseable

      class XmlReader
      extends DataImporter

  Reader for importing RRD data from XML format.

  This class extends DataImporter to provide functionality for reading RRD definitions and data from XML files. It parses the XML structure and provides methods to access various RRD components like datasources, archives, and their properties.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XmlReader(String xmlFilePath)` Creates an XmlReader for the specified XML file.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getAccumValue(int dsIndex)`
    `int` | `getArcCount()`
    `ConsolFun` | `getConsolFun(int arcIndex)`
    `int` | `getDsCount()`
    `String` | `getDsName(int dsIndex)`
    `DsType` | `getDsType(int dsIndex)`
    `long` | `getHeartbeat(int dsIndex)`
    `long` | `getLastUpdateTime()` Gets the last update time from the XML file.
    `double` | `getLastValue(int dsIndex)`
    `double` | `getMaxValue(int dsIndex)`
    `double` | `getMinValue(int dsIndex)`
    `long` | `getNanSeconds(int dsIndex)`
    `int` | `getRows(int arcIndex)`
    `double` | `getStateAccumValue(int arcIndex, int dsIndex)`
    `int` | `getStateNanSteps(int arcIndex, int dsIndex)`
    `long` | `getStep()` Gets the step interval from the XML file.
    `int` | `getSteps(int arcIndex)`
    `double[]` | `getValues(int arcIndex, int dsIndex)`
    `String` | `getVersion()` Gets the RRD version from the XML file.
    `double` | `getXff(int arcIndex)`

    - ### Methods inherited from class org.rrd4j.core.DataImporter

      `close, getEstimatedSize, release`

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

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

- - ### Constructor Detail

    - #### XmlReader

          XmlReader(String xmlFilePath)
             throws IOException

      Creates an XmlReader for the specified XML file.
      Parameters:
        `xmlFilePath` - the path to the XML file to read
      Throws:
        `IOException` - if an I/O error occurs while reading the file

  - ### Method Detail

    - #### getAccumValue

          public double getAccumValue(int dsIndex)

      Specified by:
        `getAccumValue` in class `DataImporter`

    - #### getArcCount

          public int getArcCount()

      Specified by:
        `getArcCount` in class `DataImporter`

    - #### getConsolFun

          public ConsolFun getConsolFun(int arcIndex)

      Specified by:
        `getConsolFun` in class `DataImporter`

    - #### getDsCount

          public int getDsCount()

      Specified by:
        `getDsCount` in class `DataImporter`

    - #### getDsName

          public String getDsName(int dsIndex)

      Specified by:
        `getDsName` in class `DataImporter`

    - #### getDsType

          public DsType getDsType(int dsIndex)

      Specified by:
        `getDsType` in class `DataImporter`

    - #### getHeartbeat

          public long getHeartbeat(int dsIndex)

      Specified by:
        `getHeartbeat` in class `DataImporter`

    - #### getLastUpdateTime

          public long getLastUpdateTime()

      Gets the last update time from the XML file.
      Specified by:
        `getLastUpdateTime` in class `DataImporter`
      Returns:
        the last update time as Unix timestamp

    - #### getLastValue

          public double getLastValue(int dsIndex)

      Specified by:
        `getLastValue` in class `DataImporter`

    - #### getMaxValue

          public double getMaxValue(int dsIndex)

      Specified by:
        `getMaxValue` in class `DataImporter`

    - #### getMinValue

          public double getMinValue(int dsIndex)

      Specified by:
        `getMinValue` in class `DataImporter`

    - #### getNanSeconds

          public long getNanSeconds(int dsIndex)

      Specified by:
        `getNanSeconds` in class `DataImporter`

    - #### getRows

          public int getRows(int arcIndex)

      Specified by:
        `getRows` in class `DataImporter`

    - #### getStateAccumValue

          public double getStateAccumValue(int arcIndex,
                                           int dsIndex)

      Specified by:
        `getStateAccumValue` in class `DataImporter`

    - #### getStateNanSteps

          public int getStateNanSteps(int arcIndex,
                                      int dsIndex)

      Specified by:
        `getStateNanSteps` in class `DataImporter`

    - #### getStep

          public long getStep()

      Gets the step interval from the XML file.
      Specified by:
        `getStep` in class `DataImporter`
      Returns:
        the step interval in seconds

    - #### getSteps

          public int getSteps(int arcIndex)

      Specified by:
        `getSteps` in class `DataImporter`

    - #### getValues

          public double[] getValues(int arcIndex,
                                    int dsIndex)

      Specified by:
        `getValues` in class `DataImporter`

    - #### getVersion

          public String getVersion()

      Gets the RRD version from the XML file.
      Specified by:
        `getVersion` in class `DataImporter`
      Returns:
        the version string

    - #### getXff

          public double getXff(int arcIndex)

      Specified by:
        `getXff` in class `DataImporter`