Class SimpleDataStoreFactory

  • All Implemented Interfaces:
    DataStore, DataStoreFactory

    public class SimpleDataStoreFactory
    extends java.lang.Object
    implements DataStoreFactory, DataStore
    DataStoreFactory implementation that does no caching. It reads the data as required every time. This has low memory requirements. It may also be faster to use for one-pass plots, but probably not if the same column is used for multiple purposes.
    Since:
    11 Feb 2013
    Author:
    Mark Taylor
    • Constructor Detail

      • SimpleDataStoreFactory

        public SimpleDataStoreFactory()
    • Method Detail

      • hasData

        public boolean hasData​(DataSpec spec)
        Description copied from interface: DataStore
        Indicates whether this store has the data described by a given DataSpec.
        Specified by:
        hasData in interface DataStore
        Parameters:
        spec - plot data specification object
      • readDataStore

        public DataStore readDataStore​(DataSpec[] specs,
                                       DataStore prevStore)
        Executes instantly and returns this object.
        Specified by:
        readDataStore in interface DataStoreFactory
        Parameters:
        specs - data specifications; some elements may be null
        prevStore - previously obtained DataStore, or null
        Returns:
        new data store
      • getUserCoordMappers

        public static uk.ac.starlink.table.DomainMapper[] getUserCoordMappers​(DataSpec dataSpec,
                                                                              int icoord)
        Utility method to work out the domain mappers for a given coordinate of a DataSpec. For the requested coord, it returns a mapper array with elements filled, in with any mapper known for the given input coordinates that has the sub-type appropriate for that coordinate.
        Parameters:
        dataSpec - data specification object
        icoord - index of coordinate in dataSpec
        Returns:
        mapper array for decoding values of one coordinate of a data spec