Class SimpleDataSourceProvenance

java.lang.Object
org.tribuo.provenance.SimpleDataSourceProvenance
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance, com.oracle.labs.mlrg.olcut.provenance.Provenance, Serializable, Iterable<com.oracle.labs.mlrg.olcut.util.Pair<String,com.oracle.labs.mlrg.olcut.provenance.Provenance>>, DataProvenance, DataSourceProvenance

public class SimpleDataSourceProvenance extends Object implements DataSourceProvenance
This class stores a String describing the data source, along with a timestamp. It should not be used except for simple demos, or machine created data. It is vastly preferable to create a DataSource implementation with a specific provenance, rather than using this to construct an empty MutableDataset.
See Also:
  • Field Details

  • Constructor Details

    • SimpleDataSourceProvenance

      public SimpleDataSourceProvenance(String description, OutputFactory<T> outputFactory)
      This constructor initialises the provenance using the current time in the system timezone.
      Type Parameters:
      T - The type of the output.
      Parameters:
      description - The description of the data.
      outputFactory - The output factory used to process it.
    • SimpleDataSourceProvenance

      public SimpleDataSourceProvenance(String description, OffsetDateTime creationTime, OutputFactory<T> outputFactory)
      This constructor initialises the provenance using the supplied description, time and output factory.
      Type Parameters:
      T - The type of the output.
      Parameters:
      description - The description of the data.
      creationTime - The time the data was created or processed.
      outputFactory - The output factory used to process it.
    • SimpleDataSourceProvenance

      public SimpleDataSourceProvenance(Map<String,com.oracle.labs.mlrg.olcut.provenance.Provenance> map)
      Used for provenance deserialization.
      Parameters:
      map - The provenance elements.
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance
    • iterator

      public Iterator<com.oracle.labs.mlrg.olcut.util.Pair<String,com.oracle.labs.mlrg.olcut.provenance.Provenance>> iterator()
      Specified by:
      iterator in interface Iterable<com.oracle.labs.mlrg.olcut.util.Pair<String,com.oracle.labs.mlrg.olcut.provenance.Provenance>>
    • toString

      public String toString()
      Overrides:
      toString in class Object