Class Strategy

java.lang.Object
be.panako.strategy.Strategy
Direct Known Subclasses:
OlafStrategy, PanakoStrategy, PitchClassHistogramStrategy

public abstract class Strategy extends Object
  • Constructor Details

    • Strategy

      public Strategy()
  • Method Details

    • store

      public abstract double store(String resource, String description)
      Store an audio file in the data store. The name of the resource is used to extract a numerical identifier. The description is arbitrary.
      Parameters:
      resource - The audio resource.
      description - An arbitrary description.
      Returns:
      The number of seconds of processed audio.
    • query

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

      public abstract void monitor(String query, int maxNumberOfReqults, Set<Integer> avoid, QueryResultHandler handler)
    • hasResource

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

      public abstract boolean isStorageAvailable()
      Returns:
      True if the storage is available, false otherwise.
    • printStorageStatistics

      public abstract void printStorageStatistics()
      Print some storage statistics.
    • getInstance

      public static Strategy getInstance()
    • classToName

      public static String classToName(Class<? extends Strategy> c)
    • resolve

      public abstract String resolve(String filename)
      Returns an internal identifier, probably an integer, for a given filename.
      Parameters:
      filename - the name of the file to resolve.
      Returns:
      An internal identifier, probably an integer, for a given filename.
    • print

      public void print(String path, boolean sonicVisualizerOutput)
    • clear

      public abstract void clear()
      Clear al information from the key value store