Module io.xpipe.api

Class DataSourceImpl

java.lang.Object
io.xpipe.api.impl.DataSourceImpl
All Implemented Interfaces:
DataSource
Direct Known Subclasses:
DataRawImpl, DataStructureImpl, DataTableImpl, DataTextImpl

public abstract class DataSourceImpl extends Object implements DataSource
  • Constructor Details

    • DataSourceImpl

      public DataSourceImpl(io.xpipe.core.source.DataSourceId sourceId, DataSourceConfig config, io.xpipe.core.source.DataSource<?> internalSource)
  • Method Details

    • get

      public static DataSource get(io.xpipe.core.source.DataSourceReference ds)
      Description copied from interface: DataSource
      Retrieves the data source for a given reference.
      Parameters:
      ds - the data source reference
    • create

      public static DataSource create(io.xpipe.core.source.DataSourceId id, io.xpipe.core.source.DataSource<?> source)
      Description copied from interface: DataSource
      Creates a new data source from an input stream.
      Parameters:
      id - the data source id
      Returns:
      a DataSource instances that can be used to access the underlying data
    • create

      public static DataSource create(io.xpipe.core.source.DataSourceId id, String type, io.xpipe.core.store.DataStore store)
      Description copied from interface: DataSource
      Creates a new data source from an input stream. 1
      Parameters:
      id - the data source id
      type - the data source type
      store - the data store to add
      Returns:
      a DataSource instances that can be used to access the underlying data
    • create

      public static DataSource create(io.xpipe.core.source.DataSourceId id, String type, InputStream in)
      Description copied from interface: DataSource
      Creates a new data source from an input stream.
      Parameters:
      id - the data source id
      type - the data source type
      in - the input stream to read
      Returns:
      a DataSource instances that can be used to access the underlying data
    • forwardTo

      public void forwardTo(DataSource target)
      Specified by:
      forwardTo in interface DataSource
    • appendTo

      public void appendTo(DataSource target)
      Specified by:
      appendTo in interface DataSource
    • getInternalSource

      public io.xpipe.core.source.DataSource<?> getInternalSource()
      Specified by:
      getInternalSource in interface DataSource
    • getId

      public io.xpipe.core.source.DataSourceId getId()
      Description copied from interface: DataSource
      Returns the id of this data source.
      Specified by:
      getId in interface DataSource
    • getConfig

      public DataSourceConfig getConfig()
      Specified by:
      getConfig in interface DataSource