Class DefaultDataReader


  • public final class DefaultDataReader
    extends Object
    Reads and validates non temporal and/or temporal data.
    See Also:
    DefaultEvidenceReader
    • Constructor Detail

      • DefaultDataReader

        public DefaultDataReader​(DataReader reader,
                                 ReaderOptions readerOptions)
        Initializes a new instance of the DefaultDataReader class.
        Parameters:
        reader - The (non temporal) reader.
        readerOptions - The reader options.
      • DefaultDataReader

        public DefaultDataReader​(DataReader temporalReader,
                                 TemporalReaderOptions temporalReaderOptions)
        Initializes a new instance of the DefaultDataReader class.
        Parameters:
        temporalReader - The temporal reader.
        temporalReaderOptions - The temporal reader options.
      • DefaultDataReader

        public DefaultDataReader​(DataReader reader,
                                 ReaderOptions readerOptions,
                                 DataReader temporalReader,
                                 TemporalReaderOptions temporalReaderOptions)
        Initializes a new instance of the DefaultDataReader class.
        Parameters:
        reader - The (non temporal) reader.
        readerOptions - The reader options.
        temporalReader - The temporal reader.
        temporalReaderOptions - The temporal reader options.
      • DefaultDataReader

        public DefaultDataReader​(DataReader reader,
                                 ReaderOptions readerOptions,
                                 List<NestedDataReader> nestedReaders)
        Initializes a new instance of the DefaultDataReader class.
        Parameters:
        reader - The (non temporal) reader.
        readerOptions - The reader options.
        nestedReaders - Nested table readers.
      • DefaultDataReader

        public DefaultDataReader​(DataReader reader,
                                 ReaderOptions readerOptions,
                                 DataReader temporalReader,
                                 TemporalReaderOptions temporalReaderOptions,
                                 List<NestedDataReader> nestedReaders)
        Initializes a new instance of the DefaultDataReader class.
        Parameters:
        reader - The (non temporal) reader.
        readerOptions - The reader options.
        temporalReader - The temporal reader.
        temporalReaderOptions - The temporal reader options.
        nestedReaders - Nested table readers.
    • Method Detail

      • read

        public ReadInfo read()
        Reads the next (non temporal) record.

        This method must be called in order to move to the first record, and should be called repeatedly, until it returns false.

        This method must still be called, even if there is only temporal data.

        If non temporal data is present, after each call to read(), readTemporal() must be called repeatedly until readTemporal() returns false.

        Returns:
        Information about the current case id and record, or null if there are no further cases to read.
        See Also:
        readTemporal()
      • getNestedTableCount

        public int getNestedTableCount()
        Gets the number of nested tables.
      • readNested

        public NestedReadInfo readNested​(int nestedIndex)
        Reads the next record from a nested table.

        This method must be called in order to move to the first nested record that corresponds to the current read().

        This method should be called repeatedly until it returns false, within each call to read(), which should also be called repeatedly. This must be done for each nested table.

        Parameters:
        nestedIndex - The zero based index of the nested table to read.
        Returns:
        Information about the current case id, time, and nested record, if the read was successful, or null if there is no more data for this nested table for this case.
        See Also:
        read()
      • readTemporal

        public TemporalReadInfo readTemporal()
        Reads the next temporal record.

        This method must be called in order to move to the first temporal record that corresponds to the current read().

        Note that even if there is only temporal data, read() must still be called.

        This method should be called repeatedly until it returns false, within each call to read(), which should also be called repeatedly.

        Returns:
        Information about the current temporal case id, time, and temporal record, if the read was successful, or null if there is no more temporal data for this case.
        See Also:
        read()
      • getHasTemporalReader

        public boolean getHasTemporalReader()
        Gets a value indicating whether the reader includes temporal data.