Class OlafStrategy

java.lang.Object
be.panako.strategy.Strategy
be.panako.strategy.olaf.OlafStrategy

public class OlafStrategy extends Strategy
  • Constructor Details

    • OlafStrategy

      public OlafStrategy()
  • Method Details

    • store

      public double store(String resource, String description)
      Description copied from class: Strategy
      Store an audio file in the data store. The name of the resource is used to extract a numerical identifier. The description is arbitrary.
      Specified by:
      store in class Strategy
      Parameters:
      resource - The audio resource.
      description - An arbitrary description.
      Returns:
      The number of seconds of processed audio.
    • delete

      public double delete(String resource, String description)
    • toFingerprints

      public List<OlafFingerprint> toFingerprints(String resource)
    • toFingerprints

      public List<OlafFingerprint> toFingerprints(String resource, double startTimeOffset, double numberOfSeconds)
    • query

      public void query(String query, int maxNumberOfResults, Set<Integer> avoid, QueryResultHandler handler)
      Specified by:
      query in class Strategy
    • query

      public void query(String query, int maxNumberOfResults, Set<Integer> avoid, QueryResultHandler handler, double startTimeOffset, double numberOfSeconds)
    • monitor

      public void monitor(String query, int maxNumberOfReqults, Set<Integer> avoid, QueryResultHandler handler)
      Specified by:
      monitor in class Strategy
    • hasResource

      public boolean hasResource(String resource)
      Description copied from class: Strategy
      Are there fingerprints for this resource already stored in the database?
      Specified by:
      hasResource in class Strategy
      Parameters:
      resource - The name of the resource.
      Returns:
      True if the resource is already treated. False otherwise.
    • isStorageAvailable

      public boolean isStorageAvailable()
      Specified by:
      isStorageAvailable in class Strategy
      Returns:
      True if the storage is available, false otherwise.
    • printStorageStatistics

      public void printStorageStatistics()
      Description copied from class: Strategy
      Print some storage statistics.
      Specified by:
      printStorageStatistics in class Strategy
    • resolve

      public String resolve(String filename)
      Description copied from class: Strategy
      Returns an internal identifier, probably an integer, for a given filename.
      Specified by:
      resolve in class Strategy
      Parameters:
      filename - the name of the file to resolve.
      Returns:
      An internal identifier, probably an integer, for a given filename.
    • load

      public void load()
    • print

      public void print(String path, boolean sonicVisualizerOutput)
      Overrides:
      print in class Strategy
    • name

      public String name()
    • clear

      public void clear()
      Description copied from class: Strategy
      Clear al information from the key value store
      Specified by:
      clear in class Strategy